Skip to main content
TL;DR: DomedMCPServer proxies a Model Context Protocol (MCP) tool server and runs Dome Guardrails on every tool call. Build it with your server config and a Dome instance, await its initialize(), then run() it.
This page is about protecting third-party MCP tool servers your Agent connects to. It is not the same as Vijil’s own Console MCP server, which lets an assistant drive the Vijil Console. That server is documented separately.
Install the MCP extra:

Wrapping an MCP Server

DomedMCPServer builds a FastMCP proxy in front of your MCP server and inserts input and output Guard middleware around each tool call.
initialize() builds the proxy and must be called before run(). Supported transports are stdio, http, sse, and streamable-http. DomedMCPServer accepts optional server_name, tool_call_input_block_message, tool_call_output_block_message, and enforce (default True).
Input Guards protect the wrapped server from malicious content coming in with a tool call. Output Guards protect the downstream Agent from malicious content coming out of the tool. Place prompt-injection Guards in your output Guards, since injected instructions typically arrive in tool results.
When a tool call is flagged in enforce mode, the proxy returns a schema-valid placeholder result marked with blocked_by_guardrails=True and a guardrail_message, instead of the real tool output.

Secure Proxies with Obot

To route your servers through a secure MCP gateway, use ObotClient to generate a gateway config, then wrap it with Dome. This requires an Obot deployment.
create_secure_mcp_config() takes a {"mcpServers": {...}} config and returns a new one whose entries route through Obot connect URLs over the streamable_http transport.

Next Steps

Configure Guardrails

Choose which Guards run on tool calls

Console MCP Server

Drive the Vijil Console from an assistant
Last modified on July 16, 2026