Add any remote MCP server that isn’t in the Catalog, then route its traffic through Formal to control and log what AI agents do with it:The rule matches known agents only.
See Identity headers.Cloud agents such as Claude, ChatGPT, and Cursor Cloud Agents don’t run the Endpoint.
Point them at this server’s Connector address, See MCP resources for
- Block risky tools, such as
delete_record. - Mask emails and phone numbers in
search_recordsresponses. - Keep credentials at the Connector, so users and agents never see them.
- Log every tool call with the user, MCP client, and parameters.
0. Prepare your Connector
The Connector needs an MCP listener and a hostname with wildcard DNS and TLS. Set them up once by following Deploy the Connector. Every MCP server reuses them.1. Add your custom MCP server to your Resources
- UI
- Terraform
- Pulumi
- API
- Go to the Admin Catalog and click Add MCP.
- Click Add Custom.
- Paste
https://mcp.internal.example.com/mcpinto URL. - Enter
internal-toolsin Name. Formal uses it as the server’s subdomain on the Connector. - Choose the Space containing your Connector.
- Choose Authentication, then click Add to Catalog.
2. Setup Authentication
Choose which credential Formal sends to the server. See Upstream authentication for details.- Linked Accounts
- Pass Through
Each user links their own OAuth account once. Formal stores the token encrypted and refreshes it when the server supports refresh.
The Connector adds the token to requests after policies allow them. Users never see the token.Formal’s app uses an app registered with the provider, when available. Otherwise, it can use a Client ID Metadata Document (CIMD) when supported.
For CIMD, the server’s authorization server must advertise
client_id_metadata_document_supported: true.
It must support authorization code with PKCE S256 and public clients with token endpoint authentication none.Formal checks the server when you save. If neither option works, register your own OAuth app with the provider.
Add the Catalog’s Redirect URI to its allowed redirects. Then enter the app’s Client ID and optional Client secret.3. Route Endpoint traffic
Auth is managed at the Connector with Linked Accounts or Shared Credentials. The Endpoint forwards MCP traffic to it. Laptops and VMs with the Formal Endpoint keep usinghttps://mcp.internal.example.com/mcp.
A network rule sends that traffic to the Connector.- UI
- Terraform
- Pulumi
- API
- Go to Network Rules and create a rule named
internal-tools-mcp. - Paste this expression, set the rule to Active, then save:
https://internal-tools.<connector-hostname>/mcp.
Find it in the Admin Catalog: open Internal Tools, then copy Connector address on Configuration.4. Create policies
Use the tool names your MCP server exposes when you write policies.Policies examples
- Block a tool
- Mask a tool's output
This policy blocks tools that change data, so agents can only read Internal Tools.
input.mcp fields and Rewrite Action for body rewrites.5. Check the logs
Open Logs and search forresource.name:internal-tools.
Each tool call is one request log with the user, MCP client, and tool.
Open a log to see its tool parameters and the policies it triggered.
A blocked write shows the block policy and its message.
A masked search shows the rewrite policy.See Logs for search syntax and filters.Troubleshooting
The agent says Formal has no current sign-in
The agent says Formal has no current sign-in
The agent says this server has no current sign-in. Link or re-link your account in Formal.Cause: You never linked an account, or its token expired and could not be refreshed.Fix: Open the server in the Employee Catalog and link your account again.
The server rejected your credentials
The server rejected your credentials
The agent says the server rejected your credentials. Link or re-link your account in Formal.Cause: The server no longer accepts the linked token, for example after access was revoked.Fix: Link your account again from the Employee Catalog.With Shared Credentials, replace the credential on the server’s Shared Credentials configuration.
Laptop traffic doesn't appear in Logs
Laptop traffic doesn't appear in Logs
Cause: The Endpoint isn’t running, or the network rule doesn’t match the client.Fix: Check that the Endpoint is connected. The rule only matches known agents.
Other clients reach
mcp.internal.example.com directly unless the rule also matches them.
See Network rules.MCP clients can't connect directly yet
MCP clients can't connect directly yet
Cause: The Configuration tab lists the reason, often
No Connector is in this server's Space.Fix: Edit the server and choose the Space containing your Connector.The server has no Connector address
The server has no Connector address
Cause: The server name isn’t a valid DNS label.Fix: Recreate the server with a valid DNS-label name.
Next Steps
MCP Gateway
Configure Connector routing and downstream access
All MCP servers
Browse every MCP server template