DoclightDocs

Troubleshooting

Causes and fixes for MCP connection problems and for each error message the Doclight MCP server can return.

Error messages are fixed text and never contain your key or upstream response bodies. When one includes (request_id: ...), quote it to support.

The server does not appear or will not start

SymptomLikely causeFix
Client says "command not found" or spawn errorBare doclight-mcp is not on the client's PATHUse the full path to the executable inside your virtual environment. See Installation.
No Doclight tools listedConfig file in the wrong place, JSON syntax error, or the client was not restartedCheck the file location for your client, validate the JSON, then fully restart the client.
Only read tools appearThe key has read scope, or its scope could not be determined at startupCreate a key with write scope (and workspace authorisation for create_project), then restart the client.
create_project missing but other write tools presentThe key is write but not authorised for a workspaceCreate a workspace-scoped write credential.
Server starts, then every call failsKey missing or malformedSee below.

Error messages

Message (abridged)MeaningFix
DOCLIGHT_API_KEY is not setThe env block did not reach the serverSet the variable in the client's server configuration, not only in your shell.
DOCLIGHT_API_KEY is malformed: Doclight keys start with aeok_Wrong value, for example the older Settings key or a quoted/truncated secretUse a scoped credential secret.
Authentication failed: the Doclight API key is invalid or revokedHTTP 401Create a new credential and update the configuration.
The key owner's account has no active paid accessHTTP 402Check billing in the dashboard.
The API key lacks the read/write scopeHTTP 403Create a key with the needed scope.
Not found: the brand or run does not exist or is not accessible to this keyHTTP 404Use list_brands for valid ids; the key may not cover that brand.
The API rejected the request parameters (for example an invalid or expired cursor)HTTP 422 on a readStart again without cursor; check limit is 1–100.
The API rejected the arguments as invalid. Check: ...HTTP 422 on a writeThe listed field names are wrong or out of range.
Rate limit exceeded for this API key; retry after about N secondsHTTP 429Wait for Retry-After.
The Doclight API had a temporary server errorHTTP 5xxTry again later.
The Doclight API timed out / Could not reach the Doclight APINetwork or wrong DOCLIGHT_API_URLCheck connectivity and the URL (default https://api.doclight.app).
This brand has no measurement runs yet.get_run_status without a run_id on a brand with no runsNot an error in your setup; start a run first.

Write-tool errors

Message (abridged)MeaningFix
Creating projects needs a write key authorized for a workspaceBrand-only credentialCreate a workspace-scoped write key.
The workspace's project limit for its plan is reachedPlan limitUpgrade or remove a project.
The tracked-prompt limit for this plan is reachedPlan limitUpgrade or archive a prompt.
A project already exists for this domain / This prompt is already trackedDuplicateUse the existing one.
This idempotency key was already used with different argumentsKey reuse with changed inputUse a new key or repeat the original arguments.
The object created by this idempotency key no longer existsThe earlier result was removedUse a new key.
Some of the requested questions do not exist for this brandBad question_idsUse list_questions.
Archived questions cannot be measuredArchived question in trigger_runPick active or paused questions.
None of the requested providers is enabled for some of the questionsproviders does not overlapOmit providers or choose enabled ones.
The run was recorded but the queue refused itdispatch_failed (HTTP 503)Retry with the same idempotency_key; no extra quota is used.

trigger_run also returns (not as an error) status: "rejected" when the daily quota is used up (report_quota_reached) or a run is already in progress (run_in_flight).

Still stuck

Check the key actually works by calling the API directly with curl:

curl -s -H "Authorization: Bearer aeok_xxxxxxxx_yyyyyyyy" https://api.doclight.app/api/v1/credential

A valid key returns its scopes and workspace_scope. If this works but the client does not, the problem is in the client configuration; if it fails, the problem is the key.