このスキルは、ユーザーが「MCPサーバーを構築する」「MCPを作成する」「MCPの統合を作る」「Claude向けにAPIをラップする」「Claudeにツールを公開する」「MCPアプリを作る」といった依頼をする場合、または Model Context Protocol(モデル・コンテキスト・プロトコル:Claudeが外部ツールを利用するための仕組み)を使って何か構築することについて相談する場合に使用します。 MCPサーバーの開発を始めるための入口となるスキルです。ユーザーの用途を詳しく確認し、適切な配信方式(リモートHTTP、MCPB、ローカルstdio)を判断し、ツール設計のパターンを選択した上で、その後の作業を専門のスキルに引き継ぎます。
This skill should be used when the user asks to "build an MCP server", "create an MCP", "make an MCP integration", "wrap an API for Claude", "expose tools to Claude", "make an MCP app", or discusses building something with the Model Context Protocol. It is the entry point for MCP server development — it interrogates the user about their use case, determines the right deployment model (remote HTTP, MCPB, local stdio), picks a tool-design pattern, and hands off to specialized skills.
開発者がClaudeとシームレスに連携するMCPサーバーを設計・構築できるよう、ガイドを行います。 MCPサーバーにはさまざまな形態があり、最初に誤った形態を選ぶと、後で苦痛を伴う書き直しが発生します。 最初にすべきことはコードを書くことではなく、要件を発見することです。
まずClaude固有のコンテキストを読み込んでください。
MCPの仕様は汎用的なものですが、Claudeには独自の認証タイプ・レビュー基準・制限があります。
質問への回答やスキャフォールディングを始める前に、https://claude.com/docs/llms-full.txt(Claudeコネクタードキュメントの完全エクスポート)を取得し、Claudeの実際の制約を反映したガイダンスを提供してください。
フェーズ1の質問への回答が揃うまで、スキャフォールディングを開始しないでください。 ユーザーの最初のメッセージですでに回答が得られている場合は、その旨を伝えてフェーズ1をスキップし、推奨事項に直接進んでください。
以下の質問を会話形式で確認してください(一度にまとめて質問し、一問一答にならないようにしてください)。 ユーザーがすでに伝えている内容に合わせて、質問の言い回しを適宜調整してください。
| 接続先 | 推奨される方向性 |
|---|---|
| クラウドAPI(SaaS、REST、GraphQL) | リモートHTTPサーバー |
| ローカルプロセス、ファイルシステム、デスクトップアプリ | MCPBまたはローカルstdio |
| ハードウェア、OS レベルのAPI、ユーザー固有の状態 | MCPB |
| 外部接続なし — 純粋なロジック/計算処理 | どちらでも可 — デフォルトはリモート |
この回答によってツール設計のパターンが決まります(フェーズ3を参照)。
references/elicitation.mdを参照。@modelcontextprotocol/ext-appsが必要。build-mcp-appスキルを参照。references/auth.mdを参照。回答をもとに、1つの方針を推奨してください。明確に意見を持って提案してください。 優先順位の高い順に以下の選択肢を示します。
Streamable HTTP上でMCPを提供するホスト型サービスです。 クラウドAPIをラップする場合の推奨パスです。
選ばれる理由:
サーバーがユーザーのローカルマシンに触れる必要がある場合を除き、このパスを選んでください。
→ 最速デプロイ: Cloudflare Workers — references/deploy-cloudflare-workers.md(2コマンドでライブURLまで完成)
→ ポータブルなNode/Python: references/remote-http-scaffold.md(ExpressまたはFastMCP、任意のホストで動作)
ツールがユーザーに確認・オプション選択・短いフォーム入力を求めるだけなら、Elicitationを使えばUIコードなしで実現できます。 サーバーがフラットなJSONスキーマを送ると、ホストがネイティブフォームをレンダリングします。仕様ネイティブで追加パッケージも不要です。
注意点: ホストのサポートは新しい機能です(Claude CodeはバージョンV2.1.76で実装済み、Desktopは未確認)。
クライアントがcapabilityをアドバタイズしていない場合、SDKはエラーをスローします。
必ずclientCapabilities.elicitationを最初にチェックし、フォールバックを用意してください。
正規パターンについてはreferences/elicitation.mdを参照。
これは仕様に準拠した正しいアプローチであり、ホストの対応は順次追いついていきます。
以下のいずれかが必要な場合はbuild-mcp-appウィジェットに切り替えてください:
ネストされた複雑なデータ、スクロール・検索可能なリスト、ビジュアルプレビュー、ライブ更新。
上記と同様ですが、UIリソース(チャット内でレンダリングされるインタラクティブウィジェット)も含みます。 検索付きリッチピッカー、グラフ、ライブダッシュボード、ビジュアルプレビューなどに対応。 一度構築すれば、ClaudeとChatGPTの両方でレンダリングされます。
次の場合に選択: Elicitationのフラットフォーム制約では対応できない場合 — カスタムレイアウト、大規模な検索可能リスト、ビジュアルコンテンツ、またはライブ更新が必要な場合。
通常はリモートですが、UIがローカルアプリを操作する必要がある場合はMCPBとして提供することも可能です。
→ build-mcp-app スキルに引き継いでください。
ユーザーがNode/Pythonをインストールせずに利用できるよう、ランタイムと一緒にパッケージ化されたローカルMCPサーバーです。 ローカルサーバーを配布する際の公式な方法です。
次の場合に選択: サーバーがユーザーのマシン上で実行される必要がある場合 — ローカルファイルの読み取り、デスクトップアプリの操作、localhostサービスとの通信、またはOSレベルのアクセスが必要な場合。
→ build-mcpb スキルに引き継いでください。
ユーザーのマシン上でnpx / uvx経由で起動するスクリプトです。
個人用ツールやプロトタイプには適しています。
配布するには問題が多く、ユーザーが適切なランタイムを必要とし、アップデートをプッシュできず、配布チャネルはClaude Code pluginのみです。
あくまでスタートポイントとしてのみ推奨します。 ユーザーが強く希望する場合はスキャフォールドを提供しますが、MCPBへのアップグレードパスを示してください。
すべてのMCPサーバーはツールを公開します。 ツールをどのように設計するかは、多くの人が思う以上に重要です — ツールのスキーマはClaudeのコンテキストウィンドウに直接入り込むためです。
アクション数が少ない場合(約15未満)、それぞれに専用のツールを与え、説明とスキーマをコンパクトに記述します。
create_issue — 新しいIssueを作成。パラメータ: title, body, labels[]
update_issue — 既存のIssueを更新。パラメータ: id, title?, body?, state?
search_issues — クエリ文字列でIssueを検索。パラメータ: query, limit?
add_comment — Issueにコメントを追加。パラメータ: issue_id, body
なぜ有効か: Claudeがツールリストを一度読むだけで、何が可能かを正確に把握できます。 発見のためのラウンドトリップが不要で、各ツールのスキーマが入力を正確にバリデーションします。
特に効果的な場合: 1つ以上のツールがインタラクティブウィジェット(MCPアプリ)を提供する場合 — 各ウィジェットが1つのツールに自然にバインドされます。
大規模なAPIをラップする場合(数十〜数百のエンドポイント)、すべての操作をツールとして列挙するとコンテキストウィンドウが溢れ、モデルのパフォーマンスが低下します。 代わりに、2つのツールを公開します。
search_actions — 自然言語の意図から、一致するアクションをID・説明・
パラメータスキーマとともに返す。
execute_action — IDとparamsオブジェクトを使ってアクションを実行する。
完全なカタログはサーバー内部に保持されます。Claudeが検索・選択・実行を行い、コンテキストをスリムに保ちます。
ハイブリッド: 使用頻度の高い3〜5つのアクションを専用ツールとして昇格させ、残りは検索/実行の裏側に置く。
→ スキーマ例と説明文の書き方についてはreferences/tool-design.mdを参照。
以下の2つから推奨してください。他にも選択肢はありますが、これらが最もMCP仕様のカバレッジが高く、Claudeとの互換性も優れています。
| フレームワーク | 言語 | 次のような場合に使用 |
|---|---|---|
公式TypeScript SDK (@modelcontextprotocol/sdk) |
TS/JS | デフォルトの選択肢。仕様カバレッジが最も高く、新機能をいち早く取得できる。 |
FastMCP 3.x(PyPIのfastmcp) |
Python | Pythonを好む場合、またはPythonライブラリをラップする場合。デコレーターベースで、ボイラープレートが非常に少ない。これはjlowinのパッケージ — 公式mcp SDKにバンドルされているフリーズ済みのFastMCP 1.0ではない。 |
ユーザーがすでに言語やスタックを決めている場合はそれに従ってください — どちらも同一のワイヤープロトコルを生成します。
デプロイモデル・ツールパターン・フレームワーク・認証の4つの決定が固まったら、以下のいずれか1つを実行してください。
You are guiding a developer through designing and building an MCP server that works seamlessly with Claude. MCP servers come in many forms — picking the wrong shape early causes painful rewrites later. Your first job is discovery, not code.
Load Claude-specific context first. The MCP spec is generic; Claude has additional auth types, review criteria, and limits. Before answering questions or scaffolding, fetch https://claude.com/docs/llms-full.txt (the full export of the Claude connector docs) so your guidance reflects Claude's actual constraints.
Do not start scaffolding until you have answers to the questions in Phase 1. If the user's opening message already answers them, acknowledge that and skip straight to the recommendation.
Ask these questions conversationally (batch them into one message, don't interrogate one-at-a-time). Adapt wording to what the user has already told you.
| If it connects to… | Likely direction |
|---|---|
| A cloud API (SaaS, REST, GraphQL) | Remote HTTP server |
| A local process, filesystem, or desktop app | MCPB or local stdio |
| Hardware, OS-level APIs, or user-specific state | MCPB |
| Nothing external — pure logic / computation | Either — default to remote |
This determines the tool-design pattern — see Phase 3.
references/elicitation.md.@modelcontextprotocol/ext-apps. See build-mcp-app skill.references/auth.mdBased on the answers, recommend one path. Be opinionated. The ranked options:
A hosted service speaking MCP over streamable HTTP. This is the recommended path for anything wrapping a cloud API.
Why it wins:
Choose this unless the server must touch the user's local machine.
→ Fastest deploy: Cloudflare Workers — references/deploy-cloudflare-workers.md (zero to live URL in two commands)
→ Portable Node/Python: references/remote-http-scaffold.md (Express or FastMCP, runs on any host)
If a tool just needs the user to confirm, pick an option, or fill a short form, elicitation does it with zero UI code. The server sends a flat JSON schema; the host renders a native form. Spec-native, no extra packages.
Caveat: Host support is new (Claude Code shipped it in v2.1.76; Desktop unconfirmed). The SDK throws if the client doesn't advertise the capability. Always check clientCapabilities.elicitation first and have a fallback — see references/elicitation.md for the canonical pattern. This is the right spec-correct approach; host coverage will catch up.
Escalate to build-mcp-app widgets when you need: nested/complex data, scrollable/searchable lists, visual previews, live updates.
Same as above, plus UI resources — interactive widgets rendered in chat. Rich pickers with search, charts, live dashboards, visual previews. Built once, renders in Claude and ChatGPT.
Choose this when elicitation's flat-form constraints don't fit — you need custom layout, large searchable lists, visual content, or live updates.
Usually remote, but can be shipped as MCPB if the UI needs to drive a local app.
→ Hand off to the build-mcp-app skill.
A local MCP server packaged with its runtime so users don't need Node/Python installed. The sanctioned way to ship local servers.
Choose this when the server must run on the user's machine — it reads local files, drives a desktop app, talks to localhost services, or needs OS-level access.
→ Hand off to the build-mcpb skill.
A script launched via npx / uvx on the user's machine. Fine for personal tools and prototypes. Painful to distribute: users need the right runtime, you can't push updates, and the only distribution channel is Claude Code plugins.
Recommend this only as a stepping stone. If the user insists, scaffold it but note the MCPB upgrade path.
Every MCP server exposes tools. How you carve them matters more than most people expect — tool schemas land directly in Claude's context window.
When the action space is small (< ~15 operations), give each a dedicated tool with a tight description and schema.
create_issue — Create a new issue. Params: title, body, labels[]
update_issue — Update an existing issue. Params: id, title?, body?, state?
search_issues — Search issues by query string. Params: query, limit?
add_comment — Add a comment to an issue. Params: issue_id, body
Why it works: Claude reads the tool list once and knows exactly what's possible. No discovery round-trips. Each tool's schema validates inputs precisely.
Especially good when one or more tools ship an interactive widget (MCP app) — each widget binds naturally to one tool.
When wrapping a large API (dozens to hundreds of endpoints), listing every operation as a tool floods the context window and degrades model performance. Instead, expose two tools:
search_actions — Given a natural-language intent, return matching actions
with their IDs, descriptions, and parameter schemas.
execute_action — Run an action by ID with a params object.
The server holds the full catalog internally. Claude searches, picks, executes. Context stays lean.
Hybrid: Promote the 3–5 most-used actions to dedicated tools, keep the long tail behind search/execute.
→ See references/tool-design.md for schema examples and description-writing guidance.
Recommend one of these two. Others exist but these have the best MCP-spec coverage and Claude compatibility.
| Framework | Language | Use when |
|---|---|---|
Official TypeScript SDK (@modelcontextprotocol/sdk) |
TS/JS | Default choice. Best spec coverage, first to get new features. |
FastMCP 3.x (fastmcp on PyPI) |
Python | User prefers Python, or wrapping a Python library. Decorator-based, very low boilerplate. This is jlowin's package — not the frozen FastMCP 1.0 bundled in the official mcp SDK. |
If the user already has a language/stack in mind, go with it — both produce identical wire protocol.
Once you've settled the four decisions (deployment model, tool pattern, framework, auth), do one of:
references/remote-http-scaffold.md (portable) or references/deploy-cloudflare-workers.md (fastest deploy). This skill can finish the job.build-mcp-app skill.build-mcpb skill.When handing off, restate the design brief in one paragraph so the next skill doesn't re-ask.
Tools are one of three server primitives. Most servers start with tools and never need the others, but knowing they exist prevents reinventing wheels:
| Primitive | Who triggers it | Use when |
|---|---|---|
| Resources | Host app (not Claude) | Exposing docs/files/data as browsable context |
| Prompts | User (slash command) | Canned workflows ("/summarize-thread") |
| Elicitation | Server, mid-tool | Asking user for input without building UI |
| Sampling | Server, mid-tool | Need LLM inference in your tool logic |
→ references/resources-and-prompts.md, references/elicitation.md, references/server-capabilities.md
Once the server runs:
clientInfo.name: "claude-ai" on initialize. → https://claude.com/docs/connectors/building/testing| Scenario | Deployment | Tool pattern |
|---|---|---|
| Wrap a small SaaS API | Remote HTTP | One-per-action |
| Wrap a large SaaS API (50+ endpoints) | Remote HTTP | Search + execute |
| SaaS API with rich forms / pickers | MCP app (remote) | One-per-action |
| Drive a local desktop app | MCPB | One-per-action |
| Local desktop app with in-chat UI | MCP app (MCPB) | One-per-action |
| Read/write local filesystem | MCPB | Depends on surface |
| Personal prototype | Local stdio | Whatever's fastest |
references/remote-http-scaffold.md — minimal remote server in TS SDK and FastMCPreferences/deploy-cloudflare-workers.md — fastest deploy path (Workers-native scaffold)references/tool-design.md — writing tool descriptions and schemas Claude understands wellreferences/auth.md — OAuth, CIMD, DCR, token storage patternsreferences/resources-and-prompts.md — the two non-tool primitivesreferences/elicitation.md — spec-native user input mid-tool (capability check + fallback)references/server-capabilities.md — instructions, sampling, roots, logging, progress, cancellationreferences/versions.md — version-sensitive claims ledger (check when updating)原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。