Communitygithub.com

David-Li0406/meta-skill-evolving

高品質なMCP(Model Context Protocol)サーバーを作成するためのガイドです。LLMが適切に設計されたツールを通じて外部サービスと連携できるようにします。MCPサーバーを構築して外部APIやサービスを統合する際に使用します。Python(FastMCP)またはNode/TypeScript(MCP SDK)に対応しています。

meta-skill-evolving とは?

このスキルは、AIエージェントが外部サービスと連携するためのMCP(Model Context Protocol)サーバーを開発するための包括的なガイドです。MCPはLLMがツールを通じて外部APIとやり取りできるようにするプロトコルであり、このスキルはそのサーバー設計と実装のベストプラクティスを提供します。 主に4つのフェーズで構成されており、最初にMCPの設計原則(APIカバレッジとワークフローツールのバランス、ツールの命名規則、コンテキスト管理、エラーメッセージ)を理解し、次にプロトコルとフレームワークのドキュメントを調査します。推奨スタックはTypeScript(SDKサポートが充実)またはPython(FastMCP)で、トランスポートはリモートサーバーにはStreamable HTTP、ローカルサーバーにはstdioを使用します。 実装フェーズでは、プロジェクト構造のセットアップ、コアインフラ(APIクライアント、エラーハンドリング、ページネーション)の構築、個々のツールの実装(スキーマ定義、説明、注釈)を行います。ツールごとに入力スキーマ(Zod/Pydantic)、出力スキーマ、説明、実装コード、注釈(読み取り専用、破壊的、冪等性など)を提供します。 最終フェーズでは、コード品質レビュー、ビルドとテスト(MCP Inspectorを使用)、および10の複雑で現実的な評価質問を作成してサーバーの有効性を検証します。このガイドには、言語別の実装ガイドや評価ガイドへの参照ファイルも含まれており、開発プロセス全体をサポートします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/David-Li0406/meta-skill-evloving/tree/HEAD/AgentSkillOS/data/skill_seeds/mcp-builder

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

MCPサーバー開発ガイド

概要

LLMが適切に設計されたツールを通じて外部サービスと連携できるようにするMCP(Model Context Protocol)サーバーを作成します。MCPサーバーの品質は、LLMが現実世界のタスクを達成できるかどうかで評価されます。


プロセス

🚀 高レベルワークフロー

高品質なMCPサーバーを作成するには、4つの主要フェーズがあります。

フェーズ1: 深い調査と計画

1.1 最新のMCP設計を理解する

APIカバレッジ vs ワークフローツール: 包括的なAPIエンドポイントカバレッジと、特殊化されたワークフローツールのバランスを取ります。ワークフローツールは特定のタスクに便利ですが、包括的なカバレッジによりエージェントは柔軟に操作を組み合わせることができます。パフォーマンスはクライアントによって異なります。基本ツールを組み合わせるコード実行が有利なクライアントもいれば、より高レベルなワークフローが適しているクライアントもいます。不明な場合は、包括的なAPIカバレッジを優先してください。

ツールの命名と発見可能性: 明確で説明的なツール名は、エージェントが適切なツールを素早く見つけるのに役立ちます。一貫性のあるプレフィックス(例:github_create_issue、github_list_repos)とアクション指向の命名を使用します。

コンテキスト管理: エージェントは簡潔なツール説明と、結果をフィルタリング/ページネーションする機能を活用します。焦点を絞った関連データを返すツールを設計します。一部のクライアントはコード実行をサポートしており、エージェントがデータを効率的にフィルタリングおよび処理するのに役立ちます。

実用的なエラーメッセージ: エラーメッセージは、具体的な提案と次のステップでエージェントを解決策に導く必要があります。

1.2 MCPプロトコルドキュメントを学ぶ

MCP仕様をナビゲートする:

サイトマップから関連ページを見つけます:https://modelcontextprotocol.io/sitemap.xml

