Skip to main content
Dome can protect Model Context Protocol traffic by running as a proxy in front of one or more MCP servers. Every call passes through your Guardrails before it reaches the server. DomedMCPServer builds a FastMCP proxy that scans every tool call on the way in and every tool result on the way out.

Install

See Install Dome for the other extras.

Run a Guarded Proxy

Pass a standard MCP server configuration and a Dome instance, initialize the proxy, then run it:
Call domed_server.run() without arguments to serve over stdio.

Constructor Options

When a Guard blocks a call, the proxy returns a result carrying the blocked message along with the blocked_by_guardrails and guardrail_message fields, rather than raising an error at the client.

Configure the Guards for a Proxy

The direction of protection is inverted compared with an Agent:
  • The input Guardrail protects the MCP server from risky model output, so it should carry the Guards you would normally use on Agent output.
  • The output Guardrail protects the calling model from server responses, so it should include the prompt injection Detectors that catch payloads embedded in tool results.

Next Steps

Configure Guardrails

Build the configuration the proxy loads

Trust Runtime

Identity-bound tool permissions inside the Agent
Last modified on August 12, 2026