jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ MCPツールDeveloper

mcp-tool-developer

AIモデルが文脈を理解するための「モデルコンテキスト

⏱ MCPサーバー実装 1日 → 2時間

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Build Model Context Protocol (MCP) servers and tools from scratch. Full-stack MCP development with TypeScript/Python, testing, deployment, and registry publishing.

🇯🇵 日本人クリエイター向け解説

一言でいうと

AIモデルが文脈を理解するための「モデルコンテキスト

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o mcp-tool-developer.zip https://jpskill.com/download/3148.zip && unzip -o mcp-tool-developer.zip && rm mcp-tool-developer.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3148.zip -OutFile "$d\mcp-tool-developer.zip"; Expand-Archive "$d\mcp-tool-developer.zip" -DestinationPath $d -Force; ri "$d\mcp-tool-developer.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して mcp-tool-developer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → mcp-tool-developer フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

💬 こう話しかけるだけ — サンプルプロンプト

  • MCP Tool Developer を使って、最小構成のサンプルコードを示して
  • MCP Tool Developer の主な使い方と注意点を教えて
  • MCP Tool Developer を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[スキル名] mcp-tool-developer

MCPツール開発者

概要

AIエージェントに新しい機能を提供するModel Context Protocol (MCP) サーバーの構築に特化したエキスパートです。仕様策定、実装、テスト、デプロイ、レジストリへの公開といったMCP開発ライフサイクル全体をカバーします。TypeScriptとPythonの両方を、本番環境に対応したパターンでサポートします。

このスキルは、MCPの仕様プリミティブ(ツール、リソース、プロンプト、サンプリング)、トランスポートオプション(stdio、SSE、Streamable HTTP)、およびMCPサーバーを信頼性と構成可能性の高いものにするツール設計パターンを理解しています。

このスキルを使用する場面

  • 新しいMCPサーバーをゼロから構築する場合
  • 既存のAPIをMCPツールとしてラップする場合
  • MCPサーバーの問題をデバッグする場合
  • MCPサーバーのツールスキーマを設計する場合
  • MCPサーバーをレジストリに公開する場合

仕組み

ステップ1: MCPサーバーのスコープを定義する

サーバーが公開すべき機能を特定します。

  • ツール - LLMが呼び出せる関数(主要なユースケース)
  • リソース - LLMが読み取れるデータ(ファイル、API、データベース)
  • プロンプト - 再利用可能なプロンプトテンプレート

トランスポートを選択します。

  • stdio - ローカルCLIツール用(Claude Code、Cursor)
  • SSE (Server-Sent Events) - リモート/ホスト型ツール用
  • Streamable HTTP - 最新のデプロイメント向けMCP仕様の新機能

ステップ2: ツールスキーマを設計する

実装を記述する前に、入出力スキーマを定義します。

{
  name: "tool_name",
  description: "What this tool does (visible to the LLM)",
  inputSchema: {
    type: "object",
    properties: { ... },
    required: [ ... ]
  }
}

ステップ3: サーバーを実装する

適切なエラー処理、検証、ロギングを備えたサーバーを作成します。TypeScriptの場合は公式MCP SDK (@modelcontextprotocol/sdk) を、Pythonの場合は mcp を使用します。

ステップ4: テストとデプロイ

MCP Inspectorでテストし、ツールスキーマを検証し、エッジケースを処理した後、ローカルまたはリモートにデプロイします。

例1: TypeScript MCPサーバー

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "my-tools", version: "1.0.0" });

server.tool("greet", "Greet someone by name",
  { name: z.string().describe("Person's name") },
  async ({ name }) => ({ content: [{ type: "text", text: `Hello, ${name}!` }] })
);

const transport = new StdioServerTransport();
await server.connect(transport);

例2: APIラッパーパターン

外部APIを、認証、レート制限、エラー処理を備えたMCPツールとしてラップします。

  • APIエンドポイントをツールにマッピングする
  • 環境変数を通じて認証を処理する
  • APIレスポンスをLLMにわかりやすい形式に変換する
  • 指数バックオフによるリトライロジックを追加する

ベストプラクティス

  • モノリシックなツールではなく、連結可能な小さく焦点を絞ったツールを構築する
  • クラッシュではなく構造化されたエラーを返す - ツールは正常に失敗すべきです
  • 実装の前にスキーマを定義する
  • LLMが各ツールをいつどのように使用するかを理解するのに役立つ説明を含める
  • すべての入力をスキーマに対して検証する
  • 外部API呼び出しにレート制限を追加する
  • シークレットには環境変数を使用し、認証情報をハードコードしない

制限事項

  • このスキルはガイダンスとコード生成を提供します。実際のランタイムテストには開発環境が必要です
  • MCPの仕様は進化しています。常に最新の仕様バージョンを確認してください
  • 機密データを扱うツールをデプロイする前に、セキュリティレビューが不可欠です

