Skip to content
Swarmetry

Automate

Connect an MCP client

Connect Claude Code, Claude Desktop, Cursor, VS Code, Codex, Gemini CLI or another AI app step by step, confirm its actions.

An MCP client is an AI app that can use the tools of other services: Claude Code, Claude Desktop, Cursor, VS Code, OpenAI Codex, Gemini CLI and many more. Connected to Swarmetry, it can list your projects, start a test, read its verdict or prepare a report for you, with the same permissions, plan limits, confirmations and audit as the web app.

This page explains, client by client, where to paste what. The quickest way is the Connect a client helper: right after you create a token, it shows the blocks of this page with your server's address and your token already written in.

Before you start

  1. A token. Create one in Account > API tokens (/app/settings/tokens, see API tokens). It starts with sw_pat_ and acts as you. For a setup shared by a team or used by an automation, an administrator creates a service account instead (its tokens start with sw_sat_, see page 31). The secret is shown once, with the Connect a client helper under it. In the blocks below, replace <your-token> with your token.
  2. The address of the MCP server: https://swarmetry.io/mcp.
  3. The way your client connects:
    • Remote connection: the client calls that address and sends the token in an Authorization header. Nothing to install.
    • Local connection: the client starts the command swarmetry mcp --stdio on your computer, which forwards everything to the server with your command line sign-in. Install the command line and sign in first (page 28). Claude Desktop needs it, and it lets more clients show the confirmation forms (below).

Which client, which connection

Each client's documentation was read on 2026-11-09 (see Sources). Clients change often: if a step no longer matches what you see, follow the client's own page.

Client Connection Confirmation forms
Claude Code Remote Yes
Claude Desktop Local Only if the app can show forms (its documentation does not say)
Cursor Remote, or local for the forms Remote if Cursor speaks the newest protocol, otherwise use the local connection
VS Code (GitHub Copilot) Remote, or local for the forms As Cursor
OpenAI Codex Remote Not documented: use the web app or the CLI for these actions
Gemini CLI Remote Not documented: use the web app or the CLI for these actions
Windsurf, Devin Desktop and other clients Remote or local Not documented

Claude Code

  1. In a terminal, run:

    claude mcp add --transport http --scope user swarmetry https://swarmetry.io/mcp --header "Authorization: Bearer <your-token>"
    

    --scope user makes the server available in all your projects. Claude Code keeps the token in your own configuration.

  2. Check it: the list shows swarmetry as connected. In Claude Code, /mcp shows its tools.

    claude mcp list
    
  3. Ask "List my projects".

For a project shared with a team, put this .mcp.json file at the root of the project instead. It holds no token: each person keeps their own in the variable SWARMETRY_TOKEN (see Keep the token in a variable), which Claude Code reads when it starts.

{
  "mcpServers": {
    "swarmetry": {
      "type": "http",
      "url": "https://swarmetry.io/mcp",
      "headers": {
        "Authorization": "Bearer ${SWARMETRY_TOKEN}"
      }
    }
  }
}

Confirmations: Claude Code shows the confirmation form. It needs the newest protocol (2026-07-28), which recent versions of Claude Code use by default; if a consequential tool answers confirmation.unavailable, update Claude Code.

Claude Desktop

Claude Desktop starts local servers that you list in its configuration file, so it uses the local connection.

  1. Install the command line (page 28), then sign in: run this command, paste your token on the empty line that follows and press Enter.

    swarmetry login --token-stdin
    
  2. In Claude Desktop, open Settings > Developer > Edit Config. It opens the file claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows). Put this in it; if the file already lists servers, add the "swarmetry" entry inside the existing "mcpServers".

    {
      "mcpServers": {
        "swarmetry": {
          "command": "swarmetry",
          "args": [
            "mcp",
            "--stdio"
          ]
        }
      }
    }
    
  3. Quit Claude Desktop completely and start it again. Click Add files, connectors, and more at the bottom left of the message box, then Connectors > Manage connectors: swarmetry is listed with its tools. Ask "List my projects".

