MCP Client
OpenAI Codex Desktop / codex-cli 0.149.1 on macOS arm64.
Authentication Type
OAuth, multi-account session.
MCP Server Configuration
{
"type": "http",
"url": "https://mcp.cloudflare.com/mcp"
}
No token or account identifier is included in this report.
Failing Endpoint / Tool
execute, before a GET /accounts/{account_id}/subscriptions request could be made.
Bug Description
The hosted execute tool accepted a valid account_id argument, and its dynamic tool description explicitly said that accountId is set from the optional account_id tool argument. Inside the sandbox, however, reading accountId immediately raised ReferenceError: accountId is not defined.
This appears to be a deployed-server/runtime regression or mismatch with the current tool contract. The current cloudflare/mcp source in src/tools/execute.ts also appears to inject const accountId = ... when an account is selected. Related issue #65 described this exact desired one-place account-selection behavior and is closed.
Steps to Reproduce
- Connect to
https://mcp.cloudflare.com/mcp with OAuth for a user that can access multiple accounts.
- Call
execute with a valid account_id tool argument.
- Use the documented binding in the async code, for example:
async () => {
const r = await cloudflare.request({
method: "GET",
path: `/accounts/${accountId}/subscriptions`,
query: { page: 1, per_page: 100 }
});
return { success: r.success, status: r.status };
}
- Observe that execution fails before the API request.
Expected Behavior
When account_id is supplied, the sandbox should define accountId to that exact selected account for the duration of the call. If account selection is absent or invalid, the tool should return the documented explicit account-selection error rather than an undefined-variable error.
Actual Behavior
The call failed immediately with:
ReferenceError: accountId is not defined
at exec_main.mjs:2:71
A subsequent call that hardcoded the same account identifier into the path reached the Cloudflare API layer, confirming that the sandbox and request helper otherwise executed. Hardcoding is a brittle workaround and contradicts the tool description.
Additional Context
- Observed: 2026-08-27 UTC.
- Codex Cloudflare plugin metadata:
cloudflare 0.1.2, which points to the official hosted MCP server.
- Current
cloudflare/mcp main observed at 75c4dbc005e2ee14b937b18089a7880062264351.
- Suggested regression coverage: hosted/multi-account
execute with an explicit account_id, an expression that reads accountId, and a read-only API path; separately verify the intentional no-account error.
MCP Client
OpenAI Codex Desktop /
codex-cli 0.149.1on macOS arm64.Authentication Type
OAuth, multi-account session.
MCP Server Configuration
{ "type": "http", "url": "https://mcp.cloudflare.com/mcp" }No token or account identifier is included in this report.
Failing Endpoint / Tool
execute, before aGET /accounts/{account_id}/subscriptionsrequest could be made.Bug Description
The hosted
executetool accepted a validaccount_idargument, and its dynamic tool description explicitly said thataccountIdis set from the optionalaccount_idtool argument. Inside the sandbox, however, readingaccountIdimmediately raisedReferenceError: accountId is not defined.This appears to be a deployed-server/runtime regression or mismatch with the current tool contract. The current
cloudflare/mcpsource insrc/tools/execute.tsalso appears to injectconst accountId = ...when an account is selected. Related issue #65 described this exact desired one-place account-selection behavior and is closed.Steps to Reproduce
https://mcp.cloudflare.com/mcpwith OAuth for a user that can access multiple accounts.executewith a validaccount_idtool argument.Expected Behavior
When
account_idis supplied, the sandbox should defineaccountIdto that exact selected account for the duration of the call. If account selection is absent or invalid, the tool should return the documented explicit account-selection error rather than an undefined-variable error.Actual Behavior
The call failed immediately with:
A subsequent call that hardcoded the same account identifier into the path reached the Cloudflare API layer, confirming that the sandbox and request helper otherwise executed. Hardcoding is a brittle workaround and contradicts the tool description.
Additional Context
cloudflare0.1.2, which points to the official hosted MCP server.cloudflare/mcpmain observed at75c4dbc005e2ee14b937b18089a7880062264351.executewith an explicitaccount_id, an expression that readsaccountId, and a read-only API path; separately verify the intentional no-account error.