subagents-mcp
MCP server that exposes locally signed-in Codex, Gemini, Kimi Code and Claude CLIs and local Ollama models as subagents in Claude Code with no API keys.
At a Glance
MIT-licensed self-hosted MCP server that exposes locally signed-in subscription CLIs and local Ollama models as subagents, with $0 API billing from the tool itself.
Engagement
Available On
Alternatives
Listed Dec 2026
About subagents-mcp
subagents-mcp is an open-source MCP server by Ali Attaran (aattaran) that lets Claude Code and claude.ai message other AI agents through CLIs already signed in on the user's machine. It supports Codex, Gemini (via agy and gemini), Kimi Code, Claude, and local Ollama models such as DeepSeek, Qwen and GLM. The latest release listed is v0.2.0, published 2026-12-02, under the MIT license.
What It Is
subagents-mcp is a Model Context Protocol server that discovers the subscription-backed CLIs and Ollama models available locally and presents them as selectable agents. An MCP client such as Claude Code, Cursor, Antigravity or claude.ai calls three tools: list_agents to see detected agents, send_to_agent to start or continue a conversation, and get_reply to long-poll for the answer. send_to_agent returns a conversation_id immediately, and passing it back resumes the underlying CLI session for multi-turn work. CLIs that are missing, or an Ollama daemon that is not running, are skipped at startup.
Safety and Billing Design
The README says every *_API_KEY variable and GOOGLE_APPLICATION_CREDENTIALS are stripped before any CLI is spawned, so calls use subscription logins rather than API billing. Runners execute in an isolated empty 0700 directory and fail on startup if it is not empty. Tool access is locked down per backend: agy denies all tool permission categories, codex runs with a read-only sandbox, claude runs in plan mode, kimi runs with --plan, and gemini runs with --approval-mode plan. Ollama models are used as read-only chat.
Ways to Connect
- Claude Code over stdio: register with
claude mcp add subagents -- npx -y github:aattaran/subagents-mcp, optionally copying bundled presets into~/.claude/agentsso Gemini and Codex appear in the/agentspicker. - claude.ai custom connector: a built-in single-owner OAuth 2.1 server (dynamic client registration, PKCE, passphrase consent, refresh token rotation, brute-force lockout) is exposed over HTTPS, for example through a Cloudflare Tunnel.
- Local slot proxy (
--proxy): routes selected Claude Code model slots to Gemini or Codex while passing other models through to Anthropic. The README notes this does not work withclaude remote-control. - Static bearer token HTTP mode for non-OAuth MCP clients.
Usage Note
The README advises checking that driving a subscription CLI this way complies with each provider's current terms of service.
Collections
Popular collections
- Charts, Graphs, and Diagrams
Collection by @joemseifi
- Pick Up Where Your Agent Left Off
Collection by @caiovalverde
- Give Your Agent Design Taste
Collection by @linetwk
- UI Design Skills for Coding Agents
Collection by @mayachen
Add subagents-mcp to one of your collections.
Community Discussions
Be the first to start a conversation about subagents-mcp
Share your experience with subagents-mcp, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
MIT-licensed self-hosted MCP server that exposes locally signed-in subscription CLIs and local Ollama models as subagents, with $0 API billing from the tool itself.
- MIT License
- Runs locally via npx or git clone
- Exposes Codex, Gemini (agy/gemini), Kimi Code, Claude CLIs and local Ollama models
- Multi-turn session resume
- Strips *_API_KEY environment variables before spawning CLIs
Capabilities
Key Features
- list_agents, send_to_agent and get_reply MCP tools
- Multi-turn session resume via conversation_id
- Local Ollama models (DeepSeek, Qwen, GLM)
- Kimi Code, Gemini (agy and gemini), Codex and Claude CLI backends
- Strips all *_API_KEY variables before spawning CLIs
- Runs agents in an isolated empty sandbox directory with tools locked down
- Built-in single-owner OAuth 2.1 connector for claude.ai
- Local Claude Code slot proxy (--proxy)
- Static bearer token HTTP mode
- Stdio MCP with bundled /agents presets
