MCP Server Endpoint

QAnswer serves the remote MCP servers configured in it as standard MCP endpoints, over Streamable HTTP. Any MCP client — Claude Code, Cursor, VS Code, an MCP SDK — can use a server's tools with a QAnswer API key: QAnswer checks the key and passes each call on to the server.

It is the MCP counterpart of the Chat Completions endpoint, which does the same for LLM providers.

Endpoint

Each server has its own URL, ending with the server's identifier. The server's API tab in QAnswer shows it, ready to copy.

POST https://app.qanswer.ai/backend/api/v1/mcp/YOUR_SERVER_UID

Authentication

Send a QAnswer API key with every request, in either header:

  • Authorization: Bearer <key> — the header MCP clients send by default.
  • QAnswer-Api-Key: <key>

Create a key on the API Access page. Your plan has to include API access.

The key stays in QAnswer: it is never sent to the MCP server.

Which servers a key reaches

  • A user, team or organization key reaches every MCP server its owner can use in QAnswer.
  • A key bound to one MCP server reaches that server only. Such a key is created through the API, with POST /api/api-key/resource/mcp/{id}, by someone who can at least read the server.
  • A key bound to an AI assistant or to an LM provider is refused.
  • Only servers whose authentication is set to None are served: a server set to API Key or OAuth answers 400.
  • QAnswer's built-in servers — Web, Image Generation, Code Execution, Document Search, Assistants and Zimbra — run inside QAnswer and are never served here.

Connect a client

Replace the URL with the one from the server's API tab, and YOUR_API_KEY with your key.

In claude_desktop_config.json (Settings → Developer → Edit Config), through mcp-remote, which runs on your machine and forwards to the endpoint. It needs Node.js 18 or later; restart Claude Desktop after saving:

{
  "mcpServers": {
    "qanswer-my-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://app.qanswer.ai/backend/api/v1/mcp/YOUR_SERVER_UID",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": { "AUTH_HEADER": "Bearer YOUR_API_KEY" }
    }
  }
}

Limitations

  • Tools only: resources, prompts and completions are not offered.
  • The tools offered are the ones synced into QAnswer and switched on by the server's owner, with the descriptions set in QAnswer.
  • The endpoint is stateless and answers in JSON: no session, no event stream, no progress notifications. A tool call answers once the MCP server has answered.
  • QAnswer's ask-for-confirmation setting applies to its own chat only; approving tool calls is up to your client.
  • Tool calls are not charged credits.
  • Clients that connect to remote servers only through OAuth, such as ChatGPT, cannot use the endpoint, which takes a static API key.

Errors

Problems with the request are HTTP errors. Problems with a single call come back in a normal 200 response, so the client keeps its connection.

  • 401 / 403 — no key, an invalid or expired key, a key bound to another resource, or no access to the server
  • 404 — no server with that identifier
  • 400 — a built-in server, a server that requires authentication, a body that is not a single JSON-RPC message, or an unsupported MCP-Protocol-Version header
  • 200, JSON-RPC -32601 — a method other than initialize, ping, tools/list and tools/call
  • 200, JSON-RPC -32602 — invalid parameters, or a tool the server does not offer
  • 200, isError — the tool failed, or the MCP server could not be reached