DomedMCPServer builds a FastMCP proxy that scans every tool call on the way in and every tool result on the way out.
Install
Run a Guarded Proxy
Pass a standard MCP server configuration and aDome instance, initialize the proxy, then run it:
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