MCP troubleshooting

Fix common problems when connecting ChatGPT, Codex, Claude or Cursor to the RedERP MCP server: sign-in errors, 401 responses, missing documents, locked records, expired PDF links.

Connecting

SymptomCauseFix
The client says the server needs authentication / shows a login buttonExpected: the first call answers 401 with OAuth discoveryClick Connect / Sign in and complete the RedERP consent page
"Invalid email or password" on the consent pageWrong credentials, or the user signs in with a one-time code onlySet a password in RedERP (Profile → Security) and retry
"Too many failed attempts"Account lockout after repeated failures (same rule as the web sign-in)Wait for the lock to expire (1 hour after 10 failures), then retry
"This company account is not active" / "This user is not active"Subscription expired or user disabledRenew the subscription or ask your administrator to re-activate the user
invalid_client / Unregistered redirect_uriThe client's callback URL is not on the allowed hostsSupported clients: ChatGPT, OpenAI Platform, Claude, Cursor and loopback (http://localhost:…) callbacks. Other clients: contact support to allow-list the host
"This sign-in request has expired"More than 10 minutes elapsed on the consent pageStart the connection again from the assistant
Unknown resource at the token stepThe client requested a resource other than https://rederp.ai/mcpPoint the client at the exact URL https://rederp.ai/mcp

Using the tools

SymptomCauseFix
"No invoices match in the current fiscal year"Lists default to the current fiscal yearAsk for "all years" or give a date range (all_years: true)
insufficient_scopeThe token was granted with sales:read onlyDisconnect and reconnect, granting Create sales records
forbidden / "You don't have permission"Your RedERP role does not allow the actionAsk your administrator for the permission in Settings → Users & roles
LOCKED (409) when adding lines or changing statusThe document is locked in RedERPUnlock it in the web app, or leave it as is
"Several locations exist — specify location_id"The company has several warehouses / ledgers and no obvious defaultAsk the assistant to list the setup options (get_sales_setup_options) and name the one to use
"is not allowed here" when changing a statusOnly forward statuses are accepted; cancel / void / reject are refusedUse the RedERP web app for cancellations
A conversion is refusedSource status does not allow it (e.g. cancelled quotation, order not confirmed)Advance the source document first (update_sales_document_status)
Client name shows a duplicate error on create_clientClient names are unique per companySearch the existing client and reuse it
SymptomCauseFix
410 Gone — This download link has expiredLinks last 7 daysAsk the assistant for a fresh link (get_sales_document_pdf)
403 — This download link is not validThe URL was altered or truncated when copiedCopy the full pdf_url including exp and sig
502 — The PDF could not be generated right nowTemporary rendering issueRetry in a moment; the printable print_url works meanwhile

Rate limits

The OAuth endpoints are rate-limited (for example 30 sign-in attempts per 15 minutes per IP, 20 client registrations per hour). A 429 answer means "wait and retry"; it does not affect already issued tokens.

Still stuck?

Collect the client name (ChatGPT web / iOS / Android, Codex, Claude, Cursor…), the time of the attempt and the exact error text, then contact support: rederp.ai/contactus. Developers can reproduce the flow with MCP Inspector and check https://rederp.ai/.well-known/oauth-authorization-server.