skills/mcp-builder/SKILL.md
Creates MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Activates on: "build an MCP server", "create MCP tools", "integrate API via MCP", "write a FastMCP server", "add an MCP server to an agent", or any request to wrap an external API as LLM-callable tools in Python or Node/TypeScript.
npx skillsauth add shipshitdev/library mcp-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build an MCP server in four phases:
Before implementation, design tools around agent workflows:
Build for Workflows, Not Just API Endpoints:
schedule_event that both checks availability and creates event)Optimize for Limited Context:
Design Actionable Error Messages:
Follow Natural Task Subdivisions:
Use Evaluation-Driven Development:
Fetch the MCP protocol documentation:
Fetch: https://modelcontextprotocol.io/llms-full.txt
This document contains the complete MCP specification. Note: the URL may change as the spec evolves — if the fetch fails, search for the current MCP docs URL.
Load and read the following reference files:
For Python implementations, also load:
https://py.sdk.modelcontextprotocol.io/For Node/TypeScript implementations, also load:
https://ts.sdk.modelcontextprotocol.io/To integrate a service, read the API documentation for the selected workflows. Scope endpoint and parameter coverage to those workflows, but read the cross-cutting concerns (auth, rate limits, error handling, data models) in full — they apply across every tool you expose:
Search or fetch documentation only for gaps that block the selected workflow.
Create a plan with these sections:
Tool Selection:
Shared Utilities and Helpers:
Input/Output Design:
Error Handling Strategy:
After the plan exists, implement the shared infrastructure before individual tools.
For Python:
.py file or organize into modules if complex (see 🐍 Python Guide)For Node/TypeScript:
package.json and tsconfig.jsonTo begin implementation, create shared utilities before implementing tools:
For each tool in the plan:
Define Input Schema:
Write Tool Docstrings/Descriptions:
Implement Tool Logic:
Add Tool Annotations:
readOnlyHint: true (for read-only operations)destructiveHint: false (for non-destructive operations)idempotentHint: true (if repeated calls have same effect)openWorldHint: true (if interacting with external systems)Load the matching guide before finishing implementation — 🐍 Python Implementation Guide or ⚡ TypeScript Implementation Guide — and follow its patterns: proper SDK tool registration (@mcp.tool / server.registerTool), strict input validation (Pydantic v2 model_config / Zod .strict()), full type coverage with no any, async/await for all I/O, module-level constants for shared values (e.g. CHARACTER_LIMIT, API_BASE_URL), and — for TypeScript — a working bun run build.
After initial implementation:
Review the code for:
Important: MCP servers are long-running processes that wait for requests over stdio/stdin or sse/http. Running them directly in the main process (e.g., python server.py or node dist/index.js) hangs it indefinitely.
Safe ways to test: run the server in tmux to keep it out of the main process, use a timeout (timeout 5s python server.py), or let the evaluation harness (Phase 4) manage the server subprocess directly for stdio transport.
python -m py_compile your_server.py and review imports.bun run build, confirm it completes without errors, and verify dist/index.js is created.To verify implementation quality, load the appropriate checklist from the language-specific guide:
After implementing the MCP server, create evaluations that test whether agents can answer realistic questions with the tools.
Load ✅ Evaluation Guide for complete evaluation guidelines.
Evaluations test whether LLMs can effectively use your MCP server to answer realistic, complex questions.
Follow the process outlined in the evaluation guide:
Each question must be:
Create an XML file with this structure:
<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>
python server.py or node dist/index.js in your main process. Use tmux to background the server, or use the evaluation harness which manages the server subprocess.modelcontextprotocol.io/llms-full.txt) and the GitHub SDK README URLs may move between versions. If a fetch fails, search for the current URL rather than assuming the skill path is correct.dist/index.js is the artifact the MCP runtime loads. Editing .ts files without running bun run build means the runtime is still running the old version.readOnlyHint: true does not prevent a tool from writing data — it only signals intent to the LLM. Enforce safety in the tool implementation itself.Load only the resources required by the implementation language and phase.
| File | Load during | Covers |
|---|---|---|
| references/mcp_best_practices.md | Phase 1.3 (load first) | naming conventions, response formats (JSON vs Markdown), pagination, character limits/truncation, security and error-handling standards |
| references/python_mcp_server.md | Phase 2 (Python) | server init, Pydantic models, @mcp.tool registration, working examples, quality checklist |
| references/node_mcp_server.md | Phase 2 (TypeScript) | project structure, Zod schemas, server.registerTool, working examples, quality checklist |
| references/evaluation.md | Phase 4 | question-creation and answer-verification guidelines, XML format, example Q&A, running evaluations |
Also fetch the live protocol/SDK docs as needed: MCP protocol spec (https://modelcontextprotocol.io/llms-full.txt), Python SDK (https://py.sdk.modelcontextprotocol.io/), TypeScript SDK (https://ts.sdk.modelcontextprotocol.io/).
development
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.