MCP
Model Context Protocol servers give agents runtime access to the outside world — databases, APIs, filesystems, SaaS tools. Register a server once and its tools are callable from any agent session. agi-cli handles registration and writes the config into each agent's own settings format.
Add a server
Servers come in two shapes: a local process (stdio) or a remote endpoint (HTTP).
# stdio — a local command the agent spawns
agents mcp add notion uvx notion-mcp --agents claude,codex
# http — a remote MCP endpoint
agents mcp add my-api https://api.example.com --transport http --agents claudeAdding a server writes it to the manifest; apply it to your agents' config with register:
agents mcp register # apply manifest servers to agent config files
agents mcp list # what's registered + which agents it's synced to
agents mcp view notion # show a server's command, scope, and targetsProject-scoped servers need trust
A project can ship its own servers in ./.agents/mcp/. For safety they don't auto-run — you opt in per project:
agents mcp trust # allow this project's .agents/mcp/ servers to register & spawn
agents mcp untrust # revoke itHow it syncs
MCP is the one resource that is not symlinked. Each agent stores its server list in its own settings file with its own key shape, so agi-cli writes the config directly into each agent rather than linking a shared file. Nearly every supported agent can receive MCP servers; agi-cli only writes them to the agents that support it.
Related
- Skills — domain knowledge that often pairs with an MCP server's tools.
- Permissions — gate which MCP tools an agent may call.
- Secrets — inject the API keys an MCP server needs, without plaintext on disk.