Skip to content

Help centerAlerts and AI assistant

How do I connect Qanary to Claude Code, Cursor, or VS Code?

Create a token in Qanary, on the “MCP” page, then add the https://mcp.qanary.dev server: one command for Claude Code, one file for Cursor and VS Code.

Updated Text versionOpen inChatGPT (new tab)Claude (new tab)Perplexity (new tab)

Claude Code, Cursor, and VS Code connect to Qanary’s MCP server with two pieces of information: the address https://mcp.qanary.dev, and an Authorization header that holds your Qanary token. For Claude Code, Qanary gives you the ready-made command; for Cursor and VS Code, it’s a small configuration file.

Before you start

Create a token in Qanary: open “Settings,” then “MCP” in the “Account” tab, and click “New token.” The steps and the scopes are explained in How do I use Qanary from my AI assistant (MCP)?.

The “Token created” window shows the token only once. Keep the window open until you’ve copied the token.

Connect Qanary to Claude Code

  1. In Qanary’s “Token created” window, click “Copy” next to “Add it to Claude Code.”

  2. Paste the command into your terminal and run it. It looks like this:

    claude mcp add --transport http qanary https://mcp.qanary.dev --header "Authorization: Bearer qanary_pat_…"
  3. Check the connection with claude mcp list, or with /mcp in Claude Code.

Expected result: the qanary server appears in the list, connected.

By default, the command connects Qanary only to the folder where you run it. To have it in all your folders, add --scope user right after claude mcp add. Either way, Claude Code keeps the token in your personal settings, outside your code.

Connect Qanary to Cursor

  1. In Qanary’s “Token created” window, click “Copy” next to “Token” (it starts with qanary_pat_).

  2. Open the file ~/.cursor/mcp.json (for all your folders) or .cursor/mcp.json at the root of a folder. Create it if it doesn’t exist.

  3. Add the Qanary server, replacing qanary_pat_… with the token you copied:

    {
      "mcpServers": {
        "qanary": {
          "url": "https://mcp.qanary.dev",
          "headers": { "Authorization": "Bearer qanary_pat_…" }
        }
      }
    }
  4. Save the file, then check that the qanary server is turned on in Cursor’s list of MCP servers.

Expected result: Qanary appears among Cursor’s MCP servers, with its tools.

Connect Qanary to VS Code

  1. Open VS Code’s MCP configuration: the MCP: Open User Configuration command for all your folders, or a folder’s .vscode/mcp.json file.

  2. Add the Qanary server:

    {
      "inputs": [
        { "type": "promptString", "id": "qanary-token", "description": "Qanary token", "password": true }
      ],
      "servers": {
        "qanary": {
          "type": "http",
          "url": "https://mcp.qanary.dev",
          "headers": { "Authorization": "Bearer ${input:qanary-token}" }
        }
      }
    }
  3. The first time the qanary server starts, VS Code asks for the token: paste the token (qanary_pat_…), without Bearer. VS Code stores it securely, outside the file.

Expected result: Qanary’s tools are offered in Copilot Chat.

Connect Qanary to another assistant

Codex, Gemini CLI, and other MCP-compatible assistants that accept a header connect with the same information:

  • the address: https://mcp.qanary.dev, over HTTP (MCP’s “Streamable HTTP” mode, if the assistant asks you to choose);
  • the header: Authorization, with the value Bearer followed by a space and your token.

Where to write them depends on the assistant: look for “MCP” in its documentation.

Try it out

Ask your assistant: “List my Qanary projects.”

Expected result: it answers with the list of your Qanary projects. More ideas are in What can I ask my AI assistant connected to Qanary?.

Where should I keep my token?

A .cursor/mcp.json file inside a code folder is shared along with the code. Use your account-level configuration (~/.cursor/mcp.json) instead, or let VS Code ask for the token. Claude Code already keeps the token outside your code, unless you add --scope project. If a token has leaked, revoke it on Qanary’s “MCP” page.

If it doesn’t work

  • The qanary server doesn’t connect: check the address (https://mcp.qanary.dev) and the header: Bearer, a space, then the whole token. In Claude Code, claude mcp get qanary shows what’s saved.
  • Qanary stopped answering: the token expired or was revoked. Create a new one and replace it in the configuration.
  • Your assistant reads your tests but can’t run or create any: the token doesn’t have the “Run” or “Author” scope. Create a token with that scope.
  • Still stuck: email contact@qanary.dev with the name and version of your assistant.

Frequently asked questions

Can the same token work for Claude Code and Cursor?

Yes, but one token per tool is safer: you can revoke one without cutting off the others, and the “Last used” column of the “MCP” page tells you which one is still in use.

Do I need to install anything?

No. Qanary’s MCP server is online: your assistant connects to it over the internet, with no program to install on your computer.

Still have a question? Julia or Antoine will reply within 24 business hours at contact@qanary.dev. A human, not a bot. The canary stays down the mine.

For your AI assistant: this article as text, the help center index, the glossary.

Take 30 minutes to try Qanary on your own site.

Bugs only. Promise.