Skip to main content
MCP (Model Context Protocol) is an open standard for connecting AI agents to external tools and data sources. Mains uses it in two directions: it exposes its own tools to every agent runtime, and it lets you register external servers that agents can call.

Built-in Mains Tools

Mains runs an in-process MCP server and attaches it to every session, so agents can reach into the app itself — no setup, nothing to install.
The review tools are withheld from Codex, whose flow in Mains is code-writing rather than review. CheckPackage is the mirror image: Claude and Copilot guard packages through a pre-tool hook on Bash, so they never need to call it explicitly — Codex and Cursor can’t hook that path, so they get the tool instead.
CommitChanges and CreatePR pick up your commit and PR instructions automatically. When instructions are configured and the agent calls the tool without a message or body, the tool returns those instructions first so the agent can follow them before committing.

Adding an MCP Server

MCP servers are added through the terminal using the Claude Code CLI. Once registered, the server is available to use inside Mains immediately.
After adding, restart your workspace session — Mains picks up the new server and its tools become available to the agent.

Agent Support

Both agent runtimes in Mains can use MCP servers, with some differences in how they discover and invoke tools.

Claude Code

Claude Code loads MCP servers from multiple sources, merged by priority:

GitHub Copilot

Copilot discovers MCP servers registered through the same CLI. Tools are subject to the tool permission rules in Copilot configuration. You can allow or deny specific tools before they execute.
If a server is disconnected when a session starts, its tools won’t be available for that run. Check claude mcp list to verify server status.