mcp-server-architect — Claude Code subagent: build MCP servers
A subagent that designs and writes MCP servers: tools, transports, sessions, security. Useful when you need a working server, not a sketch.
npx claude-code-templates@latest --agent mcp-dev-team/mcp-server-architectWhat mcp-server-architect does
The subagent walks an MCP server from design to deployment. It studies the domain first, then proposes tool interfaces with JSON Schema validation, annotations (read-only, destructive, idempotent, open-world) and value hints through completion/complete. Transport work follows: JSON-RPC 2.0 over stdio and Streamable HTTP, with an SSE fallback for older clients.
Its standards are spelled out. Code comes in TypeScript with @modelcontextprotocol/sdk (1.10.0 or newer) or in Python with type hints. Sessions get non-deterministic IDs tied to a user identity, and every Streamable HTTP request has its Origin header checked. Caching, connection pooling and multi-region deployment are part of the brief. Logs go to stderr — send them to stdout and the protocol breaks.
The subagent holds Read, Write, Edit and Bash, so it edits files and runs commands on its own. It targets the 2025-06-18 MCP specification; on an older protocol version you will have to discard some of its advice by hand. Without a grasp of JSON-RPC and the session lifecycle, the output is hard to debug.
What it helps with
- lay out a server's tool set with input validation
- run stdio and Streamable HTTP transports side by side
- wire up argument suggestions via
completion/complete - harden sessions and
Originchecks without leaking IDs - keep protocol output and logs on separate streams
Example prompts for the agent
- Design an MCP server for our internal knowledge base: tools, resources, prompts
- Add
completion/completesupport for the arguments of the search tool - Check that the server returns proper errors and keeps logs out of stdout
How to install mcp-server-architect
1claude-code-templates
npx claude-code-templates@latest --agent mcp-dev-team/mcp-server-architect2Manually: put the files in place
.claude/agents/mcp-server-architect.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/mcp-server-architect.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/mcp-server-architect.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about mcp-server-architect
How do I install mcp-server-architect in Claude Code?
Run npx claude-code-templates@latest --agent mcp-dev-team/mcp-server-architect, then confirm the file .claude/agents/mcp-server-architect.md is in place.
What does mcp-server-architect do?
It is an MCP server architect subagent. It designs tools and resources, writes transports, sets up sessions and keeps the implementation aligned with the specification.
Which tools can the subagent use?
Read, Write, Edit and Bash. That is enough to create server files and run a build or tests while it works.