Create MCP
作成-mcp
モデル制御プロトコル (MCP)サーバーをセットアップして Cloudflare Workers にデプロイする CLI ツール。これにより、数分でカーソル エージェント用の新しいツールの作成を開始できます。
JSDoc コメントを使用して TypeScript 関数を記述するだけで、エージェントに MCP ツールを提供できます。
前提条件
Wrangler CLIがインストールされ、Cloudflare アカウントでログインしています。
Claude デスクトップ アプリがインストールされました。(近日中に削除されます)
Related MCP server: Workers MCP Demo
説明書
新しい MCP サーバーをスキャフォールディングしてデプロイするには、次のコマンドを実行します。
bun create mcpコマンドに直接名前を渡すこともできます: bun create mcp --name <server-name> 。
このCLIの機能
テンプレートワーカーリポジトリを
<current-dir>/<server-name>に複製します。依存関係をインストールします
Gitリポジトリを初期化する
CloudflareアカウントにHello World MCPサーバーをデプロイします
Claude Desktopに追加します
MCPサーバコマンドをクリップボードにコピーして、カーソルに貼り付けることができます。
使い方
src/index.tsのMyWorkerクラスに関数を追加するだけです。各関数はMCPツールにコンパイルされます。
例えば:
/**
* A warm, friendly greeting from your new Workers MCP server.
* @param name {string} the name of the person we are greeting.
* @return {string} the contents of our greeting.
*/
sayHello(name: string) {
return `Hello from an MCP Worker, ${name}!`;
}最初の行はツールの説明です。
@paramタグは、タイプと説明が付いたツールのパラメータです。@returnタグは、ツールの戻り値とその型です。
変更の展開
ワーカーを再デプロイします。
bun run deployカーソル ウィンドウを再読み込みします。
これで、エージェントに新しいツールを使用するように依頼できるようになりました。
Cloudflare Workersを選ぶ理由
雰囲気、素晴らしい DX、そして驚くほど速い展開。
私はMCPサーバーをローカルで実行するのが嫌いで、皆さんもそうではないと思います。しかし、CursorでAPIを呼び出すシンプルなMCPツールを使うために、Nodeプロセスを実行する必要がなくなりました。
関数を書くだけで、JSDocのコメントに説明とパラメータを記述するだけで動作します。
create-mcp で作成されたサンプルサーバー
create-mcp で作成された任意の MCP サーバーを複製して、自分の Cloudflare アカウントにデプロイできます。
bun create mcp --clone <github-url>This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Cloudflare Workers MCP server: agent-workflow-engine
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables the creation and deployment of API-based MCP tools for Cursor Agent using Cloudflare Workers, streamlining development and integration of custom functionalities.5 npm49-
- AlicenseBqualityDmaintenanceA demonstration project that uses Cloudflare Workers MCP to create custom AI tools that can be integrated with Claude, Cursor, and other AI assistants supporting the Model Context Protocol.29 npm30MIT
- FlicenseNot gradedqualityCmaintenanceA serverless tool that allows deployment of authentication-free Model Context Protocol servers on Cloudflare Workers, enabling AI assistants to utilize custom tool functionalities.1-
- FlicenseNot gradedqualityCmaintenanceA tool that deploys a remote Model Context Protocol (MCP) server on Cloudflare Workers without authentication requirements, allowing developers to add custom tools that can be accessed from Claude Desktop or the Cloudflare AI Playground.-