Cloudflare上のリモートMCPサーバー
OAuth ログインを備えた Cloudflare Workers でリモート MCP サーバーを起動して実行してみましょう。
ローカルで開発する
ブラウザでhttp://localhost:8787/
を開くことができるはずです。
MCPインスペクターをサーバーに���続します
新しい MCP API を調べるには、 MCP Inspectorを使用できます。
npx @modelcontextprotocol/inspector
で起動します。- インスペクター内で、トランスポート タイプを
SSE
に切り替え、接続する MCP サーバーの URL としてhttp://localhost:8787/sse
を入力します。 - ベアラートークンを追加し、「接続」をクリックします
- 「リストツール」をクリック
- 「getToken」ツールを実行すると、インスペクタで設定したAuthorizationヘッダーが返されます。
Claude DesktopをローカルMCPサーバーに接続します
Cloudflareにデプロイする
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サーバーに接続します
TODO: mcp-remote
プロキシへの任意のヘッダーをサポートする必要があります
デバッグ
何か問題が発生した場合は、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 ログインとベアラー トークン認証をサポートする Cloudflare Workers ベースの MCP サーバー実装。Claude Desktop や MCP Inspector などの MCP クライアントからの安全な接続を可能にします。
Related MCP Servers
- -securityFlicense-qualityA Cloudflare Workers-based implementation of the Model Context Protocol server with OAuth login, allowing Claude and other MCP clients to connect to remote tools.Last updated -TypeScript
- -securityFlicense-qualityA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server with OAuth login that allows tools like Claude to interact with custom functions remotely.Last updated -TypeScript
- -securityFlicense-qualityA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server with OAuth login that allows tools like Claude to access external capabilities.Last updated -TypeScript
- AsecurityFlicenseAqualityA server that enables Model Context Protocol (MCP) functionality on Cloudflare Workers with OAuth login, allowing applications like Claude Desktop to access custom tools through a standardized interface.Last updated -26TypeScript
Appeared in Searches
- Information about SSE (possible meanings: Scottish and Southern Energy, Server-Sent Events, etc.)
- Finding MCP servers that support SSE or Streamable HTTP, excluding stdio transport
- How to Submit an Outpatient Medical Claim to AIA
- Using Server-Sent Events (SSE) in the Terminal
- A GitHub repository for an MCP server with a clear description of config.json