r/ChatGPTCoding • • 18h ago

Resources And Tips Open source MCP server to use Gemini, Codex, and Claude subscriptions together without API bills

After I made deepclaude to cut Claude Code API costs, I kept running into a simpler annoyance. I already pay for Google AI, ChatGPT, and Claude subscriptions every month, and I did not want separate per token API bills just to ask Gemini or Codex for a second opinion inside Claude.

So I put together subagents-mcp: https://github.com/aattaran/subagents-mcp

It wraps your locally logged in agy (Gemini), codex, and claude CLIs behind standard MCP tools (list_agents, send_to_agent, reset_thread). It runs over stdio for Claude Code, and also has a built in single owner OAuth 2.1 Streamable HTTP server so you can hook it up as a custom connector in claude.ai on desktop and iPhone.

Before spawning any CLI, it strips all API key env vars and GOOGLE_APPLICATION_CREDENTIALS so it cannot quietly fall back to API billing. Headless runs stay read only inside an empty 0700 directory (on agy 1.5.20 I had to pin all 7 wildcard deny rules in session settings because request-review alone still let sir_flash_lite auto approve routine commands). It also keeps multi turn threads alive via each CLI's native resume flag.

There is also a local /v1/messages proxy for the local Claude Code CLI, though Claude Code 2.1.331 now blocks custom ANTHROPIC_BASE_URL in remote-control, which is why claude.ai goes through MCP instead.

MIT licensed, with an isolated network=none Docker test suite. Curious what other subscription CLIs people would want supported next.

1 Upvotes

0 comments sorted by