If the server does not start, Claude Desktop may not find the command. Replace "swarmetry" after "command" with the full path of the command: command -v swarmetry prints it on macOS and Linux, (Get-Command swarmetry).Source in PowerShell on Windows (write each \ of a Windows path as \\ in the file). Claude Desktop writes what went wrong in mcp-server-swarmetry.log (~/Library/Logs/Claude on macOS, %APPDATA%\Claude\logs on Windows).

Confirmations: the local connection passes the form on to Claude Desktop when the app says it can show forms. Its documentation does not say so: if a consequential tool answers confirmation.unavailable, use the web app or the CLI for that action.

Custom connectors. Claude also offers remote custom connectors (Customize > Connectors > Add custom connector). They are called by Anthropic's cloud, not by your computer: your server must be reachable from the internet and from Anthropic's addresses (see Allowed IP ranges), and sending a token in a header (the Request headers step) is, on the day this page was written, a beta open to some organizations only. On a Team or Enterprise plan everyone who uses the connector shares its credential: give it a service account with a limited role.

Cursor

  1. Open the file ~/.cursor/mcp.json in your home folder (create it if it does not exist) and put this in it. The server is then available in every project.

    {
      "mcpServers": {
        "swarmetry": {
          "url": "https://swarmetry.io/mcp",
          "headers": {
            "Authorization": "Bearer <your-token>"
          }
        }
      }
    }
    

    This file holds your token: never copy it into a project folder you share.

  2. Check it in Customize in the sidebar: swarmetry is on. If it is not, the Output panel (MCP Logs) says why.

  3. Ask "List my projects".

For a project shared with a team, use the file .cursor/mcp.json of the project with the variable SWARMETRY_TOKEN (see Keep the token in a variable):

{
  "mcpServers": {
    "swarmetry": {
      "url": "https://swarmetry.io/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SWARMETRY_TOKEN}"
      }
    }
  }
}

Confirmations: Cursor supports forms, but its documentation does not say which protocol it speaks; the remote connection shows the forms only to clients on the newest protocol. If a consequential tool answers confirmation.unavailable, switch to the local connection: install the command line and sign in (page 28), then replace the "swarmetry" entry of ~/.cursor/mcp.json with:

{
  "mcpServers": {
    "swarmetry": {
      "command": "swarmetry",
      "args": [
        "mcp",
        "--stdio"
      ]
    }
  }
}

VS Code (GitHub Copilot)

  1. Create the file .vscode/mcp.json in your project, or run MCP: Open User Configuration from the Command Palette to have the server in every project, and put this in it:

    {
      "servers": {
        "swarmetry": {
          "type": "http",
          "url": "https://swarmetry.io/mcp",
          "headers": {
            "Authorization": "Bearer ${input:swarmetry-token}"
          }
        }
      },
      "inputs": [
        {
          "type": "promptString",
          "id": "swarmetry-token",
          "description": "API token",
          "password": true
        }
      ]
    }
    
  2. When the server starts for the first time, VS Code asks for the API token: paste your token. VS Code stores it securely; the file never holds it, so you can share it with your team.

  3. Check it with MCP: List Servers (start, stop, show the output), then ask "List my projects" in the chat.

Confirmations: VS Code supports forms since version 1.102, without saying which protocol it speaks. If a consequential tool answers confirmation.unavailable, use the local connection: install the command line and sign in (page 28), then use this entry instead:

{
  "servers": {
    "swarmetry": {
      "type": "stdio",
      "command": "swarmetry",
      "args": [
        "mcp",
        "--stdio"
      ]
    }
  }
}

