File contents MCP Builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools.
Prerequisites
TypeScript (recommended) or Python
Node.js 18+ for TypeScript, Python 3.10+ for Python
Understanding of async/await patterns
Familiarity with API integration
Instructions
Phase 1: Research and Planning
Study MCP Protocol: Start with https://modelcontextprotocol.io/sitemap.xml
Understand the API you're integrating
Plan tool selection prioritizing comprehensive API coverage
Phase 2: Set Up Project
For TypeScript (recommended):
npm init -y
npm install @modelcontextprotocol/sdk zod
For Python:
pip install mcp pydantic
Implement Core Infrastructure
API client with authentication
Error handling helpers with actionable messages
Response formatting (JSON/Markdown)
Pagination support
Implement Tools
Each tool needs:
Input Schema : Use Zod (TypeScript) or Pydantic (Python)
Output Schema : Define outputSchema for structured data
Clear Description : Concise summary with parameter descriptions
Annotations : readOnlyHint, destructiveHint, idempotentHint
server.registerTool({
name: "github_create_issue",
description: "Create a new issue in a GitHub repository",
inputSchema: z.object({
repo: z.string().describe("Repository in owner/name format"),
title: z.string().describe("Issue title"),
body: z.string().optional()
}),
annotations: { destructiveHint: false, idempotentHint: false }
});
Phase 3: Test
# TypeScript
npm run build
npx @modelcontextprotocol/inspector
# Python
python -m py_compile your_server.py
Phase 4: Create Evaluations
Create 10 complex, realistic test questions
Each question should require multiple tool calls
Verify answers are stable and verifiable
Error Handling
Return actionable error messages that guide toward solutions
Include specific suggestions and next steps
Handle rate limiting gracefully
Notes
Use consistent tool naming prefixes (e.g., github_create_issue)
Balance API coverage with workflow convenience tools
Transport: Streamable HTTP for remote, stdio for local
Return both text content and structured data
Source: anthropics/skills
1 --- 2 name: mcp-builder 3 description: MCP Builder 4 --- 5 # MCP Builder 6 7 Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. 8 9 ## Prerequisites 10 11 - TypeScript (recommended) or Python 12 - Node.js 18+ for TypeScript, Python 3.10+ for Python 13 - Understanding of async/await patterns 14 - Familiarity with API integration 15 16 ## Instructions 17 18 1. **Phase 1: Research and Planning** 19 - Study MCP Protocol: Start with `https://modelcontextprotocol.io/sitemap.xml` 20 - Understand the API you're integrating 21 - Plan tool selection prioritizing comprehensive API coverage 22 23 2. **Phase 2: Set Up Project** 24 25 For TypeScript (recommended): 26 ```bash 27 npm init -y 28 npm install @modelcontextprotocol/sdk zod 29 ``` 30 31 For Python: 32 ```bash 33 pip install mcp pydantic 34 ``` 35 36 3. **Implement Core Infrastructure** 37 - API client with authentication 38 - Error handling helpers with actionable messages 39 - Response formatting (JSON/Markdown) 40 - Pagination support 41 42 4. **Implement Tools** 43 44 Each tool needs: 45 - **Input Schema**: Use Zod (TypeScript) or Pydantic (Python) 46 - **Output Schema**: Define `outputSchema` for structured data 47 - **Clear Description**: Concise summary with parameter descriptions 48 - **Annotations**: readOnlyHint, destructiveHint, idempotentHint 49 50 ```typescript 51 server.registerTool({ 52 name: "github_create_issue", 53 description: "Create a new issue in a GitHub repository", 54 inputSchema: z.object({ 55 repo: z.string().describe("Repository in owner/name format"), 56 title: z.string().describe("Issue title"), 57 body: z.string().optional() 58 }), 59 annotations: { destructiveHint: false, idempotentHint: false } 60 }); 61 ``` 62 63 5. **Phase 3: Test** 64 ```bash 65 # TypeScript 66 npm run build 67 npx @modelcontextprotocol/inspector 68 69 # Python 70 python -m py_compile your_server.py 71 ``` 72 73 6. **Phase 4: Create Evaluations** 74 - Create 10 complex, realistic test questions 75 - Each question should require multiple tool calls 76 - Verify answers are stable and verifiable 77 78 ## Error Handling 79 80 - Return actionable error messages that guide toward solutions 81 - Include specific suggestions and next steps 82 - Handle rate limiting gracefully 83 84 ## Notes 85 86 - Use consistent tool naming prefixes (e.g., `github_create_issue`) 87 - Balance API coverage with workflow convenience tools 88 - Transport: Streamable HTTP for remote, stdio for local 89 - Return both text content and structured data 90 91 Source: anthropics/skills
mediar-ai/skillhubz/tree/main/packages/skills/skills/mcp-builder commit a237536bd6
Frequently asked questions How do I install the MCP Builder skill? Run npx skillmds@latest add mediar-ai/mcp-builder in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the MCP Builder skill do? MCP Builder It is listed under AI & ML on SkillMD.
Is MCP Builder safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with MCP Builder? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is MCP Builder free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published MCP Builder? mediar-ai (@mediar-ai) published this skill. Their other Agent Skills are listed on their SkillMD profile.