Sub-Agents MCP Server
Provides integration with Google Antigravity and Gemini CLI as backends for running coding agents on Google models. The MCP server can use the Antigravity CLI (agy) or Gemini CLI, with Antigravity preferred for Google models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sub-Agents MCP ServerUse the code-reviewer agent to review the auth changes."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sub-Agents MCP Server
Run reusable coding agents from any MCP-compatible client.
Write a reviewer, test writer, or investigator in Markdown, then ask your assistant to use it. The MCP server runs that agent with the coding CLI you choose and returns the result to the same conversation.
What You Can Do
Delegate code review, test writing, investigation, and documentation to focused agents
Reuse the same agent definitions across MCP clients with one shared backend and model configuration
Continue the same agent across multiple calls for longer work
Related MCP server: Codex Harness MCP
Quick Start
You need Node.js 22 or later, an MCP-compatible client, and one supported coding CLI installed and signed in. This example uses Codex.
1. Create an Agent
Create an agents folder anywhere on your machine, then add code-reviewer.md:
# Code Reviewer
Review code for bugs and maintainability issues.
## Task
- Find concrete problems in the requested changes
- Explain why each problem matters
- Point to the affected code
## Done When
- All requested files have been reviewed
- Findings include evidence and suggested next stepsThe filename becomes the agent name: code-reviewer.md becomes code-reviewer.
2. Add the MCP Server
Add the server to your client's MCP configuration. Replace AGENTS_DIR with the absolute path to the folder you created.
{
"mcpServers": {
"sub-agents": {
"command": "npx",
"args": ["-y", "sub-agents-mcp"],
"env": {
"AGENTS_DIR": "/absolute/path/to/agents",
"AGENT_TYPE": "codex"
}
}
}
}Restart or reconnect your MCP client after saving the configuration.
3. Run the Agent
Ask your assistant:
Use the code-reviewer agent to review the authentication changes.Your assistant runs the agent with Codex and returns the review to the conversation.
Examples
Use the test-writer agent to add unit tests for the auth module.Use the bug-investigator agent to find the cause of the failed checkout requests.Use the doc-writer agent to document the public API changes.Name both the agent and the work you want it to do.
When the MCP Server Fits
Use the MCP server when you want to share the same agents across MCP clients while keeping backend and model configuration in one place.
If you prefer a lighter installation or want each agent to choose its own backend and model, see Sub-Agents Skills.
Supported Backends
Set AGENT_TYPE to the backend you already use:
| Backend | Command |
| Codex |
|
| Claude Code |
|
| Cursor CLI |
|
| Command Code |
|
| GLM (Z.ai) |
|
| Kimi |
|
| Grok Build |
|
| Google Antigravity |
|
| Gemini CLI (compatibility) |
|
| OpenCode |
|
The selected CLI must be installed and configured before the MCP server starts.
GLM and Kimi require CLI_API_KEY in the MCP server environment. Other backends use the CLI's existing authentication.
For Google models, prefer Antigravity. Gemini CLI remains available for existing enterprise, API key, or Vertex AI configurations.
Shared Agent Settings
Set AGENT_MODEL to use one model for every agent. Omit it to use the backend's default.
AGENT_PERMISSION controls what agents may do:
read-only— review and investigationsafe-edit— edits allowed without approval (default)yolo— unrestricted execution
If an agent reports that an action was blocked, choose a less restrictive mode.
Continue Work Across Calls
Set SESSION_ENABLED to "true" when you want an agent to remember earlier calls and continue a longer task. Your assistant must reuse the returned session_id on the next call to continue that session.
If It Does Not Start
Run the selected backend command directly and confirm that it is installed and signed in
Make sure
AGENTS_DIRis an absolute path and contains at least one.mdor.txtfileRestart or reconnect the MCP client after changing its configuration
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Scoped agent execution. Server-side credentials, policy, budgets and verifiable receipts.
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Claude Code to delegate coding tasks to the local Cursor Agent CLI, with persistent per-workspace sessions that resume across calls.12 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI clients to invoke CLI-driven agent tools over Streamable HTTP, including shell execution, file operations, patching, image viewing, web search, and nested agent tasks, with permission modes and real-time progress streaming.-
- AlicenseBqualityBmaintenanceEnables any MCP host to delegate work to multiple coding-agent CLIs such as Codex, Claude Code, and Antigravity as subagents, preserving native sessions and supporting team-based supervision and agent-to-agent messaging.1712 npmApache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables users to define reusable Markdown-based coding sub-agents and run them through any MCP-compatible client with a chosen coding CLI backend, returning results to the same conversation.312 npmMIT