Official agent skill

MCP Server Builder

by anthropics in anthropics/skills

Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

OfficialApache-2.0Auto-check passedAgent Workflows

Install MCP Server Builder

skills CLI
$ npx skills add anthropics/skills --skill mcp-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install anthropics/skills mcp-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/anthropics/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mcp-builder .claude/skills/mcp-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-builder
GitHub stars
180k
Used in
64 other repos
Token cost
~2.3k tokens
SKILL.md length
920 words
Files
10 (incl. scripts)
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

  • Works in 4 steps: Deep Research and Planning → Implementation → Review and Test → …
  • Wrapping a third-party API as an MCP server
  • SKILL.md covers Overview, 🚀 High-Level Workflow and 📚 Documentation Library
  • Runs Python scripts from its folder; calls npm, npx and python; reaches raw.githubusercontent.com and modelcontextprotocol.io

What it does

MCP Builder is a development guide for servers that let a language model call an external API or service through tools. It begins with research and planning: weighing broad API coverage against task-specific workflow tools, naming tools with consistent prefixes, returning focused data that can be filtered or paginated, and writing error messages that tell the agent what to try next.

It points the agent to the MCP specification pages and recommends TypeScript with the official SDK, streamable HTTP with stateless JSON for remote servers and stdio for local ones, while Python with FastMCP is covered as the alternative. Reference notes for Node and Python servers, best practices and evaluation ship with it, along with scripts for building and running an evaluation set.

When your agent uses it

  • Wrapping a third-party API as an MCP server
  • Deciding which tools an MCP server should expose
  • Choosing between stdio and streamable HTTP transport
  • Writing evaluations to check how well agents use a server

Example prompts

  • “Build an MCP server for our internal ticketing API in TypeScript.”
  • “Review the tool names and descriptions in my FastMCP server.”
  • “Create an evaluation for the GitHub MCP server we just wrote.”

Requirements

  • Node.js with TypeScript, or Python with FastMCP
  • Access to the API the server will wrap

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Deep Research and Planning
  2. Implementation
  3. Review and Test
  4. Create Evaluations

What it can do on your machine

Read from SKILL.md and the folder at commit 683bc88. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • npm
    • npx
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com
    • modelcontextprotocol.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Server Builder loads about 2.3k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 920 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from anthropics/skills at commit 683bc88, republished under its Apache-2.0 licence (© anthropics). 920 words, ~2,267 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-builder/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
mcp-builder
description
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
license
Complete terms in LICENSE.txt

MCP Server Development Guide

Overview

Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.


Process

🚀 High-Level Workflow

Creating a high-quality MCP server involves four main phases:

Phase 1: Deep Research and Planning
1.1 Understand Modern MCP Design

API Coverage vs. Workflow Tools: Balance comprehensive API endpoint coverage with specialized workflow tools. Workflow tools can be more convenient for specific tasks, while comprehensive coverage gives agents flexibility to compose operations. Performance varies by client—some clients benefit from code execution that combines basic tools, while others work better with higher-level workflows. When uncertain, prioritize comprehensive API coverage.

Tool Naming and Discoverability: Clear, descriptive tool names help agents find the right tools quickly. Use consistent prefixes (e.g., github_create_issue, github_list_repos) and action-oriented naming.

Context Management: Agents benefit from concise tool descriptions and the ability to filter/paginate results. Design tools that return focused, relevant data. Some clients support code execution which can help agents filter and process data efficiently.

Actionable Error Messages: Error messages should guide agents toward solutions with specific suggestions and next steps.

1.2 Study MCP Protocol Documentation

Navigate the MCP specification:

Start with the sitemap to find relevant pages: https://modelcontextprotocol.io/sitemap.xml

