> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ailunapro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting MCP connections

> Fix the most common problems when connecting an AI client to AiLunaPro over MCP.

## Check your key directly

Most problems come down to the key. This request bypasses your AI client and shows the server's answer.

```bash macOS / Linux theme={null}
curl -s -w "\nHTTP %{http_code}\n" https://api.ailunapro.com/mcp \
  -H "Authorization: Bearer $AILUNAPRO_MCP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
```

```powershell Windows (PowerShell) theme={null}
'{"jsonrpc":"2.0","id":1,"method":"ping"}' | Set-Content -Encoding ascii ping.json
curl.exe -s -w "`nHTTP %{http_code}`n" https://api.ailunapro.com/mcp `
  -H "Authorization: Bearer $env:AILUNAPRO_MCP_KEY" `
  -H "Content-Type: application/json" `
  -d "@ping.json"
Remove-Item ping.json
```

| You get | Meaning | Next step |
| - | - | - |
| `{"jsonrpc":"2.0","id":1,"result":{}}` and `HTTP 200` | The key works | The problem is in your client's configuration; see below |
| `HTTP 401` | Key missing, mistyped or revoked | Check the variable is set in this window; create a new key |
| `HTTP 404` | MCP is not enabled for your organisation | Contact support to request access |
| `HTTP 405` | You sent a `GET` | Use `POST` (the command above does) |

## Common problems

> [accordion] I can't find AI client access (MCP) in Settings
>
> The card appears only for **owners**, and only when MCP is enabled for your organisation. Your role is shown under your name at the bottom of the sidebar. If you are an owner and still do not see it, contact [AiLunaPro support](https://developers.ailunapro.com/developers/support.md).

> [accordion] The client connects but lists no tools
>
> * Restart the client fully after changing its configuration.
> * In VS Code, check the server shows **Running** and is ticked in the chat's tool picker.
> * In Claude Code, run `/mcp`; in Codex, run `/mcp`; in Cursor, open **Settings → MCP**.

> [accordion] 401 Unauthorized after it used to work
>
> The key was revoked, or the client lost the environment variable (new machine, new shell profile, variable set only in an old window). Create a new key and update the client.

> [accordion] No matching audit was found for your account
>
> The tools read the audits of the owner who created the key. This message means:
>
> * you have not started (progress) or completed (result) an Audit Express yet; or
> * the `draftId` you passed belongs to someone else or does not exist.
>
> Complete an Audit Express in AiLunaPro, then ask again.

> [accordion] The result is from an older audit than I expected
>
> Without a `draftId`, the tools use your most recent audit among the last 50. Every tool response includes the `draftId` it used. Ask your client to call the tool again with the `draftId` of the audit you want.

> [accordion] Daily MCP limit reached for this key
>
> Each key has 500 tool calls per day, reset at 00:00 UTC. Create a separate key for each device or client so they don't share one allowance. See [Limits](https://developers.ailunapro.com/developers/reference/limits.md).

> [accordion] My client opens a browser to sign in, then fails
>
> The client is trying OAuth, which AiLunaPro does not offer yet. Configure the key in a header as shown in your client's guide. For Claude Desktop, use the [`mcp-remote` bridge](https://developers.ailunapro.com/developers/clients/claude-desktop).

> [accordion] Tool not available
>
> The client asked for a tool AiLunaPro does not offer, or an action that is never allowed (such as answering audit questions or changing scores). Only the [three published tools](https://developers.ailunapro.com/developers/reference/tools/index.md) run.

> [accordion] The AI's summary says something the audit didn't
>
> Your AI client writes the summary; AiLunaPro supplies the data. Ask the client to quote the score and findings exactly, and compare with the report in AiLunaPro. AiLunaPro results are informational and not legal advice.

## Still stuck?

Send [AiLunaPro support](https://developers.ailunapro.com/developers/support.md):

* your client and its version;
* the HTTP status from the key check above;
* the time of the failed attempt, with your time zone.

Never send your key. Support never needs it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.