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

# MCP Server

> connect Claude, Cursor, ChatGPT and other MCP clients directly to your linkutm workspace

linkutm exposes a remote MCP (Model Context Protocol) server at `https://api.linkutm.com/mcp`. Connect Claude, Cursor, ChatGPT or any MCP-compatible app to this server and it can create UTM short links, pull click analytics and manage your workspace directly from your chat or IDE.

## When to use it

* Ask Claude or Cursor to create a campaign link mid-conversation without opening the dashboard.
* Pull click stats into a conversation to analyze performance alongside other campaign context.
* Manage links from your IDE while building a product or writing a report.

## How to connect

<Steps>
  <Step title="Copy the server URL">
    In linkutm, go to **Settings → Developer → MCP Server**. Copy the server URL: `https://api.linkutm.com/mcp`
  </Step>

  <Step title="Add the server to your app">
    Follow the setup steps for your app below.
  </Step>

  <Step title="Authorize access">
    Your app opens a browser window. Choose a workspace and click **Allow**. The connection activates immediately.
  </Step>
</Steps>

#### ChatGPT

ChatGPT on the web.

1. Open **Settings → Security and login** and turn on **Developer mode** (skip if already on).
2. Go to **Settings → Plugins**, click **Add**, then **Create MCP App**.
3. Paste the **Name** and **Description** from the MCP Server page, and paste the server URL under **Connection**.
4. Set Authentication to **OAuth** and click **Create**.
5. Sign in to linkutm, choose a workspace and click **Allow**.
6. In a new chat, click **+** next to the message box and choose **Linkutm**.

#### Claude

Web and desktop. On Team or Enterprise plans, an owner adds it once for the whole workspace.

1. Go to **Settings → Connectors**, click **Add custom connector**.
2. Paste the **Name** and **Server URL**, click **Add**.
3. Click **Connect**, then sign in to linkutm, choose a workspace and click **Allow**.
4. In a chat, turn on **Linkutm** from the **+** menu.

#### Claude Code

Run this in your terminal:

```
claude mcp add --transport http linkutm https://api.linkutm.com/mcp
```

Then in Claude Code, type `/mcp`, select **linkutm** and choose **Authenticate**. Sign in, choose a workspace and click **Allow**.

#### Cursor

Open **Cursor Settings → MCP & Integrations**, click **New MCP server**. Paste the config below and save, then click **Connect** and complete the OAuth flow.

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

Save this as `~/.cursor/mcp.json`.

#### VS Code

Add a `.vscode/mcp.json` file to your project:

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

Click **Start** above the server entry in Copilot agent mode, then complete the OAuth flow.

#### Other MCP clients

Any MCP client that supports remote HTTP servers works with linkutm. Point it at `https://api.linkutm.com/mcp`.

With OAuth: follow that client's OAuth flow to authorize. With an API key instead, use this config:

```json theme={null}
{
  "mcpServers": {
    "linkutm": {
      "url": "https://api.linkutm.com/mcp",
      "headers": {
        "Authorization": "Bearer lk_live_your_api_key"
      }
    }
  }
}
```

Generate an API key in **Settings → Developer → API Keys**.

## What you can do

| Capability | What's available |
| - | - |
| **Links** | Create, edit and delete UTM short links |
| **Analytics** | Clicks, campaigns and traffic |
| **Organize** | Folders, tags, templates and parameters |

Access is limited to the workspace you connected during the OAuth flow. The AI gets exactly the permissions your account has in that workspace — no more.

## Real-world example

You're in Claude writing a campaign brief. Without leaving the conversation:

```
Prompt:  Create a short link to example.com/spring-sale with
         utm_source=email, utm_medium=newsletter,
         utm_campaign=spring-2025. Slug: spring-sale.

Result:  go.example.com/spring-sale created and ready.
```

The link appears in your linkutm workspace immediately, tracked the same as any link you built manually.

## Common mistakes

<AccordionGroup>
  <Accordion title="Connection error on the server URL">
    The full URL must be `https://api.linkutm.com/mcp`, including the `/mcp` path. The dashboard URL and docs URL will not work.
  </Accordion>

  <Accordion title="App asks to reconnect every session">
    Check that your MCP client is saving the config to the right path and not resetting on restart. For file-based configs (e.g., `.vscode/mcp.json`), confirm the file is committed or persisted in the expected location.
  </Accordion>

  <Accordion title="Links created in the wrong workspace">
    The connection is scoped to the workspace you selected during the OAuth flow. To switch workspaces, go to **Settings → Developer → MCP Server** and re-authorize.
  </Accordion>
</AccordionGroup>

## Edge cases

<Note>
  **OAuth session expiry.** If your linkutm session expires, the MCP connection loses access. Re-authorize from your app's connector settings.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.