Then fetch specific pages with .md suffix for markdown format (e.g., https://modelcontextprotocol.io/specification/draft.md).

Key pages to review:

  • Specification overview and architecture
  • Transport mechanisms (streamable HTTP, stdio)
  • Tool, resource, and prompt definitions
1.3 Study Framework Documentation

Recommended stack:

  • Language: TypeScript (high-quality SDK support and good compatibility in many execution environments e.g. MCPB. Plus AI models are good at generating TypeScript code, benefiting from its broad usage, static typing and good linting tools)
  • Transport: Streamable HTTP for remote servers, using stateless JSON (simpler to scale and maintain, as opposed to stateful sessions and streaming responses). stdio for local servers.

Load framework documentation:

For TypeScript (recommended):

  • TypeScript SDK: Use WebFetch to load https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md
  • ⚡ TypeScript Guide - TypeScript patterns and examples

For Python:

  • Python SDK: Use WebFetch to load https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md
  • 🐍 Python Guide - Python patterns and examples
1.4 Plan Your Implementation

Understand the API: Review the service's API documentation to identify key endpoints, authentication requirements, and data models. Use web search and WebFetch as needed.

Tool Selection: Prioritize comprehensive API coverage. List endpoints to implement, starting with the most common operations.


Phase 2: Implementation
2.1 Set Up Project Structure

See language-specific guides for project setup:

2.2 Implement Core Infrastructure

Create shared utilities:

  • API client with authentication
  • Error handling helpers
  • Response formatting (JSON/Markdown)
  • Pagination support
2.3 Implement Tools

For each tool:

Input Schema:

  • Use Zod (TypeScript) or Pydantic (Python)
  • Include constraints and clear descriptions
  • Add examples in field descriptions

Output Schema:

  • Define outputSchema where possible for structured data
  • Use structuredContent in tool responses (TypeScript SDK feature)
  • Helps clients understand and process tool outputs

Tool Description:

  • Concise summary of functionality
  • Parameter descriptions
  • Return type schema

Implementation:

  • Async/await for I/O operations
  • Proper error handling with actionable messages
  • Support pagination where applicable
  • Return both text content and structured data when using modern SDKs

Annotations:

  • readOnlyHint: true/false
  • destructiveHint: true/false
  • idempotentHint: true/false
  • openWorldHint: true/false

Phase 3: Review and Test
3.1 Code Quality

Review for:

  • No duplicated code (DRY principle)
  • Consistent error handling
  • Full type coverage
  • Clear tool descriptions
Show full SKILL.md (362 more words)Show less
3.2 Build and Test

TypeScript:

  • Run npm run build to verify compilation
  • Test with MCP Inspector: npx @modelcontextprotocol/inspector

Python:

  • Verify syntax: python -m py_compile your_server.py
  • Test with MCP Inspector

See language-specific guides for detailed testing approaches and quality checklists.


Phase 4: Create Evaluations

After implementing your MCP server, create comprehensive evaluations to test its effectiveness.

Load ✅ Evaluation Guide for complete evaluation guidelines.

4.1 Understand Evaluation Purpose

Use evaluations to test whether LLMs can effectively use your MCP server to answer realistic, complex questions.

4.2 Create 10 Evaluation Questions

To create effective evaluations, follow the process outlined in the evaluation guide:

  1. Tool Inspection: List available tools and understand their capabilities
  2. Content Exploration: Use READ-ONLY operations to explore available data
  3. Question Generation: Create 10 complex, realistic questions
  4. Answer Verification: Solve each question yourself to verify answers
4.3 Evaluation Requirements

Ensure each question is:

  • Independent: Not dependent on other questions
  • Read-only: Only non-destructive operations required
  • Complex: Requiring multiple tool calls and deep exploration
  • Realistic: Based on real use cases humans would care about
  • Verifiable: Single, clear answer that can be verified by string comparison
  • Stable: Answer won't change over time
4.4 Output Format

Create an XML file with this structure:

xml
<evaluation>
  <qa_pair>
    <question>Find discussions about AI model launches with animal codenames. One model needed a specific safety designation that uses the format ASL-X. What number X was being determined for the model named after a spotted wild cat?</question>
    <answer>3</answer>
  </qa_pair>
<!-- More qa_pairs... -->
</evaluation>

Reference Files

📚 Documentation Library

Load these resources as needed during development:

Core MCP Documentation (Load First)
  • MCP Protocol: Start with sitemap at https://modelcontextprotocol.io/sitemap.xml, then fetch specific pages with .md suffix
  • 📋 MCP Best Practices - Universal MCP guidelines including:
    • Server and tool naming conventions
    • Response format guidelines (JSON vs Markdown)
    • Pagination best practices
    • Transport selection (streamable HTTP vs stdio)
    • Security and error handling standards
SDK Documentation (Load During Phase 1/2)
  • Python SDK: Fetch from https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md
  • TypeScript SDK: Fetch from https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md
Language-Specific Implementation Guides (Load During Phase 2)
  • 🐍 Python Implementation Guide - Complete Python/FastMCP guide with:

    • Server initialization patterns
    • Pydantic model examples
    • Tool registration with @mcp.tool
    • Complete working examples
    • Quality checklist
  • ⚡ TypeScript Implementation Guide - Complete TypeScript guide with:

    • Project structure
    • Zod schema patterns
    • Tool registration with server.registerTool
    • Complete working examples
    • Quality checklist
Evaluation Guide (Load During Phase 4)
  • ✅ Evaluation Guide - Complete evaluation creation guide with:
    • Question creation guidelines
    • Answer verification strategies
    • XML format specifications
    • Example questions and answers
    • Running an evaluation with the provided scripts

© anthropics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts) in skills/mcp-builder of anthropics/skills.

  • SKILL.md
  • LICENSE.txt
  • reference/evaluation.md
  • reference/mcp_best_practices.md
  • reference/node_mcp_server.md
  • reference/python_mcp_server.md
  • scripts/connections.py
  • scripts/evaluation.py
  • scripts/example_evaluation.xml
  • scripts/requirements.txt

Open the folder on GitHubat commit 683bc88

Used in at least 43 other repositories

We found 103 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 64 other GitHub owners. This page covers the copy in anthropics/skills, which our catalogue first saw on October 7, 2026.

…and 53 more copies not listed here.

Compare with similar skills

