askill
mcp-builder

mcp-builderSafety 85Repository

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).

5 stars
1.2k downloads
Updated 1/2/2026

Package Files

Loading files...
SKILL.md

MCP Server Development

Build MCP servers that enable LLMs to accomplish real-world tasks through well-designed tools.

4-Phase Process

Research → Implement → Review → Evaluate

Load resources on-demand (progressive disclosure):

  • Protocol: https://modelcontextprotocol.io/llms-full.txt
  • Python SDK: https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md
  • TypeScript SDK: https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md

Core Design Principles

Workflows over endpoints: Consolidate operations (e.g., schedule_event checks availability + creates) Optimize context: Return high-signal info, provide concise/detailed formats, use readable IDs Actionable errors: Guide to correct usage ("Try filter='active_only'"), suggest next steps Natural task flow: Name tools how humans think, group with consistent prefixes


Phase 1: Research & Planning

1.1 Core Docs

  • Load protocol: https://modelcontextprotocol.io/llms-full.txt
  • Read Best Practices

1.2 Framework (choose one)

1.3 API Research Study exhaustively: auth, rate limits, pagination, endpoints, errors, schemas

1.4 Plan

  • Tool selection (most valuable endpoints)
  • Shared utilities (requests, pagination, formatting, errors)
  • I/O design (validation schemas, response formats, 25k char limits)
  • Error strategy (graceful failures, actionable messages)

Phase 2: Implementation

2.1 Structure Python: single .py or modules | TypeScript: package.json + tsconfig.json

2.2 Infrastructure First Build shared utilities: API helpers, error handling, formatting, pagination, auth See: examples/basic-server.py or .ts

2.3 Tools (for each):

  • Schema: Pydantic/Zod with constraints, clear descriptions
  • Docs: Summary, purpose, params+examples, returns, usage, errors
  • Code: Use utilities, async/await, multiple formats, respect limits
  • Annotations: readOnlyHint, destructiveHint, idempotentHint, openWorldHint

See: examples/tool-with-context.py, error-handling.py

2.4 Best Practices Python: @mcp.tool(), Pydantic v2, type hints, async/await, constants TypeScript: registerTool(), Zod .strict(), strict mode, no any, Promise<T>


Phase 3: Review & Refine

3.1 Quality: Check DRY, composability, consistency, error handling, types, docs

3.2 Test: MCP servers are long-running. See testing.md Quick check: python -m py_compile server.py or npm run build

3.3 Checklist: Load from Python or TypeScript guide


Phase 4: Evaluations

Test LLM effectiveness with your server.

Process: Inspect tools → Explore data → Generate 10 questions → Verify answers

Requirements: Independent, read-only, complex, realistic, verifiable, stable

Format:

<evaluation>
  <qa_pair>
    <question>Complex question...</question>
    <answer>Verifiable answer</answer>
  </qa_pair>
</evaluation>

Complete guide: evaluation.md


Reference Library

ResourceLoadPurpose
Best PracticesPhase 1Universal guidelines
Python GuidePhase 1/2Python patterns
TypeScript GuidePhase 1/2TypeScript patterns
TestingPhase 3Safe testing
EvaluationPhase 4Creating evals

Examples

FilePurpose
basic-server.pyPython structure
basic-server.tsTypeScript structure
tool-with-context.pyWorkflows
error-handling.pyErrors

Success Criteria

  • Clear tool boundaries (single purpose)
  • Efficient context (concise defaults)
  • Educational errors (guide usage)
  • Workflow optimization (consolidate steps)
  • Production ready (errors, rate limits, logging)
  • Agent effective (90%+ eval success)

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/12/2026

A comprehensive, structured guide for building MCP servers in Python or Node/TS. It effectively uses a phased approach (Research, Implement, Review, Evaluate) and acts as an index to external documentation and local reference files, ensuring high context and best practices.

85
95
85
90
95

Metadata

Licenseunknown
Version-
Updated1/2/2026
Publisheringpoc

Tags

apici-cdgithub-actionsllmobservabilitysecuritytesting