Documentation Index
Fetch the complete documentation index at: https://docs.formal.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
MCP (Model Context Protocol) resources let you intercept and control HTTP traffic originating from AI agents. Formal sits in the path to enforce policies and log all activity.Connecting via the Desktop App (Transparent Proxy)
Transparent proxy mode is only supported on macOS. The Formal network
extension must be installed (
formal transparent-proxy install) before use.mcp-resource-name with the name of your MCP resource in Formal.
Creating an MCP Resource
Connecting without the Desktop App
If your MCP client runs in a cloud environment, route its traffic through a Connector by updating the upstream hostname. Replace the target API hostname with the Connector hostname (and the resource subdomain if using smart routing):- Before:
https://api.githubcopilot.com/mcp - After:
https://<your connector hostname>/mcp
X-Formal-User-Username and X-Formal-User-Password headers to associate
requests with a Formal identity.
Policy Evaluation
Formal supports the following policy evaluation stages for MCP:- Session: Evaluate and enforce policies at connection time
- Request: Evaluate and enforce policies before the request is forwarded
- Response: Evaluate and enforce policies after the response is received
input.mcp is populated when the
request is an MCP tool call. See MCP policy inputs
for the full list of available fields.