MCP Server Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Server Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Server Builder this skillanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Nevermined PaymentsLeoYeAI/openclaw-master-skills2.2k—~4.5kAutomated safety check: NotesMIT
LexGuard MCP Developer GuideSeoNaRu/lexguard-mcp131—~1.1kAutomated safety check: PassCustom licence
MCP Server BuildershareAI-lab/Kode-CLI5.2k—~1.9kAutomated safety check: PassApache-2.0
MCP Server Builderalirezarezvani/claude-skills28k—~985Automated safety check: PassMIT

Similar skills

  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Nevermined Payments

    LeoYeAI/openclaw-master-skills

    Integrates Nevermined payment infrastructure into AI agents, MCP servers, Google A2A agents, and REST APIs.

    2.2k GitHub stars~4.5k tokensUpdated 2 mo ago
    Backend & APIsAuto-check: notes
  • LexGuard MCP Developer Guide

    SeoNaRu/lexguard-mcp

    Developer guide for the LexGuard Korean law MCP server: layer rules, adding tools and repositories, JSON-RPC responses, law API handling, answer rules and tests.

    131 GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/Kode-CLI

    Guide to designing and building MCP servers: tool, resource and prompt design for agent usability, with TypeScript or Python implementation workflows.

    5.2k GitHub stars~1.9k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    alirezarezvani/claude-skills

    Design and ship production-ready MCP (Model Context Protocol) servers from OpenAPI contracts instead of hand-written tool wrappers.

    28k GitHub stars~985 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Copilot SDK

    intellectronica/agent-skills

    This skill helps with GitHub Copilot SDK work across Node.js/TypeScript, Python, Go, .NET, and Java.

    295 GitHub stars~3.2k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed

More from anthropics/skills

All 16 skills in this repo
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 48 repos~2k tokens
    Auto-check passed
  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Auto-check passed
  • Official

    Creates original generative art in two steps: a written algorithmic philosophy, then a p5.js sketch with seeded randomness and an interactive viewer for exploring parameters.

    180k GitHub starsUsed in 38 repos~4.9k tokens
    Auto-check passed
  • PowerPoint Decks

    anthropics/skills

    Official

    Creates, edits, reads and validates .pptx and .potx files, using pptxgenjs for new decks and direct XML edits for existing ones, with helper scripts for thumbnails and checks.

    180k GitHub starsUsed in 7 repos~5.2k tokens
    Auto-check passed
  • Canvas Design

    anthropics/skills

    Official

    Creates original posters and static art as PNG or PDF by first writing a short design philosophy, then expressing it visually on a canvas.

    180k GitHub starsUsed in 52 repos~3k tokens
    Auto-check passed
  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Auto-check passed

Questions about MCP Server Builder

What does MCP Server Builder do?

Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation. MCP Builder is a development guide for servers that let a language model call an external API or service through tools. It begins with research and planning: weighing broad API coverage against task-specific workflow tools, naming tools with consistent prefixes, returning focused data that can be filtered or paginated, and writing error messages that tell the agent what to try next.

When should I use MCP Server Builder?

MCP Server Builder fits situations like: wrapping a third-party API as an MCP server; deciding which tools an MCP server should expose; choosing between stdio and streamable HTTP transport; writing evaluations to check how well agents use a server.

How do I install MCP Server Builder in Claude Code?

Run `npx skills add anthropics/skills --skill mcp-builder -a claude-code`. Or copy the skill folder (skills/mcp-builder in anthropics/skills) into .claude/skills/mcp-builder in your project. Claude Code loads it when a task matches its description.

How do I install MCP Server Builder in Codex?

Run `npx skills add anthropics/skills --skill mcp-builder -a codex`. Or copy the skill folder (skills/mcp-builder in anthropics/skills) into .agents/skills/mcp-builder in your project. Codex loads it when a task matches its description.

Can I use MCP Server Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add anthropics/skills --skill mcp-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-builder, .gemini/skills/mcp-builder, .github/skills/mcp-builder and .opencode/skills/mcp-builder in your project.

What does MCP Server Builder need to run?

Going by SKILL.md and its folder, MCP Server Builder needs Python for the scripts in its folder and the command-line tools its instructions call (npm, npx and python). Our summary lists: Node.js with TypeScript, or Python with FastMCP; Access to the API the server will wrap.

Does MCP Server Builder access the network?

SKILL.md names 2 domains. In commands or code: raw.githubusercontent.com and modelcontextprotocol.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is MCP Server Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does MCP Server Builder use?

MCP Server Builder is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Server Builder use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Server Builder?

Skills that share tags, products or a category with MCP Server Builder: MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), Nevermined Payments (LeoYeAI/openclaw-master-skills, 2.2k stars), LexGuard MCP Developer Guide (SeoNaRu/lexguard-mcp, 131 stars) and MCP Server Builder (shareAI-lab/Kode-CLI, 5.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Server Builder?

anthropics (a GitHub organization, an official publisher) maintains it in anthropics/skills, which has 180,076 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 5, 2026.

Source: anthropics/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.