mcp-expert — Claude Code subagent: what it does, how to install
Designs and configures Model Context Protocol servers for Claude Code. It prepares ready-to-use JSON manifests for databases, APIs, and file access.
npx claude-code-templates@latest --agent development-tools/mcp-expertWhat mcp-expert does
The subagent handles Model Context Protocol configurations within the claude-code-templates ecosystem. It constructs structured JSON definitions for mcpServers and specifies launch arguments with npx. Working with Read, Write, and Edit tools, it saves manifests directly into cli-tool/components/mcps/.
It builds connectors for relational databases and third-party APIs. For database servers like PostgreSQL, it adds connection limits and SSL switches. For external web services, it sets request limits and timeouts.
The agent stays within the MCP specification and declines unrelated requests. Generated configurations integrate into .mcp.json using the template runner CLI.
What it helps with
- generate JSON server definitions for the Model Context Protocol
- configure API authentication tokens and base URLs via environment variables
- enforce file system access controls with allowed paths and file size limits
- set up connection pooling and timeout values for database connectors
Example prompts for the agent
- Create an MCP configuration file for Stripe with test API keys
- Configure a PostgreSQL MCP server with a connection limit of 10 and SSL enabled
- Set up a filesystem MCP integration restricted to
/tmpand project folders
How to install mcp-expert
1claude-code-templates
npx claude-code-templates@latest --agent development-tools/mcp-expert2Manually: put the files in place
.claude/agents/mcp-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/mcp-expert.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-expert.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-expert
How to install mcp-expert in Claude Code?
Run npx claude-code-templates@latest --agent development-tools/mcp-expert in your terminal to set up the agent.
What does the mcp-expert subagent do?
It writes and optimizes JSON definitions for MCP servers. The subagent sets up authentication, environment variables, and connection safeguards for databases, APIs, and file systems.
Where does mcp-expert save integration files?
It writes files to cli-tool/components/mcps/ using kebab-case names like service-integration.json. You can then install the result into .mcp.json using npx claude-code-templates@latest --mcp="<service-integration>" --yes.