Cloudflare API リモートMCPを Gemini CLI にMCP接続する方法(設定手順)

Cloudflare のリモートMCPサーバーを Gemini CLI に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。

🛡️ Official✓ VerifiedStreamable HTTPOAuth 2.1🛡️ A+~239 tok4 tools
Streamable HTTPhttps://mcp.cloudflare.com/mcp

Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:

{
  "mcpServers": {
    "cloudflare-api": {
      "httpUrl": "https://mcp.cloudflare.com/mcp"
    }
  }
}

接続手順

  1. 設定ファイルを編集 — ~/.gemini/settings.json を開きます。
  2. サーバーを追加 — mcpServers に "cloudflare-api": { "httpUrl": https://mcp.cloudflare.com/mcp } を追加します。
  3. 認証を完了 — 初回呼び出し時に Cloudflare の OAuth 認可画面が開きます。許可するとツールが有効になります。
  4. 検証 — オンライン Inspector に https://mcp.cloudflare.com/mcp を貼り付け、initialize と tools/list を実行して接続を確認します。

🧰 ツール一覧(4)

ToolSafetyDescriptionParameters
search_api_endpoints
~60 tok
🟢 ReadSearch the Cloudflare OpenAPI catalog for endpoints.query*: string
execute_api_code
~63 tok
🟠 WriteExecute JavaScript calling the Cloudflare API with your authenticated context.code*: string
list_accounts
~39 tok
🟢 ReadList Cloudflare accounts accessible to your token.—
get_api_schema
~57 tok
🟢 ReadGet the request/response schema of a specific API endpoint.endpoint*: string

その他の接続ガイド