OpenAI Codex

  1. Keep your token in the variable SWARMETRY_TOKEN (see Keep the token in a variable).

  2. Add this to the file ~/.codex/config.toml:

    [mcp_servers.swarmetry]
    url = "https://swarmetry.io/mcp"
    bearer_token_env_var = "SWARMETRY_TOKEN"
    

    Without the variable, the token can go in the file itself (keep the file to yourself):

    [mcp_servers.swarmetry]
    url = "https://swarmetry.io/mcp"
    http_headers = { "Authorization" = "Bearer <your-token>" }
    
  3. Check it: the list shows swarmetry; in Codex, /mcp shows the connected servers.

    codex mcp list
    

Confirmations: Codex asks its own approval before it uses a tool, but its documentation says nothing of forms. A consequential tool answers confirmation.unavailable: do that action in the web app or with the CLI.

Gemini CLI

  1. In a terminal, run:

    gemini mcp add --scope user --transport http --header "Authorization: Bearer <your-token>" swarmetry https://swarmetry.io/mcp
    

    Or put the same in the file ~/.gemini/settings.json:

    {
      "mcpServers": {
        "swarmetry": {
          "httpUrl": "https://swarmetry.io/mcp",
          "headers": {
            "Authorization": "Bearer <your-token>"
          }
        }
      }
    }
    
  2. Check it: the list shows swarmetry as connected; in Gemini CLI, /mcp shows its tools.

    gemini mcp list
    

Leave the server's trust option off: it would skip Gemini CLI's own confirmations.

Confirmations: not documented. A consequential tool answers confirmation.unavailable: do that action in the web app or with the CLI.

Windsurf, Devin Desktop and other clients

