DOCUMENTATION
Getting Started
From a fresh machine to MCPs in 4 AI CLIs — about 5 minutes.
Prerequisites
- Python 3.9+
- git
- npx + node (for most MCPs from npm)
- uvx (for git MCP from pypi)
- One or more AI CLIs: opencode / codex / cursor / kimi
1. Clone the repo
git clone https://github.com/zjgulai/Agent_mcp.git ~/project/Agent_mcp
cd ~/project/Agent_mcp
python3 -m pip install --user pyyaml tomli tomli_w
2. Set required env vars
Tokens stay in env. Add to your ~/.zshrc:
export GITHUB_TOKEN=ghp_yourtoken
export POSTGRES_CONNECTION_STRING=postgres://user:pass@host:5432/db
export SENTRY_AUTH_TOKEN=...
export FIGMA_API_TOKEN=...
export LINEAR_API_KEY=lin_api_...
Then source ~/.zshrc. Skip env vars you don't need; doctor will just WARN about them.
3. Health check first
./bin/agent-mcp doctor
== schema ==
ok github v0.1.0
...
== binaries ==
ok github -> npx
ok git -> uvx
== env ==
WARN github -> GITHUB_TOKEN (set if you exported it)
...
== client config consistency ==
opencode: 0 managed by agent-mcp (none)
4. Install one MCP to one client
./bin/agent-mcp install context7 --client opencode
[
{
"client": "opencode",
"config": "/Users/you/.config/opencode/opencode.json",
"name": "context7",
"backup": "/Users/you/.config/opencode/opencode.json.bak.20260516T..."
}
]
5. Install all 6 P0 MCPs to all 4 clients
for m in github filesystem context7 playwright sequential-thinking git; do
./bin/agent-mcp install "$m" --client all
done
For kimi this calls kimi mcp add CLI; for others it merges JSON/TOML config files. All four CLIs now see the same 6 MCPs.
6. Verify natively per client
# opencode: read mcp keys from JSON
python3 -c 'import json; d=json.load(open("/Users/you/.config/opencode/opencode.json")); print(list(d["mcp"].keys()))'
# codex: grep mcp_servers from TOML
grep -E "^\[mcp_servers" ~/.codex/config.toml
# cursor: read mcpServers from JSON
python3 -c 'import json; d=json.load(open("/Users/you/.cursor/mcp.json")); print(list(d["mcpServers"].keys()))'
# kimi: native command
kimi mcp list
7. Uninstall is just as clean
./bin/agent-mcp uninstall github --client all
# Anchors are checked — never deletes entries we didn't manage.
Troubleshooting
- WARN env not set — only blocks if you try to use that MCP at runtime; install still succeeds.
- npx slow first call — npm fetches the package on first invocation; later calls are fast.
- uvx missing — install via
brew install uvorpip install uv. - kimi mcp add fails — make sure
kimiCLI is authenticated (kimi --versionshould print).
Next
- The Handbook — every MCP explained, every adapter wired.
- Architecture — single-registry + 4 adapter shapes.