> ## Documentation Index
> Fetch the complete documentation index at: https://getsalesio-admin-mcp-wording-for-good-7879419.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a client

> Add the gtm-api MCP server to Claude, Cursor, VS Code, ChatGPT or any MCP-compatible runtime.

The server speaks streamable HTTP at `https://mcp.gtm-api.com/mcp` and authenticates with
OAuth. Your client discovers the flow on its own: the first call comes back with a
`WWW-Authenticate` challenge pointing at the server's metadata, the client registers
itself, and you approve the consent screen in your browser. Nothing to paste, no key to
store.

## Add to your agent

One action per client, then approve the consent screen that opens. That is the whole setup.

<CardGroup cols={2}>
  <Card title="Claude" icon="message" href="https://claude.ai/settings/connectors">
    Open Settings, Connectors, then "Add custom connector". Paste `https://mcp.gtm-api.com/mcp` and approve access. Works for claude.ai and Claude Desktop.
  </Card>

  <Card title="Cursor" icon="arrow-pointer" href="cursor://anysphere.cursor-deeplink/mcp/install?name=gtm-api&config=eyJ1cmwiOiJodHRwczovL21jcC5ndG0tYXBpLmNvbS9tY3AifQ==">
    One-click install (the button opens Cursor). Sign in on the consent page that follows.
  </Card>

  <Card title="VS Code" icon="code" href="https://vscode.dev/redirect/mcp/install?name=gtm-api&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.gtm-api.com%2Fmcp%22%7D">
    Installs the server for Copilot agent mode. Sign in on the consent page that follows.
  </Card>

  <Card title="ChatGPT" icon="comment-dots">
    Settings, Connectors, Advanced settings, enable Developer mode. Add a connector with the URL above and complete the OAuth sign-in.
  </Card>
</CardGroup>

### Claude Code

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

Then run `/mcp` in any session and authenticate when prompted. `claude mcp list` shows
`gtm-api` as connected once consent is done.

### Any other MCP client

Point it at `https://mcp.gtm-api.com/mcp` over the streamable HTTP transport and let it
run the OAuth flow. Clients that support MCP OAuth need nothing else: the server
advertises its authorization server, and dynamic client registration means your client
does not need to be pre-registered with us.

### Clients that only spawn a command

Some clients cannot take a URL at all, only a command to run over stdio. For those, the
[`@gtm-api/linkedin-mcp`](https://www.npmjs.com/package/@gtm-api/linkedin-mcp) launcher
bridges stdio to the same hosted endpoint and runs the same OAuth flow, opening the
consent page on first use and caching the tokens under `~/.mcp-auth`.

```json theme={null}
{
  "mcpServers": {
    "gtm-api": {
      "command": "npx",
      "args": ["-y", "@gtm-api/linkedin-mcp"]
    }
  }
}
```

<Warning>
  Launcher versions up to 1.1.0 sent `GTM_API_KEY` against an endpoint that rejected keys,
  and 1.2.x ignored the variable and did OAuth only. Key auth works from 1.3.0 on. Anything
  pinned to 1.1.0 or older keeps failing on the first call; upgrade the pin.
</Warning>

## Headless: authenticate with an API key

The same key that authenticates the [REST API](/api-reference/overview) works on this
server as a plain bearer token. No browser, no consent screen, so it fits CI, servers and
any client where the OAuth round-trip is not an option. Mint a key in the app (Settings,
API keys) and attach it as a header:

```bash theme={null}
claude mcp add --transport http gtm-api https://mcp.gtm-api.com/mcp --header "Authorization: Bearer gtm_live_..."
```

For command-spawning clients, the launcher takes it from the environment instead:

```json theme={null}
{
  "mcpServers": {
    "gtm-api": {
      "command": "npx",
      "args": ["-y", "@gtm-api/linkedin-mcp"],
      "env": { "GTM_API_KEY": "gtm_live_..." }
    }
  }
}
```

<Note>
  Pick one mode per connection: with a key attached, the OAuth flow never starts. The key is
  scoped to its workspace and its permission set, revocable in the app, and treated like a
  password (see [Authentication](/authentication)). Interactive clients such as claude.ai
  connectors have no header field and always use OAuth.
</Note>

## Check it from a terminal

To confirm the endpoint and walk the OAuth flow by hand:

```bash theme={null}
npx @modelcontextprotocol/inspector
```

Choose the streamable HTTP transport, enter `https://mcp.gtm-api.com/mcp`, connect, and
complete the consent screen. The tool list appears once you are authorized.

## What you get

Three meta-tools rather than hundreds of individual ones: `list_toolsets` to see the
domains, `get_toolset_tools` to inspect one, and `call_tool` to run any tool by name.
Dangerous tools still run their preview and confirm step, so an agent cannot commit a
bulk send without showing you what it is about to do.

## First prompt to try

> "Check the smart limits on my LinkedIn account, then draft, preview and send a connection request to the profile at this URL."

The agent chains the tools on its own; the preview step and the server-side limit check
run before anything is sent.
