AgentSkillsCN

mcp-builder

开发并搭建 MCP 服务器(模型上下文协议),将大语言模型与外部服务无缝集成,打造高质量、可扩展的设计方案。

SKILL.md
--- frontmatter
name: mcp-builder
description: Develop and scaffold MCP servers (Model Context Protocol) to integrate LLMs with external services, ensuring high-quality, extensible designs.

MCP Builder Skill Guide

Description

The mcp-builder skill provides comprehensive guidelines for creating high-quality MCP servers. These servers enable LLMs to interact seamlessly with external services via Model Context Protocol (MCP). By implementing rigorous standards, tools can support real-world use cases effectively.

When to Use the Skill

  • Building new MCP servers for APIs/services: Ensure scalability and robust operations.
  • Designing workflows: Optimize tool usability and discoverability for LLMs.
  • Creating server evaluations: Develop reliable question-answer pairs to validate server performance.
  • Integrating tools with the MCP protocol: Adopt best practices for schema design and error handling.

Usage Guide

MCP Server Development

Analyze and Plan

  1. Research Protocol: Familiarize with the MCP specification and its core architecture.
  2. Select Framework: Choose between:
    • TypeScript: For high compatibility and extensive SDK support.
    • Python: For FastAPI-based rapid development.

Scaffold and Implement

  • Node.js (TypeScript) Workflow
bash
npx mcp-node-init <server-name>
npm install
  • Python Workflow
bash
fastmcp init <server-name>

Set authentication, pagination, and tool input/output schemas as per the MCP requirements.

Validation and Packaging

  1. Validate MCP Server Implementation
    • Run npx @modelcontextprotocol/inspector for TypeScript.
    • For Python: Use fastmcp validate.
  2. Create Evaluations
    xml
    <evaluation>
      <qa_pair>
        <question>What is the latest commit on repo X?</question>
        <answer>SHA12345</answer>
      </qa_pair>
    </evaluation>
    

Inputs and Outputs

Inputs

  • Framework Preference: TypeScript or Python.
  • API Specifications: Endpoints, authentication, and data models.

Outputs

  • MCP Server: Optimized for integration with LLMs.
  • Validation Results: Passes standard validation criteria.
  • Evaluations: XML files for server testing and refinement.

Best Practices and Version History

Best Practices

  • Use TypeScript SDK for better tooling, or Python for rapid prototyping.
  • Plan tool schemas carefully with descriptive names (action-oriented, e.g., github_create_issue).
  • Implement error messages that clearly guide users.

Version History

VersionDateUpdates
1.1.02026-02-09Refined SKILL.md structure and added examples for evaluations.
1.0.02025-09-18Initial creation based on MCP protocol standards.

Resources