次に、特定のページを.mdサフィックスを付けてマークダウン形式で取得します(例:https://modelcontextprotocol.io/specification/draft.md)。

確認すべき主要ページ:

  • 仕様の概要とアーキテクチャ
  • トランスポートメカニズム(ストリーミング可能HTTP、stdio)
  • ツール、リソース、プロンプトの定義

1.3 フレームワークドキュメントを学ぶ

推奨スタック:

  • 言語: TypeScript(高品質なSDKサポートと、MCPBなどの多くの実行環境での優れた互換性。さらに、AIモデルはTypeScriptコードの生成に優れており、広範な使用、静的型付け、優れたリンティングツールの恩恵を受けます)
  • トランスポート: リモートサーバーにはStreamable HTTP(ステートレスJSONを使用。ステートフルセッションやストリーミング応答に比べ、スケーリングとメンテナンスが簡単)。ローカルサーバーにはstdio。

フレームワークドキュメントをロードする:

TypeScript(推奨)の場合:

  • TypeScript SDK: WebFetchを使用してhttps://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.mdをロード
  • ⚡ TypeScriptガイド - TypeScriptのパターンと例

Pythonの場合:

  • Python SDK: WebFetchを使用してhttps://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.mdをロード
  • 🐍 Pythonガイド - Pythonのパターンと例

1.4 実装を計画する

APIを理解する: サービスのAPIドキュメントをレビューして、主要なエンドポイント、認証要件、データモデルを特定します。必要に応じてWeb検索とWebFetchを使用します。

ツールの選択: 包括的なAPIカバレッジを優先します。最も一般的な操作から始めて、実装するエンドポイントをリストアップします。


フェーズ2: 実装

2.1 プロジェクト構造をセットアップする

プロジェクトのセットアップについては、言語固有のガイドを参照してください:

2.2 コアインフラを実装する

共有ユーティリティを作成します:

  • 認証付きAPIクライアント
  • エラーハンドリングヘルパー
  • レスポンスフォーマット(JSON/マークダウン)
  • ページネーションサポート

2.3 ツールを実装する

各ツールについて:

入力スキーマ:

  • Zod(TypeScript)またはPydantic(Python)を使用
  • 制約と明確な説明を含める
  • フィールド説明に例を追加

出力スキーマ:

  • 構造化データの場合は可能な限りoutputSchemaを定義
  • ツール応答でstructuredContentを使用(TypeScript SDK機能)
  • クライアントがツールの出力を理解して処理するのに役立ちます

ツールの説明:

  • 機能の簡潔な要約
  • パラメータの説明
  • 戻り値の型スキーマ

実装:

  • I/O操作にはasync/await
  • 実用的なメッセージによる適切なエラーハンドリング
  • 該当する場合はページネーションをサポート
  • 最新のSDKを使用する場合は、テキストコンテンツと構造化データの両方を返す

注釈:

  • readOnlyHint: true/false
  • destructiveHint: true/false
  • idempotentHint: true/false
  • openWorldHint: true/false

フェーズ3: レビューとテスト

3.1 コード品質

以下についてレビューします:

  • コードの重複なし(DRY原則)
  • 一貫性のあるエラーハンドリング
  • 完全な型カバレッジ
  • 明確なツール説明

3.2 ビルドとテスト

TypeScript:

  • npm run buildを実行してコンパイルを確認
  • MCP Inspectorでテスト:npx @modelcontextprotocol/inspector

Python:

  • 構文を確認:python -m py_compile your_server.py
  • MCP Inspectorでテスト

詳細なテストアプローチと品質チェックリストについては、言語固有のガイドを参照してください。


フェーズ4: 評価を作成する

MCPサーバーを実装した後、その有効性をテストするための包括的な評価を作成します。

評価ガイドラインの完全な✅ 評価ガイドをロードしてください。

4.1 評価の目的を理解する

評価を使用して、LLMがMCPサーバーを使用して現実的で複雑な質問に効果的に回答できるかどうかをテストします。

4.2 10の評価質問を作成する

効果的な評価を作成するには、評価ガイドで概説されているプロセスに従います:

  1. ツールの検査: 利用可能なツールをリストアップし、その機能を理解する
  2. コンテンツの探索: READ-ONLY操作を使用して利用可能なデータを探索する
  3. 質問の生成: 10の複雑で現実的な質問を作成する
  4. 回答の検証: 各質問を自分で解いて回答を確認する

4.3 評価要件

各質問が以下を満たしていることを確認します:

  • 独立: 他の質問に依存しない
  • 読み取り専用: 非破壊的な操作のみが必要
  • 複雑: 複数のツール呼び出しと深い探索が必要
  • 現実的: 人間が気にする実際のユースケースに基づく
  • 検証可能: 文字列比較で検証できる単一の明確な回答
  • 安定: 時間が経っても回答が変わらない

4.4 出力形式

この構造でXMLファイルを作成します:

<evaluation>
  <qa_pair>
    <question>動物のコードネームを持つAIモデルのローンチに関するディスカッションを見つけてください。あるモデルにはASL-X形式の特定の安全指定が必要でした。斑点のある野生の猫にちなんで名付けられたモデルに対して決定されたX番号は何ですか?</question>
    <answer>3</answer>
  </qa_pair>
<!-- その他のqa_pair... -->
</evaluation>

参照ファイル

📚 ドキュメントライブラリ

開発中に必要に応じてこれらのリソースをロードします。

コアMCPドキュメント(最初にロード)

  • MCPプロトコル: https://modelcontextprotocol.io/sitemap.xmlのサイトマップから開始し、.mdサフィックスで特定のページを取得
  • 📋 MCPベストプラクティス - 汎用MCPガイドライン(以下を含む):
    • サーバーとツールの命名規則
    • レスポンス形式のガイドライン(JSON vs マークダウン)
    • ページネーションのベストプラクティス
    • トランスポートの選択(ストリーミング可能HTTP vs stdio)
    • セキュリティとエラーハンドリングの標準

SDKドキュメント(フェーズ1/2でロード)

  • Python SDK: https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.mdから取得
  • TypeScript SDK: https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.mdから取得

言語固有の実装ガイド(フェーズ2でロード)

  • 🐍 Python実装ガイド - 完全なPython/FastMCPガイド(以下を含む):

    • サーバー初期化パターン
    • Pydanticモデルの例
    • @mcp.toolによるツール登録
    • 完全な動作例
    • 品質チェックリスト
  • ⚡ TypeScript実装ガイド - 完全なTypeScriptガイド(以下を含む):

    • プロジェクト構造
    • Zodスキーマパターン
    • server.registerToolによるツール登録
    • 完全な動作例
    • 品質チェックリスト

評価ガイド(フェーズ4でロード)

  • ✅ 評価ガイド - 完全な評価作成ガイド(以下を含む):
    • 質問作成ガイドライン
    • 回答検証戦略
    • XML形式の仕様
    • 質問と回答の例
    • 提供されたスクリプトを使用した評価の実行

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

David-Li0406/meta-skill-evloving

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

David-Li0406/meta-skill-evloving

Create technical diagrams using Mermaid syntax for architecture, sequences, ERDs, flowcharts, and state machines. Use for visualizing system design, data flows, and processes. Triggers: diagram, mermaid, architecture diagram, sequence diagram, flowchart, ERD, entity relationship, state diagram, C4 model, component diagram, visualize, draw.

David-Li0406/meta-skill-evloving

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

David-Li0406/meta-skill-evloving

Complete color manipulation and green screen effects system. PROACTIVELY activate for: (1) Green screen/chromakey removal, (2) Color grading with LUTs, (3) Color correction (levels, curves, white balance), (4) Colorkey/color removal effects, (5) Hue/saturation manipulation, (6) Color space conversions (BT.709, BT.2020, HDR), (7) Color isolation effects, (8) Teal and orange look, (9) Vintage/film looks, (10) Color keying for transparency. Provides: chromakey and colorkey filters, LUT application (lut3d), curves and levels adjustment, color balance, selective color manipulation, color space handling, HDR tone mapping, professional color grading chains.

David-Li0406/meta-skill-evloving

Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.

David-Li0406/meta-skill-evloving

Build with OpenAI's stateless APIs - Chat Completions (GPT-5, GPT-4o), Embeddings, Images (DALL-E 3), Audio (Whisper + TTS), and Moderation. Includes Node.js SDK and fetch-based approaches for Cloudflare Workers. Use when: implementing chat completions with GPT-5/GPT-4o, streaming responses with SSE, using function calling/tools, creating structured outputs with JSON schemas, generating embeddings for RAG (text-embedding-3-small/large), generating images with DALL-E 3, editing images with GPT-Image-1, transcribing audio with Whisper, synthesizing speech with TTS (11 voices), moderating content (11 safety categories), or troubleshooting rate limits (429), invalid API keys (401), function calling failures, streaming parse errors, embeddings dimension mismatches, or token limit exceeded.

David-Li0406/meta-skill-evloving

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

David-Li0406/meta-skill-evloving

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

David-Li0406/meta-skill-evloving

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

David-Li0406/meta-skill-evloving

Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.

David-Li0406/meta-skill-evloving

Best practices for Remotion - Video creation in React

David-Li0406/meta-skill-evloving

Provides bidirectional translation (Chinese/English), grammar checking, and sentence polishing. Supports specific tense constraints, context-aware tone adjustment, and natural expression optimization. Outputs direct text without formatting.

David-Li0406/meta-skill-evloving

指导如何通过自定义注解(如@Unicom)标识Dubbo接口,利用BeanDefinitionRegistryPostProcessor在启动时扫描并动态注册ReferenceBean,实现RPC调用的封装。

David-Li0406/meta-skill-evloving

生成Python脚本,利用FFmpeg将图片序列按3x3布局合并,或将合并图拆分。要求使用subprocess模块执行命令,并支持用户交互式输入路径。

David-Li0406/meta-skill-evloving

SOP for extracting and analyzing promotional activity details, handling time formatting, location mapping, payment logic, and step-by-step process validation.

David-Li0406/meta-skill-evloving

Specializes in creating TikTok short video scripts using an anthropomorphic 'Chef' perspective to explain wildlife food chains and survival environments, utilizing real field footage.

David-Li0406/meta-skill-evloving

针对TikTok平台,以拟人化视角(如动物作为厨师)创作系列短视频脚本。重点介绍野生动物、食物链及生态环境,要求使用野外实拍素材,风格幽默且具有教育意义。

David-Li0406/meta-skill-evloving

Generates KWL (Know, Want to know, Learned) charts for educational videos, specifically BrainPOP, using simple 7th-grade language and short, concise bullet points.

David-Li0406/meta-skill-evloving

Develops DAX measures to calculate promo and regular volumes and generates a calculated table of dates excluding continuous promo date ranges, handling multiple periods and nulls.

David-Li0406/meta-skill-evloving

Tracks complex, multi-session work using the Beads issue tracker and dependency graphs, and provides persistent memory that survives conversation compaction. Use when work spans multiple sessions, has complex dependencies, or needs persistent context across compaction cycles. Trigger with phrases like "create task for", "what's ready to work on", "show task", "track this work", "what's blocking", or "update status".

関連スキル