Documentation
Guides for chamelAIn

MCP troubleshooting

Fix common connection and authentication issues.

Use this guide when your AI client cannot list personas or MCP requests fail after setup.

401 Unauthorized or authentication errors

Symptoms: Cursor reports unauthorized, 401, or empty persona lists despite a configured server.

Remediation:

  1. OAuth config (URL only): Use dashboard → MCP CONNECTConnect with OAuth. Ensure your config has no `headers` block. Restart your client and complete browser sign-in when prompted.
  2. Fallback access key: If OAuth keeps failing, create a key from the connect modal (Access key tab) or Settings → Security. Download fresh configuration with `Authorization` pre-wired.
  3. Replace the `chamelain` entry in your client's MCP config and restart the client.

OAuth sign-in expired

Symptoms: MCP worked after browser login but fails later with a message about sign-in expired.

Remediation:

Under normal operation, your client refreshes OAuth tokens automatically after your one-time sign-in. If you see an expiry error:

  1. Reconnect in your client (it should open the browser again).
  2. If OAuth keeps failing after reconnect, create a fallback access key from the dashboard connect modal or Settings → Security.

Wrong MCP URL

Symptoms: Connection timeouts, 404, `Cannot POST /`, "unsupported method", or SSE `Invalid content type` errors.

Remediation:

  1. Re-download configuration from Connect with OAuth or the Access key tab on the dashboard — use the `url` from that artifact in your MCP config.
  2. The URL must end with `/mcp` (for example `https://your-mcp-host.onrender.com/mcp`). If you see `Cannot POST /` in client logs, your config is pointing at the service root without `/mcp` — re-download configuration or append `/mcp` manually.
  3. Production uses the value from `NEXT_PUBLIC_MCP_URL` — never point at localhost unless you are running `mcp-server` locally for engineering.
  4. After correcting the URL, restart your client.

Expired or revoked token

Symptoms: MCP worked previously but suddenly returns 401 or empty data.

Remediation:

  1. Open Settings → Security and review MCP Access Keys.
  2. Revoke compromised or unused keys.
  3. Create a new fallback key or reconnect via OAuth from the dashboard, then replace your Cursor configuration.

Session errors (Bad Request: No valid session ID)

Symptoms: Errors mentioning session ID, SSE 404, or streamable HTTP failures.

Remediation:

  1. Restart Cursor after updating `mcp.json`.
  2. Ensure you are on the latest hosted `mcp-server` deployment (operators: redeploy Render if the endpoint is stale).
  3. Re-authorize to obtain a configuration that includes the required headers block (fallback keys only).

SSE stream drops after several minutes (`Failed to open SSE stream`)

Symptoms: MCP connects and works briefly, then fails with `Failed to open SSE stream` / `Maximum reconnection attempts exceeded` after roughly 5–10 minutes of idle time.

Cause: Hosted proxies (e.g. Render) can close long-lived SSE connections. The MCP client then tries to reopen the notification stream on the same session.

Remediation:

  1. Restart Cursor — this starts a fresh MCP session.
  2. Operators: deploy the latest `mcp-server` (includes SSE reconnect handling).
  3. If the problem persists after a server restart or Render spin-down, reconnect via OAuth or create a new fallback key so Cursor picks up a fresh session.

Still stuck?

Email support@chamelain.com with your org name and the error message from Cursor (redact any tokens).