All skills
Skillintermediate
/mcp:build-mcp - Custom MCP Server Development
Comprehensive guide for creating high-quality MCP servers that enable LLMs to interact with external services through well-designed tools.
Claude Code Knowledge Pack7/10/2026
Overview
/mcp:build-mcp - Custom MCP Server Development
Comprehensive guide for creating high-quality MCP servers that enable LLMs to interact with external services through well-designed tools.
- Purpose - Build custom MCP servers for any service or API
- Output - Production-ready MCP server with tools and evaluations
/mcp:build-mcp
When to Build Custom MCP Servers
Build an MCP server when you need the LLM to:
- Interact with internal company APIs or services
- Access databases or data sources not available via existing MCP servers
- Integrate with third-party services (CRMs, project management, communication tools)
- Perform specialized operations unique to your domain
How It Works
The command guides you through a four-phase development process:
Phase 1: Deep Research and Planning
-
Agent-Centric Design Principles
- Build workflow tools, not just API wrappers
- Optimize for limited context windows
- Design actionable error messages
- Follow natural task subdivisions
-
Protocol Study: Load MCP specification from
modelcontextprotocol.io -
Framework Selection:
- Python with FastMCP for rapid development
- TypeScript with MCP SDK for type safety
-
API Research: Exhaustively study the target API documentation
-
Implementation Planning:
- Tool selection and prioritization
- Shared utilities design
- Input/output schema design
- Error handling strategy
Phase 2: Implementation
- Project Structure: Set up according to language-specific best practices
- Core Infrastructure: Build shared utilities first (API helpers, error handling, formatting)
- Tool Implementation: Systematically implement each planned tool
- Annotations: Add proper tool hints (readOnly, destructive, idempotent)
Phase 3: Review and Refine
- Code Quality Review: DRY principle, composability, consistency
- Testing: Verify syntax and imports (note: MCP servers are long-running, use evaluation harness)
- Quality Checklist: Language-specific verification
Phase 4: Create Evaluations
- Tool Inspection: Understand available capabilities
- Content Exploration: Use read-only operations to explore data
- Question Generation: Create 10 complex, realistic evaluation questions
- Answer Verification: Verify each answer is correct and stable
Usage Examples
# Start building an MCP server
> /mcp:build-mcp
# The command will guide you through:
# 1. Understanding your integration requirements
# 2. Choosing Python or TypeScript
# 3. Designing tools for your use case
# 4. Implementing with best practices
# 5. Testing and evaluation