MCP (Model Context Protocol) is an open standard for connecting AI agents to external tools and data sources. Mains supports MCP for the Claude Code and GitHub Copilot agent runtimes — add a server once from your terminal, and both agents can use it.Documentation Index
Fetch the complete documentation index at: https://docs.mains.dev/llms.txt
Use this file to discover all available pages before exploring further.
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.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:| Source | Path |
|---|---|
| User (global) | ~/.claude/settings.json |
| Project (shared) | .{your_project}/settings.json |
| Local (personal) | .{your_project}/settings.local.json |
GitHub Copilot
Copilot discovers MCP servers registered through the same CLI. Tools are subject to the tool permission rules configured in Copilot’s config screen. You can allow or deny specific tools before they execute.Popular Servers
| Server | Install Command | Description |
|---|---|---|
| GitHub | claude mcp add github -- npx -y @modelcontextprotocol/server-github | Issues, PRs, repos |
| Slack | claude mcp add slack -- npx -y @anthropic-ai/mcp-server-slack | Channels, messages |
| Linear | claude mcp add linear -- npx -y @linear/mcp-server | Issues, projects |
| Filesystem | claude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path | Local file access |
| Postgres | claude mcp add db -- npx -y @modelcontextprotocol/server-postgres $DATABASE_URL | Database queries |
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.