セキュリティと安全に関する注意点

  • ツール実装でAPIキーや認証情報をハードコードしないでください
  • すべての認証には環境変数またはシークレットマネージャーを使用してください
  • インジェクション攻撃を防ぐために、すべての入力を検証しサニタイズしてください
  • 悪用を防ぐために、外部API呼び出しにレート制限を設けてください
  • ツールの権限を慎重に確認してください - ツールはファイル、ネットワークにアクセスし、コードを実行できます

よくある落とし穴

  • 問題: LLMが間違ったパラメータでツールを呼び出す 解決策: ツールの説明を改善し、descriptionフィールドに例を追加してください。LLMは説明を読んでツールの呼び出し方を決定します。

  • 問題: 大量の入力でツールがタイムアウトする 解決策: 入力サイズの検証とページネーションを追加してください。大量のレスポンスはバッファリングするのではなくストリーミングしてください。

関連スキル

  • api-integration-architect - MCPツールで使用されるAPI設計パターンについて
  • security-audit-code-reviewer - MCPサーバーコードのセキュリティレビューについて
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

MCP Tool Developer

Overview

Expert at building Model Context Protocol (MCP) servers that give AI agents new capabilities. Covers the full MCP development lifecycle: specification, implementation, testing, deployment, and registry publishing. Supports both TypeScript and Python with production-ready patterns.

This skill understands MCP specification primitives (tools, resources, prompts, sampling), transport options (stdio, SSE, Streamable HTTP), and the tool design patterns that make MCP servers reliable and composable.

When to Use This Skill

  • Use when building a new MCP server from scratch
  • Use when wrapping an existing API as an MCP tool
  • Use when debugging MCP server issues
  • Use when designing the tool schema for an MCP server
  • Use when publishing an MCP server to a registry

How It Works

Step 1: Define the MCP Server Scope

Identify what capabilities the server should expose:

  • Tools - Functions the LLM can call (primary use case)
  • Resources - Data the LLM can read (files, APIs, databases)
  • Prompts - Reusable prompt templates

Choose the transport:

  • stdio - For local CLI tools (Claude Code, Cursor)
  • SSE (Server-Sent Events) - For remote/hosted tools
  • Streamable HTTP - New in MCP spec for modern deployments

Step 2: Design the Tool Schema

Define input/output schemas before writing implementation:

{
  name: "tool_name",
  description: "What this tool does (visible to the LLM)",
  inputSchema: {
    type: "object",
    properties: { ... },
    required: [ ... ]
  }
}

Step 3: Implement the Server

Create the server with proper error handling, validation, and logging. Use the official MCP SDK for TypeScript (@modelcontextprotocol/sdk) or Python (mcp).

Step 4: Test and Deploy

Test with the MCP Inspector, validate tool schemas, handle edge cases, then deploy locally or remotely.

Examples

Example 1: TypeScript MCP Server

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "my-tools", version: "1.0.0" });

server.tool("greet", "Greet someone by name",
  { name: z.string().describe("Person's name") },
  async ({ name }) => ({ content: [{ type: "text", text: `Hello, ${name}!` }] })
);

const transport = new StdioServerTransport();
await server.connect(transport);

Example 2: API Wrapper Pattern

Wrap an external API as an MCP tool with auth, rate limiting, and error handling:

  • Map API endpoints to tools
  • Handle auth via environment variables
  • Transform API responses to LLM-friendly format
  • Add retry logic with exponential backoff

Best Practices

  • Build small, focused tools that can be chained rather than monolithic tools
  • Return structured errors, not crashes - tools should fail gracefully
  • Define schemas before implementation
  • Include descriptions that help the LLM understand when and how to use each tool
  • Validate all inputs against the schema
  • Add rate limiting for external API calls
  • Use environment variables for secrets, never hardcode credentials

Limitations

  • This skill provides guidance and code generation; actual runtime testing requires a development environment
  • MCP specification is evolving; always check the latest spec version
  • Security review is essential before deploying tools that handle sensitive data

Security and Safety Notes

  • Never hardcode API keys or credentials in tool implementations
  • Use environment variables or secret managers for all authentication
  • Validate and sanitize all inputs to prevent injection attacks
  • Rate limit external API calls to prevent abuse
  • Review tool permissions carefully - tools can access files, networks, and execute code

Common Pitfalls

  • Problem: LLM calls tools with wrong parameters Solution: Improve tool descriptions and add examples in the description field. The LLM reads descriptions to decide how to call tools.

  • Problem: Tool times out on large inputs Solution: Add input size validation and pagination. Stream large responses instead of buffering.

Related Skills

  • api-integration-architect - For API design patterns used in MCP tools
  • security-audit-code-reviewer - For reviewing MCP server code security