$git clone https://github.com/1mcp-app/agent1MCP is the unified MCP runtime. 1mcp serve aggregates your MCP servers, and CLI mode adds a thinner agent-facing workflow for Codex, Claude, Cursor, and similar tool-using agents.
| 1 | # 1MCP |
| 2 | |
| 3 | [](https://www.npmjs.com/package/@1mcp/agent) |
| 4 | [](https://www.npmjs.com/package/@1mcp/agent) |
| 5 | [](https://github.com/1mcp-app/agent/actions/workflows/github-code-scanning/codeql) |
| 6 | [](https://github.com/1mcp-app/agent/stargazers) |
| 7 | [](https://docs.1mcp.app) |
| 8 | [](https://deepwiki.com/1mcp-app/agent) |
| 9 | [](https://www.npmjs.com/package/@1mcp/agent) |
| 10 | |
| 11 | 1MCP is the unified MCP runtime. `1mcp serve` aggregates your MCP servers, and CLI mode adds a thinner agent-facing workflow for Codex, Claude, Cursor, and similar tool-using agents. |
| 12 | |
| 13 | ## Why 1MCP |
| 14 | |
| 15 | Most MCP setups eventually hit two kinds of sprawl: |
| 16 | |
| 17 | - Configuration sprawl: every client needs its own MCP wiring, auth choices, and filtering rules. |
| 18 | - Agent sprawl: autonomous sessions carry too many tools and schemas into context up front. |
| 19 | |
| 20 | 1MCP addresses both: |
| 21 | |
| 22 | - `1mcp serve` gives you one aggregated runtime in front of many MCP servers. |
| 23 | - CLI mode lets agents discover tools progressively with `instructions`, `inspect`, and `run`. |
| 24 | - Static servers can load at startup, while template servers are created from per-client or per-session context. |
| 25 | - Presets, filters, and instruction aggregation keep the same runtime adaptable across clients and projects. |
| 26 | |
| 27 | | Approach | Best for | Tradeoff | |
| 28 | | ---------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | |
| 29 | | 1MCP CLI mode | Codex, Claude, agent loops | Requires a running `1mcp serve` instance | |
| 30 | | 1MCP stdio proxy | Maximum compatibility across clients | Still depends on `serve`, and auth-capable HTTP clients have a more direct path | |
| 31 | | Direct streamable HTTP | MCP-native HTTP clients | No project context, no `.1mcprc`, and a broader tool surface is exposed directly | |
| 32 | | Custom proxying | One-off compatibility shims | You own discovery, filtering, auth, and runtime lifecycle | |
| 33 | |
| 34 | ## Quick Start for Agent Users |
| 35 | |
| 36 | This page is optimized for AI agent users. The 5-minute outcome is simple: start a real `1mcp serve` runtime, connect your agent with `cli-setup`, then verify the `instructions -> inspect -> run` workflow. |
| 37 | |
| 38 | Install 1MCP, add one upstream server, and start the runtime: |
| 39 | |
| 40 | ```bash |
| 41 | npm install -g @1mcp/agent |
| 42 | 1mcp mcp add context7 -- npx -y @upstash/context7-mcp |
| 43 | 1mcp serve |
| 44 | ``` |
| 45 | |
| 46 | In a second shell, connect your agent to CLI mode: |
| 47 | |
| 48 | ```bash |
| 49 | 1mcp cli-setup --codex |
| 50 | # or |
| 51 | 1mcp cli-setup --claude --scope repo --repo-root . |
| 52 | ``` |
| 53 | |
| 54 | Then verify the agent workflow: |
| 55 | |
| 56 | ```bash |
| 57 | # shell 1 |
| 58 | 1mcp serve |
| 59 | |
| 60 | # shell 2 |
| 61 | 1mcp instructions |
| 62 | 1mcp inspect context7 |
| 63 | 1mcp inspect context7/query-docs |
| 64 | 1mcp run context7/query-docs --args '{"libraryId":"/mongodb/docs","query":"aggregation pipeline"}' |
| 65 | ``` |
| 66 | |
| 67 | If you want the full walkthrough (with success criteria and off-ramps), use the [Quick Start guide](https://docs.1mcp.app/guide/quick-start). |
| 68 | |
| 69 | For a given agent, choose one mode only. If you switch that agent to CLI mode, remove its old direct MCP configuration first. |
| 70 | |
| 71 | ## Why CLI Mode Exists |
| 72 | |
| 73 | CLI mode is the primary workflow for agent-style sessions. It keeps MCP as the backend protocol but narrows what the agent sees at each step: |
| 74 | |
| 75 | - `instructions` explains the current runtime and recommended flow |
| 76 | - `inspect` lets the agent discover only the server or tool it needs |
| 77 | - `run` executes one |