Integrations
Enables deployment of the MCP server on Cloudflare's infrastructure with OAuth login support
Provides hosting for the MCP server on Cloudflare Workers, allowing for serverless deployment with persistent storage using KV namespaces
Cloudflare上のリモートMCPサーバー
OAuth ログインを備えた Cloudflare Workers でリモート MCP サーバーを起動して実行してみましょう。
ローカルで開発する
ブラウザでhttp://localhost:8787/
を開くことができるはずです。
MCPインスペクターをサーバーに接続します
新しい MCP API を調べるには、 MCP Inspectorを使用できます。
npx @modelcontextprotocol/inspector
で起動します。- インスペクタ内で、トランスポート タイプを
SSE
に切り替え、接続する MCP サーバーの URL としてhttp://localhost:8787/sse
を入力し、「接続」をクリックします。 - (模擬)ユーザー名/パスワードログイン画面が表示されます。任意のメールアドレスとパスワードを入力してログインしてください。
- MCP インスペクターにリダイレクトされ、定義されたツールを一覧表示して呼び出すことができるようになります。
Claude DesktopをローカルMCPサーバーに接続します
MCP インスペクターは素晴らしいですが、ぜひこれを Claude に接続したいと思っています。Anthropicのクイックスタートに従い、Claude Desktop 内で「設定」>「開発者」>「構成の編集」に移動して、構成ファイルを見つけてください。
テキスト エディターでファイルを開き、次の構成に置き換えます。
これにより、ローカルプロキシが実行され、ClaudeがHTTP経由でMCPサーバーと通信できるようになります。
Claude を開くとブラウザウィンドウが開き、ログインできるようになります。右下に利用可能なツールが表示されます。適切なプロンプトが表示されたら、Claude はツールの呼び出しを要求します。
Cloudflareにデプロイする
npx wrangler kv namespace create OAUTH_KV
- ガイダンスに従って、kv名前空間IDを
wrangler.jsonc
に追加します。 npm run deploy
リモート MCP クライアントから新しく展開したリモート MCP サーバーを呼び出す
上記の「ローカルで開発する」と同じように、MCP インスペクターを実行します。
npx @modelcontextprotocol/inspector@latest
次に、接続先の MCP サーバーの URL として、インスペクターにワーカーのworkers.dev
URL (例: worker-name.account-name.workers.dev/sse
) を入力し、「接続」をクリックします。
これで、リモート MCP クライアントから MCP サーバーに接続されました。
Claude DesktopをリモートMCPサーバーに接続します
Claude 構成ファイルを更新して、 workers.dev
URL (例: worker-name.account-name.workers.dev/sse
) を参照し、Claude を再起動します。
デバッグ
何か問題が発生した場合は、Claude を再起動するか、次のコマンドを使用してコマンド ラインで MCP サーバーに直接接続してみると役立つことがあります。
まれに、 ~/.mcp-auth
に追加されたファイルを消去すると解決する場合があります。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
OAuth 認証をサポートする Claude やその他の AI モデルでツールを使用できるようにする、Cloudflare Workers 上のモデル コンテキスト プロトコル サーバーのデプロイメント。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server implementation that runs on Cloudflare Workers with OAuth login, allowing Claude and other AI models to access tools via the MCP standard.Last updated -TypeScript
- -securityFlicense-qualityA Model Context Protocol server for Cloudflare Workers that integrates with Claude AI, enabling tool usage through OAuth login and SSE connections.Last updated -14TypeScript
- -securityFlicense-qualityA Model Context Protocol server implementation that runs on Cloudflare Workers, providing tool integration for AI assistants like Claude with OAuth login capability.Last updated -14TypeScript
- -securityFlicense-qualityA Cloudflare Workers-based server implementing the Model Context Protocol that enables AI assistants like Claude to securely access external tools through OAuth authentication.Last updated -14TypeScript