Skip to content
HUIAHUB

anthropics/skills/skills/mcp-builder

MCP server builder

A guide for building MCP servers that let language models use external services and APIs through well-designed tools, in Python with FastMCP or TypeScript with the MCP SDK.

Agent skillAgent skills

What MCP server builder does

The skill walks the agent through four phases. Research comes first: the agent reads the MCP specification starting from the modelcontextprotocol.io sitemap, loads the SDK README for TypeScript or Python, and studies the target service's API documentation to decide which endpoints become tools. TypeScript is the recommended language, with streamable HTTP and stateless JSON for remote servers and stdio for local ones. The design advice favors broad API coverage, consistent tool-name prefixes, short descriptions, pagination and error messages that tell the model what to try next.

Implementation follows. The agent sets up the project from the bundled TypeScript or Python guide, writes shared pieces such as an authenticated API client and error helpers, then defines each tool with Zod or Pydantic input schemas, output schemas where possible, and annotations such as readOnlyHint and destructiveHint. Review means checking for duplicated code and type coverage, running npm run build or python -m py_compile, and testing with the MCP Inspector.

Last, the agent writes ten read-only evaluation questions, each with a single answer that can be checked by string comparison, and stores them in an XML file. The bundled scripts/evaluation.py runs those questions against the server through Claude and produces a report.

Install

/plugin install example-skills@anthropic-agent-skills

Read the security check below before you run it. The repository's own instructions win if they differ.

Security check

What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".

Runs scripts
Yes
Uses the network
Yes
Installs hooks
No
Asks for secrets
No

The folder ships two Python scripts, scripts/connections.py and scripts/evaluation.py. The evaluation script launches your MCP server as a command or connects to it over SSE or HTTP, then sends the questions to the Claude API, so it makes network requests. The SKILL.md also tells the agent to fetch the MCP specification and SDK READMEs from the web. No hooks were found and the scan flagged no secret variables in the folder, but the evaluation guide asks you to set ANTHROPIC_API_KEY before running the evaluation script. Read both scripts first, and point evaluations at a test account for the service you wrap.

Scan details: Ships 2 script files: scripts/connections.py, scripts/evaluation.py. SKILL.md instructions include web requests or URLs to fetch. skills/mcp-builder/scripts/evaluation.py makes network requests. Checked at commit 8a1541c4a3ff.

Use cases

  • Wrap a third-party REST API as an MCP server.
  • Decide which API endpoints to expose as MCP tools.
  • Write evaluation questions that test whether a model can use a server.

Limitations

  • Guidance covers Python (FastMCP) and TypeScript only.
  • The research phase expects web access to fetch the MCP spec and SDK READMEs.
  • The evaluation script needs the anthropic and mcp Python packages and an Anthropic API key.
  • The evaluation script defaults to the claude-3-7-sonnet-20250219 model unless another is passed.

Sources