| name | add-mcp |
| description | Add an MCP server to the project and sync to all AI tools |
| argument-hint | <name> <url-or-command> |
Add MCP Server
Add a new MCP server to .mcp.json (the single source of truth) and sync to all AI tool configs.
Steps
-
Parse the arguments: $ARGUMENTS
- Format:
<name> <url> for HTTP servers (e.g. homeassistant http://homeassistant.local/api/mcp)
- Format:
<name> <command> [args...] for stdio servers (e.g. mcp-nixos uvx mcp-nixos)
- If arguments are missing or ambiguous, ask the user.
-
Read the current .mcp.json from the repo root.
-
Add the new server entry:
- For URLs (starts with
http:// or https://): {"type": "http", "url": "<url>"}
- For commands (anything else):
{"command": "<command>", "args": ["<remaining args>"]}
-
Write the updated .mcp.json.
-
Regenerate and validate the Codex adapter:
python3 scripts/generate-ai-adapters.py
python3 scripts/generate-ai-adapters.py --check
-
Report what was added and remind the user to start new Claude Code and Codex
sessions for the new project MCP server to take effect.