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

# Connect a client

> Set up the Infinity MCP server in Claude, ChatGPT, Cursor, VS Code, or any other client.

Every client needs the same two things: the endpoint `https://api.infinity.swiss/mcp`, and an administrator of the organisation who approves the connection in the browser. There is no client ID or secret to create beforehand — the [overview](/api/mcp/overview) explains how the authorisation works.

<Tabs>
  <Tab title="Claude">
    On claude.ai and in the desktop app, open Customize, then Connectors, press
    the plus button and choose "Add custom connector". Enter
    `https://api.infinity.swiss/mcp` and connect; Claude sends you to Infinity
    to sign in and approve. In a Team or Enterprise workspace an owner has to
    add the connector in the organisation settings first. Leave the OAuth
    client fields under Advanced settings empty, because Claude registers
    itself.

    In Claude Code, add the server and then authenticate:

    ```bash theme={null}
    claude mcp add --transport http infinity https://api.infinity.swiss/mcp
    ```

    Running `/mcp` in Claude Code lists the server and offers to authenticate
    it, which opens the same consent page. Add `--scope project` to the command
    to write the server into the repository's `.mcp.json` instead of your own
    configuration.
  </Tab>

  <Tab title="ChatGPT">
    Adding an MCP server is part of ChatGPT's developer mode, which you turn on
    under Settings, Security and login, and which an administrator may have to
    allow for a workspace first. Then create a new app on the apps page and
    give it the full URL `https://api.infinity.swiss/mcp`. ChatGPT runs the
    sign-in and consent flow, after which you pick which of the Infinity tools
    the app may use.
  </Tab>

  <Tab title="Cursor">
    Add the server to `.cursor/mcp.json` in a project, or to `~/.cursor/mcp.json`
    to have it everywhere:

    ```json theme={null}
    {
      "mcpServers": {
        "infinity": {
          "url": "https://api.infinity.swiss/mcp"
        }
      }
    }
    ```

    The `url` is what makes the entry a remote server; no further fields are
    needed, as Cursor registers itself and handles the OAuth flow. Enable and
    authenticate the server on the Customize page.
  </Tab>

  <Tab title="VS Code">
    Add the server to `.vscode/mcp.json` in the workspace, or run "MCP: Add
    Server" from the command palette and pick the HTTP option:

    ```json theme={null}
    {
      "servers": {
        "infinity": {
          "type": "http",
          "url": "https://api.infinity.swiss/mcp"
        }
      }
    }
    ```

    A browser window opens for the authorisation the first time the server is
    started. VS Code registers itself, so the `oauth` block other servers need
    can be left out.
  </Tab>

  <Tab title="Other clients">
    Any client that speaks Streamable HTTP and OAuth 2.1 works. What it needs
    to know:

    * The endpoint `https://api.infinity.swiss/mcp`
    * Protected resource metadata at
      `https://api.infinity.swiss/.well-known/oauth-protected-resource/mcp`
      and authorisation server metadata at
      `https://api.infinity.swiss/.well-known/oauth-authorization-server`
    * The authorisation code grant with PKCE (`S256`), and `resource` set to
      `https://api.infinity.swiss/mcp`
    * A redirect URI on `https`, or on `http` at `localhost` or `127.0.0.1`
      with any port. Custom schemes are rejected.
    * Either a Client ID Metadata Document, which we prefer, or dynamic client
      registration at `https://api.infinity.swiss/oauth/register`. Clients are
      public, so no secret is issued.

    To try the server out before wiring it into a client, point the
    [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) at
    it, which walks through the same authorisation flow:

    ```bash theme={null}
    npx @modelcontextprotocol/inspector \
      --server-url https://api.infinity.swiss/mcp --transport http
    ```
  </Tab>
</Tabs>

## When a connection does not work

A tool call that needs a scope the connection was not granted fails with an `insufficient_scope` challenge. Connect the client again and grant the module it asks for; the new approval replaces the existing connection.

If consent never appears, check that the person approving is an administrator of the organisation, and that the client's redirect URI is `https` or loopback.
