MCP troubleshooting
What each refusal from App Builder's MCP server means, and what to do about it.
The server refuses in two ways. A request it will not serve at all gets an HTTP
error with a JSON body. A tool call it serves but refuses gets a tool result
with isError: true and one sentence in content[0].text. Both are listed
below with what to do.
The request is refused
| HTTP | Message | What to do |
|---|---|---|
| 401 | Missing or malformed Authorization header. | Send Authorization: Bearer <key>. If the header reads Bearer ${AINOX_API_KEY}, your client did not expand the variable: set it in the environment the client starts from, then restart the client. |
| 401 | Invalid API access key. / API access key not found. | The key is mistyped or cut short, or it was deleted. Copy the whole key again, or create one. |
| 401 | API access key has been revoked. | The key was revoked, or rotated (rotating revokes the old key). Use the new key, or create one. |
| 401 | API access key has expired. | Create a new key, or rotate the old one before it expires. Settings › API access marks keys that expire within 14 days. |
| 401 | API access key is not valid for this organization. | The key's owner is no longer a member of the key's workspace. Ask to be added back, or use a key from a workspace you belong to. |
| 403 | Required scope 'builder:mcp' is not granted to this API access key. | The key lacks the App Builder (MCP) scope. Scopes cannot be added to an existing key: create a new key with it. |
| 429 | Rate limit exceeded. Please retry later. | The key sent more than 120 requests in a minute. Wait the seconds in the Retry-After header, then poll more slowly, or give each tool its own key. |
| 429 | API access key rate limit exceeded. | The key's own limit is lower than the server's. Keys created with App Builder (MCP) allow 120 a minute; an older key with this scope may allow fewer. Rotate it on Settings › API access: the new key gets 120 a minute. |
| 400 | Batches are not supported: send one JSON-RPC message per request. | Send each message in its own request. |
| 405 | Method not allowed: this MCP server is stateless. | Send POST. The server opens no event stream and keeps no session, so GET and DELETE are refused; a client that insists on a session is not supported. |
A config from the old App Builder
The old server lived at a different address ending in /api/mcp/code/mcp and
accepted x-api-key: <key>. Against the new endpoint, x-api-key alone gets
Missing or malformed Authorization header. Change the URL to the one under
Connect App Builder, send the key as Authorization: Bearer <key>, and use a
new key with the App Builder (MCP) scope. The old server also answered
tools/list without a key; this one needs the key on every request.
Connect an MCP client
has the full list.
A tool call is refused
The app
| Message | What to do |
|---|---|
Builder app <id> was not found. | The app does not exist, was deleted, belongs to someone else, or lives in another workspace than the key's. Call list_apps for IDs you can use. |
Member token limit reached. Resets at <time>. Ask a workspace admin to change or pause the limit. | You used your share of the workspace's AI budget. Wait until the time shown, or ask an admin. No app is created when create_app is refused this way. |
Prompts and turns
| Message | What to do |
|---|---|
The agent is still replying: wait for it, or stop it with stop_run. | The app takes one turn at a time, from your client or from App Builder. Poll get_app until status is not running, or call stop_run. |
The agent is waiting on a tool call: answer it with resolve_tool_call first. | Answer every entry in pendingToolCalls first; stop_run does not clear them. |
A version is being restored. Send your message once it finishes. | Someone is restoring an earlier version in App Builder. Try again in a moment. |
No pending tool call with that runId and toolCallId: get_app lists the current ones. | The question was already answered, perhaps in App Builder, or the IDs come from an older get_app. Call get_app again. |
<tool> waits for approval, which MCP cannot give: answer it in App Builder. | Open the app in App Builder and approve or decline it there. |
The answers do not fit the questionnaire | Answer with the question IDs from input.questions, and each option label exactly as offered. |
The running turn did not confirm the stop. Try again. | Call stop_run again. If App Builder restarted during the reply, the stop succeeds at most three minutes after the reply started. |
Files
| Message | What to do |
|---|---|
This app has no project yet. Send the agent a prompt first, then try again. | Wait until the agent's first reply has written the app. |
<path> does not exist in the app's project. | Call list_files on the folder to see what is there. Paths are relative to the project root, .. |
<path> is not a file. / <path> is not a directory. | Use read_file for files and list_files for folders. |
<path> is outside the app's project. | Remove .. and absolute paths; only the project can be read. |
read_file reads text files up to 1 MB (1,048,576 bytes); a larger file is refused with <path> is <n> bytes, over the 1048576 bytes read_file returns.
Publishing
| Message | What to do |
|---|---|
Name the app to publish it for the first time. | Pass name on the first publish. |
Nothing to publish yet. Send the agent a prompt first, then publish. | Wait for the agent to write the app, then publish. |
This app is already publishing. Wait for it to finish, then publish again. | Poll get_app until deployment.status is published or failed. |
When deployment.status ends at failed, deployment.reason says why. A
broken build is fixed by asking the agent with send_message, then publishing
again.
Marketplace
| Message | What to do |
|---|---|
Publish the app before sharing it to the Marketplace. | Publish it, and wait until deployment.status is published. A first publish that failed answers this too. |
The site was taken down. Publish the app again to share it. | A workspace manager or a platform admin took the site down (get_app shows siteTakenDown: true). Publish it again, wait until deployment.status is published, then list it. |
Wait for the app to finish publishing, then share it. | The first publish is still queued or building. Poll get_app until deployment.status is published, then list it. A republish in flight does not block a listing. |
Only apps everyone in the workspace can open can be listed. Change who can open it under Share first. | In App Builder, open Share and let everyone in the workspace, or anyone with the link, open the site. |
Type a category. | Remove empty category names. |
Use 30 characters or fewer. | Shorten the category. |
Up to 5 categories. Remove one to add another. | Send five categories or fewer. |
Name each category once, up to 5 categories. | Remove repeats, including ones that differ only in case. |
Creating the key
| Message | What to do |
|---|---|
A key with App Builder (MCP) needs a rate limit of at least 120 requests a minute, over a window of 60 seconds or more. | Close Advanced options to get the default of 120 a minute, or set a window of 60 seconds or more with at least 2 requests a second on average. |
Something went wrong on the server
Something went wrong on the server. Try again, and quote request <id> if it keeps failing.The server failed in a way that is not your call's fault: for example, App Builder has no model chosen in this workspace. Try again; if it keeps failing, send the request ID to a workspace admin, who can find the cause in the server's logs.
Other errors from the client
| Message | What to do |
|---|---|
MCP error -32602: Unknown tool: <name> | The tool name is wrong; old names such as list_threads were renamed (see the tool reference). |
Invalid input: expected string, received undefined → at appId (or similar) | An argument is missing or has the wrong type. The tool reference lists each tool's arguments. |