Remote MCP Server with Bearer Auth
Cloudflare上のリモートMCPサーバー
OAuth ログインを備えた Cloudflare Workers でリモート MCP サーバーを起動して実行してみましょう。
ローカルで開発する
# clone the repository
git clone git@github.com:cloudflare/ai.git
# install dependencies
cd ai
npm install
# run locally
npx nx dev remote-mcp-server-bearer-authブラウザでhttp://localhost:8787/を開くことができるはずです。
Related MCP server: Remote MCP Server on Cloudflare
MCPインスペクターをサーバーに接続します
新しい MCP API を調べるには、 MCP Inspectorを使用できます。
npx @modelcontextprotocol/inspectorで起動します。インスペクター内で、トランスポート タイプを
SSEに切り替え、接続する MCP サーバーの URL としてhttp://localhost:8787/sseを入力します。ベアラートークンを追加し、「接続」をクリックします
「リストツール」をクリック
「getToken」ツールを実行すると、インスペクタで設定したAuthorizationヘッダーが返されます。
Claude DesktopをローカルMCPサーバーに接続します
"remote-example": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse",
"--header",
"Authorization: Bearer {token}"
]
}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 サーバーに直接接続してみると役立つことがあります。
npx mcp-remote http://localhost:8787/sseまれに、 ~/.mcp-authに追加されたファイルを消去すると解決する場合があります。
rm -rf ~/.mcp-authThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA Cloudflare Workers-based implementation of the Model Context Protocol server with OAuth login, allowing Claude and other MCP clients to connect to remote tools.1
- -licenseNot gradedqualityNot gradedmaintenanceA server implementation for the Model Context Protocol (MCP) that runs on Cloudflare Workers and supports OAuth login, allowing Claude AI to use custom tools through local or remote connections.1,284
- FlicenseNot gradedqualityCmaintenanceA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server that enables AI tools like Claude to connect to external services through OAuth login.
- -licenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server implementation that runs on Cloudflare Workers with OAuth authentication support, allowing users to connect MCP clients like Claude Desktop or the MCP Inspector to utilize remote AI tools.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted remote MCP server for YNAB on Cloudflare Workers with OAuth
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/huanshenyi/mcp-server-bearer-auth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server