Skip to content

MCP connection established but API calls return no data #225

@leonaries

Description

@leonaries

Bug Report

Environment

  • OS: macOS
  • Node.js: v20.19.4
  • MCP Server: @cloudflare/mcp-server-cloudflare (latest)
  • Client: Claude Desktop App

Problem Description

MCP connection establishes successfully and shows proper authentication, but all API calls return empty results without errors.

Configuration

{
  "mcpServers": {
    "cloudflare": {
      "command": "/Users/leon/.nvm/versions/node/v20.19.4/bin/npx",
      "args": ["-y", "@cloudflare/mcp-server-cloudflare", "run", "YOUR_ACCOUNT_ID"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "YOUR_API_TOKEN",
        "PATH": "/Users/leon/.nvm/versions/node/v20.19.4/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

API Token Permissions

  • Zone : Zone : Read
  • Zone : DNS : Edit
  • Account : Cloudflare Pages : Edit

Logs

[DEBUG 2025-09-04T15:41:46.128Z] Config loaded: {"accountId":"✓","apiToken":"✓"}
[DEBUG 2025-09-04T15:41:46.129Z] Starting server...
[DEBUG 2025-09-04T15:41:46.129Z] Server connected and running

Connection appears successful, tools list is returned properly, but calls like:

  • zones_list
  • worker_list
  • get_kvs

All return empty results without errors.

Expected Behavior

API calls should return actual Cloudflare account data (zones, workers, pages projects, etc.)

Actual Behavior

  • Connection establishes successfully
  • Authentication appears to work (✓ checkmarks in logs)
  • Tools are loaded and available
  • But all API calls return empty/no data

Additional Context

  • API token works correctly when tested directly with curl
  • Account has active Cloudflare Pages projects and domains
  • Same issue occurs across different API endpoints

Potential Issues

  1. Account ID parameter might not be properly passed to API calls
  2. Token permissions might be insufficient despite appearing to authenticate
  3. Duplicate server initialization in logs suggests possible internal state issues

Would appreciate guidance on debugging this further or if there are known issues with the current version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions