Skip to main content
Glama
Sebzo-work

Remote MCP Server

by Sebzo-work

Cloudflare上でのリモートMCPサーバーの構築(認証なし)

この例では、認証を必要としないリモートMCPサーバーをCloudflare Workersにデプロイできます。

はじめに:

Deploy to Workers

これにより、MCPサーバーが remote-mcp-server-authless.<your-account>.workers.dev/sse のようなURLにデプロイされます。

あるいは、以下のコマンドラインを使用して、ローカルマシン上にリモートMCPサーバーを作成することもできます:

npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless

Related MCP server: remote-mcp-server-authless

MCPサーバーのカスタマイズ

独自のツールをMCPサーバーに追加するには、src/index.tsinit() メソッド内で this.server.tool(...) を使用して各ツールを定義します。

Cloudflare AI Playgroundへの接続

リモートMCPクライアントであるCloudflare AI PlaygroundからMCPサーバーに接続できます:

  1. https://playground.ai.cloudflare.com/ にアクセスします。

  2. デプロイしたMCPサーバーのURL (remote-mcp-server-authless.<your-account>.workers.dev/sse) を入力します。

  3. これで、playgroundから直接MCPツールを使用できるようになります!

Claude DesktopをMCPサーバーに接続する

mcp-remote proxyを使用することで、ローカルのMCPクライアントからリモートMCPサーバーに接続することも可能です。

Claude DesktopからMCPサーバーに接続するには、Anthropicのクイックスタートに従い、Claude Desktop内で「設定」>「デベロッパー」>「設定を編集」に移動します。

以下の設定で更新してください:

{
  "mcpServers": {
    "calculator": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/sse"  // or remote-mcp-server-authless.your-account.workers.dev/sse
      ]
    }
  }
}

Claudeを再起動すると、ツールが利用可能になるはずです。

Related MCP Connectors

Related MCP Servers