MCP server for delegating tasks to specialized AI assistants in Cursor, Claude, and Gemini
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"sub-agents": {
"env": {
"AGENTS_DIR": "/absolute/path/to/your/agents-folder",
"AGENT_TYPE": "cursor"
},
"args": [
"-y",
"sub-agents-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Bring Claude Code–style sub-agents to any MCP-compatible tool.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@anthropic-ai/claude-code' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
@anthropic-ai/claude-code has an Insecure Temporary File in /copy Command that Enables Response Disclosure and Symlink-Based File Write
The Claude Code `/copy` command wrote responses to a hardcoded, predictable path (`/tmp/claude/response.md`) without UID isolation, randomness, or symlink protection. The file was created world-readable (0644) in a world-traversable directory (0755), allowing any local user to read a privileged user's Claude response, which could contain secrets or credentials. Additionally, because the path was static and predictable, a local attacker could pre-create the directory and plant a symlink at the ex
Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch
Because the hostname huggingface.co was pre-approved as a bare hostname for the WebFetch tool, any path on that domain—including attacker-controlled model repositories—was auto-approved without a permission prompt or being subject to --allowedTools restrictions. An attacker able to inject untrusted content into a Claude Code context could direct it to issue WebFetch requests against attacker-controlled repository files (e.g. /resolve/main/config.json), which HuggingFace counts as downloads serve
Claude Code: Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution
Claude Code used the git worktree `commondir` file when determining folder trust but did not validate its contents. By crafting a repository with a `commondir` file pointing to a path the victim had previously trusted, an attacker could bypass the trust dialog and immediately execute malicious hooks defined in `.claude/settings.json`. Exploiting this required the victim to clone a malicious repository and run Claude Code within it, and for the attacker to know or guess a path the victim had alre
Claude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace
Claude Code's sandbox did not prevent sandboxed processes from creating symlinks pointing to locations outside the workspace. When Claude Code subsequently wrote to a path within such a symlink, its unsandboxed process followed the symlink and wrote to the target location outside the workspace without prompting the user for confirmation. This allowed a sandbox escape where neither the sandboxed command nor the unsandboxed app could independently write outside the workspace, but their combination
Claude Code: Insecure System-Wide Configuration Loading Enables Local Privilege Escalation on Windows
On Windows, Claude Code loaded system-wide default configuration from `C:\ProgramData\ClaudeCode\managed-settings.json` without validating directory ownership or access permissions. Because the `ProgramData` directory is writable by non-administrative users by default and the `ClaudeCode` subdirectory was not pre-created or access-restricted, a low-privileged local user could create this directory and place a malicious configuration file that would be automatically loaded for any user launching
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml / developer-tools
Persistent memory using a knowledge graph
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Manage Supabase projects — databases, auth, storage, and edge functions
Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server.
MCP Security Weekly
Get CVE alerts and security updates for io.github.shinpr/sub-agents-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Bring Claude Code–style sub-agents to any MCP-compatible tool.
This MCP server lets you define task-specific AI agents (like "test-writer" or "code-reviewer") in markdown files, and execute them via Cursor CLI, Claude Code, Codex, or Gemini CLI backends.
Claude Code offers powerful sub-agent workflows—but they're limited to its own environment. This MCP server makes that workflow portable, so any MCP-compatible tool (Cursor, Claude Desktop, Windsurf, etc.) can use the same agents.
Concrete benefits:
sub-agents-skills offers a lightweight alternative.
| sub-agents-mcp | sub-agents-skills | |
|---|---|---|
| Setup | MCP configuration required | Copy skill files to your environment |
| Features | Session management, error handling | Minimal |
| Stability | More robust | Lightweight |
Choose sub-agents-mcp for production use with reliability features. Choose sub-agents-skills for quick setup in Skill-compatible environments.
cursor-agent CLI (from Cursor)claude CLI (from Claude Code)codex CLI (from Codex)gemini CLI (from Gemini CLI — requires GEMINI_API_KEY)Create a folder for your agents and add code-reviewer.md:
# Code Reviewer
Review code for quality and maintainability issues.
## Task
- Find bugs and potential issues
- Suggest improvements
- Check code style consistency
## Done When
- All target files reviewed
- Issues listed with explanations
See Writing Effective Agents for more on agent design.
Pick one based on which tool you use:
For Cursor users:
# Install Cursor CLI (includes cursor-agent)
curl https://cursor.com/install -fsS | bash
# Authenticate (required before first use)
cursor-agent login
For Claude Code users:
# Option 1: Native install (recommended)
curl -fsSL https://claude.ai/install.sh | bash
# Option 2: NPM (requires Node.js 18+)
npm install -g @anthropic-ai/claude-code
Note: Claude Code installs the claude CLI command.
For Codex users:
# Install Codex
npm install -g @openai/codex
For Gemini CLI users:
# Install Gemini CLI
npm install -g @google/gemini-cli
# Set a Gemini API key in the MCP server environment
export GEMINI_API_KEY="your-key"
Note: Set GEMINI_API_KEY — without it the gemini backend won't run (Google is retiring the free OAuth tier on June 18, 2026).
Add this to your MCP configuration file:
Cursor: ~/.cursor/mcp.json
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"sub-age
... [View full README on GitHub](https://github.com/shinpr/sub-agents-mcp#readme)