Sub-AgentsSAFE
Define task-specific AI sub-agents in Markdown for any MCP-compatible tool.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/sub-agents-mcp) [](https://opensource.org/licenses/MIT)
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
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 steps
The 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 authenticati
53d7599d9b89OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add sub-agents-mcp --env CURSOR_API_KEY=${CURSOR_API_KEY} --env CLI_API_KEY=${CLI_API_KEY} -- npx -y [email protected]Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
agent1 | read | First agent |
agent2 | read | Second agent |
test-agent | read | Test agent |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (8)
'~/.ssh/id_rsa',
'/etc/passwd',
import { ServerConfig } from '../../config/ServerConfig.js'import { McpServer } from '../../server/McpServer.js'import type { ServerConfig } from '../../config/ServerConfig.js'import { McpServer } from '../../server/McpServer.js'import { ServerConfig } from '../../config/ServerConfig.js'@modelcontextprotocol/sdk, @biomejs/biome, @types/node, @vitest/ui, dpdm, husky, knip, lint-staged
Gates applied: no_behavioural_pass.
53d7599d9b89full audit observations/trust-audit/mcp-server/shinpr__sub-agents.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 53d7599d9b89 | SAFE | B | 89 | first audit |
Questions
What is the Sub-Agents MCP server?
Define task-specific AI sub-agents in Markdown for any MCP-compatible tool.
What tools does Sub-Agents expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Sub-Agents safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Sub-Agents need?
It reads CLI_API_KEY and CURSOR_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Sub-Agents run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as sub-agents-mcp at 0.14.2.
How current is this page?
The grade is for one exact copy of the source (53d7599d9b89), read on 2026-10-07. The repository is watched and re-audited when it changes.