The AI Rules Tool supports generating Model Context Protocol (MCP) configurations for compatible AI coding agents. MCP enables AI agents to connect to external tools and services.
Create ai-rules/mcp.json with your MCP server configurations:
{
"mcpServers": {
"server-name": {
"command": "executable-command",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "${use_environment_variable}"
}
},
"remote-server-name": {
"type": "http",
"url": "https://api.example.com/mcp"
}
}
}Run ai-rules generate to automatically create agent-specific MCP configurations.
See the Supported Agents table for which agents support MCP and their generated file locations:
| Agent | MCP File Location |
|---|---|
| Claude Code | .mcp.json |
| Codex | .codex/config.toml |
| Cursor | .cursor/mcp.json |
| Firebender | firebender.json (generated when MCP and/or overlay config exists) |
| Gemini | Embedded in .gemini/settings.json |
| Roo | .roo/mcp.json |