MCP Builder Skill logo

MCP Builder Skill

Visit

Anthropic's official guide for creating high-quality MCP (Model Context Protocol) servers in Python (FastMCP) or Node/TypeScript to enable LLMs to interact with external services.

Share:

Overview

MCP Builder Skill is one of Anthropic's official Claude Skills, designed to guide the creation of high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. This comprehensive skill provides a complete framework for building MCP servers in either Python (using FastMCP) or Node/TypeScript (using the MCP SDK).

The skill includes extensive documentation, best practices, and a structured four-phase development process that covers everything from research and planning through implementation, testing, and evaluation creation. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.

Core Features

1. Modern MCP Design Principles

Comprehensive guidance on:

  • API Coverage vs. Workflow Tools: Balancing comprehensive endpoints with specialized workflows
  • Tool Naming & Discoverability: Clear, descriptive naming with consistent prefixes
  • Context Management: Concise descriptions and focused, relevant data
  • Actionable Error Messages: Guidance toward solutions with specific suggestions

2. Four-Phase Development Process

Phase 1: Deep Research and Planning

  • Understanding modern MCP design patterns
  • Studying MCP protocol documentation
  • Learning framework-specific patterns
  • Planning implementation strategy

Phase 2: Implementation

  • Project structure setup
  • Core infrastructure (API client, error handling, pagination)
  • Tool implementation with proper schemas
  • Support for output schemas and structured content

Phase 3: Review and Test

  • Code quality review (DRY, error handling, types)
  • Build verification
  • Testing with MCP Inspector
  • Language-specific quality checks

Phase 4: Create Evaluations

  • 10 complex, realistic evaluation questions
  • Read-only, verifiable test cases
  • XML format for automated testing

3. Comprehensive Documentation Library

Includes access to:

  • MCP Protocol Specification: Complete protocol documentation
  • Best Practices Guide: Universal MCP guidelines
  • Python Guide: Complete FastMCP implementation patterns
  • TypeScript Guide: Complete MCP SDK implementation patterns
  • Evaluation Guide: Creating effective test cases

4. Tool Implementation Best Practices

Guidance on creating tools with:

  • Input Schemas: Using Zod (TypeScript) or Pydantic (Python)
  • Output Schemas: Structured data definitions for client processing
  • Descriptions: Concise summaries with parameter documentation
  • Annotations: readOnlyHint, destructiveHint, idempotentHint, openWorldHint
  • Error Handling: Actionable messages with specific guidance

5. Framework Support

Complete support for both ecosystems:

  • TypeScript: MCP SDK with streamable HTTP or stdio transport
  • Python: FastMCP with streamable HTTP or stdio transport

Use Cases

  • API Integration: Connect LLMs to external services (GitHub, Slack, databases)
  • Custom Tools: Build specialized tools for internal systems
  • Data Access: Enable LLMs to query and retrieve external data
  • Service Orchestration: Coordinate multiple external services
  • Workflow Automation: Create high-level workflow tools for common tasks

Technical Implementation

  • Language: TypeScript (recommended for compatibility and AI code generation)
  • Transport: Streamable HTTP for remote servers, stdio for local servers
  • Stateless JSON: Simpler to scale and maintain

Python Implementation

  • Framework: Python SDK / FastMCP
  • Schema Validation: Pydantic models
  • Tool Registration: @mcp.tool decorator
  • Error Handling: Python exception patterns

TypeScript Implementation

  • Framework: MCP SDK
  • Schema Validation: Zod schemas
  • Tool Registration: server.registerTool
  • Structured Content: Modern SDK feature for rich responses

Development Workflow

  1. Research Phase: Study MCP docs, framework docs, and API documentation
  2. Planning Phase: Select tools to implement, design schemas
  3. Implementation Phase: Build server infrastructure and tools
  4. Testing Phase: Verify with MCP Inspector, check quality
  5. Evaluation Phase: Create 10 realistic test questions

Quality Standards

The skill ensures servers meet high quality bars:

  • No duplicated code (DRY principle)
  • Consistent error handling
  • Full type coverage
  • Clear, concise tool descriptions
  • Comprehensive API coverage
  • Actionable error messages
  • Proper annotations

Evaluation Creation

Includes detailed guide for creating effective evaluations:

  • 10 complex, multi-step questions
  • Read-only operations only
  • Independent, verifiable answers
  • Stable over time
  • Based on real use cases
  • XML format for automation

Reference Documentation

The skill provides access to:

  • MCP Protocol Specification (from modelcontextprotocol.io)
  • MCP Best Practices (mcpbestpractices.md)
  • TypeScript Implementation Guide (nodemcpserver.md)
  • Python Implementation Guide (pythonmcpserver.md)
  • Evaluation Guide (evaluation.md)

Summary

MCP Builder Skill is the authoritative guide for creating high-quality MCP servers that enable LLMs to interact effectively with external services. Through comprehensive documentation, structured processes, and best practices for both Python and TypeScript implementations, this skill ensures MCP servers are well-designed, thoroughly tested, and enable LLMs to accomplish real-world tasks efficiently.

Comments

No comments yet. Be the first to comment!