Windsurf is now Devin Desktop: it supports the remote and the local connection; its documentation gives the files (~/.config/devin/mcp_config.json for you, .devin/mcp_config.json for a project) but the remote format was not checked for this guide. For it and any other client, give:

  • the address of the server:

    https://swarmetry.io/mcp
    
  • a header with the token (the client's "headers" or "API key" setting):

    Authorization: Bearer <your-token>
    
  • or, for a client that only starts local commands, after signing in with the command line (page 28):

    swarmetry mcp --stdio
    

The server's id is swarmetry; it introduces itself to the client with the product name.

Keep the token in a variable

Some setups read the token from the variable SWARMETRY_TOKEN, so that a file shared with others never holds it.

  • macOS, Linux: add this line to your shell profile (~/.zshrc on macOS, ~/.bashrc on most Linux systems), then open a new terminal:

    export SWARMETRY_TOKEN='<your-token>'
    
  • Windows: run this once in PowerShell, then start the app again:

    setx SWARMETRY_TOKEN "<your-token>"
    

An app started from the Dock or a menu may not see a variable of your shell profile: start it from a terminal, or use the form with the token in your own configuration file.

Confirmation forms

Some tools need your explicit confirmation before they run: destructive and costly ones (deleting, starting a test that consumes your plan) and those with a consequence (a credential sent to an address, a protection relaxed, access given, load scheduled, content shared). Swarmetry then shows a form in your client, in your language: what will happen, the estimate of a costly test, the values the AI chose (a secret by its name only).

  • Accept: the action runs, once.
  • Decline: nothing runs; the AI gets confirmation.denied.
  • The AI can never confirm by itself.

A client that cannot show the form gets confirmation.unavailable with this message: "This action needs your confirmation and your MCP client cannot ask you for it." Then:

  1. use the local connection if your client supports forms (Cursor, VS Code): the remote connection shows forms only to clients on the newest protocol (2026-07-28), the local one also to the others;
  2. or do the action in the web app;
  3. or run it with the command line, which asks Continue? [y/N] (-y confirms it in a script, see page 28).

What the AI sees

What Swarmetry sends back to an MCP client is masked before it leaves: the values of your organization's secrets, tokens, cookies and keys always; personal data (e-mail addresses, phone numbers, card numbers, IBANs) too, unless Swarmetry allows it. The AI only sees the masks, never the values.

Which tools appear

  • The list holds the tools that the token's account may use in its organization: its role, the token's permissions (a token limited to a few permissions lists fewer tools) and your plan. A service account never gets the tools that stay with people (members, roles, billing, security policies, the assistant's settings).
  • After a change of role, permissions or plan, reconnect the client (restart it): the local connection reads the list once, when it starts.
  • The tools of the assistant's own screens are never listed.
  • A few tools need no permission: the server version, this help centre (guide_search, guide_page_get) and the command line downloads.

Choose the tools your client lists

Swarmetry has several hundred tools. Listing them all would fill most of the working memory of an AI, and some clients refuse more than a few dozen tools. So the address of the server decides what your client lists:

Address What your client lists
https://swarmetry.io/mcp The core tools, about 25: find your way (projects, scenarios, test configurations, countries), estimate, check, start, stop and follow a test, read its errors, its figures and its report, search this help centre.
https://swarmetry.io/mcp?tools=core,scenarios The groups you name, separated by commas.
https://swarmetry.io/mcp?tools=all Every tool you may use.

The groups are core, projects (projects, environments, datasets, secrets, domains), scenarios (scenarios, fragments, test configurations, extensions), runs (tests, schedules, countries, approvals), results (metrics, analysis, baselines, reports), observability, monitoring (checks, incidents, maintenance windows, objectives, status pages), recordings, notifications, assistant, account (your sessions, tokens and preferences), admin (members, groups, roles, policies, audit, quotas, usage), billing and help.

  • Nothing is out of reach. Unless the address already lists everything, three more tools appear: tool_search finds any tool you may use from a few words, in English or in French, tool_describe gives its inputs and tool_call runs it, with the same permissions, the same confirmation forms and the same masking. The AI uses them by itself when no listed tool fits.
  • Choosing groups is about size, not about access. To limit what a client can do, limit the permissions of its token.
  • A name that is not a group is ignored. An address without a known group lists the core tools.
  • Add outputSchemas=true (for example /mcp?tools=runs&outputSchemas=true) when your client or your script needs the description of the result of each tool. The list is then about four times larger.
  • The local connection (swarmetry mcp --stdio) lists the core tools and the three tools above.
  • A script that calls a tool by its name needs that tool in the list: add its group, or ?tools=all, to the address.

Personal token or service account

  • A personal token acts as you: use it in your own client, on your computer. It stops working if you leave the organization or lose the permissions it uses.
  • A service account belongs to the organization: use it for a client shared by a team, an automation or a cloud connector. Its role can be smaller than yours, and the audit shows it under its own name (page 31).

Either way, the token's lifetime is limited by your organization (1 to 365 days): create a new token before it expires and replace it in the client.

Allowed IP ranges

If your organization allows only some network addresses (Security policies, see page 13), a request from anywhere else is refused with "Your network address … is not allowed by the security policy of the organization". A client on your computer calls from your network. A connector that runs in a vendor's cloud (Claude's custom connectors, for example) calls from the vendor's addresses: use a client on your computer or the local connection.

The same token in a terminal

The Connect a client helper also gives the command line and the REST API, with the same token:

  • the command line (page 28): sign in (paste the token on the empty line that follows), then try a first command.

    swarmetry login --token-stdin
    swarmetry project list
    
  • the REST API: the projects of your organization (on Windows, type curl.exe).

    curl -H "Authorization: Bearer <your-token>" https://swarmetry.io/api/v1/projects
    

When it does not work

  • "Needs authentication", 401: the token is wrong, expired or revoked. Create a new one and replace it.
  • No tool, or fewer than expected: see Which tools appear and Choose the tools your client lists.
  • Too many tools for your client: name fewer groups in the address (Choose the tools your client lists).
  • The address: it must start with https://.
  • The local connection: swarmetry project list in a terminal tells whether the command line is signed in.

Sources

Read on 2026-11-09: