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

# Setup the MCP server

> Connect the Tuner MCP server to your IDE or chatbot and configure your agent in natural language.

The Tuner MCP server lets your AI assistant read and write your Tuner workspace, so you can configure an agent — outcomes, intents, evals, red flags, alerts — by describing what you want instead of filling in forms.

<Info>
  The Tuner MCP Server is currently in **Beta**. Available actions and supported platforms may expand over time.
</Info>

## Why use it

**Speed.** Describe what you need in plain language and it's done. Five call outcomes, ten evals, and a set of user intents in a single message — the fastest way to get an agent configured.

**Context.** Your assistant already has your codebase, your agent's system prompt, and your call flows. So instead of starting from a blank form, you can say *"based on my agent's system prompt, suggest the right call outcomes and evals"* and get configuration that reflects how your agent actually works.

## Supported platforms

| Platform                                    | Auth    | Subscription  | Setup time  |
| ------------------------------------------- | ------- | ------------- | ----------- |
| **Claude** ([claude.ai](https://claude.ai)) | OAuth   | Any           | \~2 minutes |
| **Claude Code** (terminal)                  | API key | Pro or higher | \~2 minutes |
| **Cursor**                                  | API key | Any           | \~3 minutes |
| **Antigravity**                             | API key | Any           | \~2 minutes |

<Note>
  Tuner MCP Server: `https://api.usetuner.ai/mcp/`
</Note>

***

## IDEs

IDEs authenticate with an **API key** sent as a Bearer token. Copy yours from **Workspace Settings** → **API Keys & Integrations**.

### Cursor

<Steps>
  <Step title="Open MCP Settings">
    Go to **Settings** → **Tools & MCP** and click **Add Custom MCP** to open your `mcp.json`.
  </Step>

  <Step title="Paste the Configuration">
    Add the following to your `mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "tuner": {
          "type": "streamableHttp",
          "url": "https://api.usetuner.ai/mcp/",
          "headers": {
            "Authorization": "Bearer YOUR_TUNER_API_KEY"
          }
        }
      }
    }
    ```

    Replace `YOUR_TUNER_API_KEY` with your Tuner API key.
  </Step>
</Steps>

### Claude Code

<Steps>
  <Step title="Run the Add Command">
    Open your terminal inside **Claude Code** and run:

    ```bash theme={null}
    claude mcp add tuner https://api.usetuner.ai/mcp/ --transport http --header "Authorization: Bearer YOUR_TUNER_API_KEY"
    ```

    Replace `YOUR_TUNER_API_KEY` with your Tuner API key.
  </Step>
</Steps>

### Antigravity

<Steps>
  <Step title="Open MCP Configuration">
    Click the **...** dropdown at the top of the editor's agent panel, then **Manage MCP Servers** → **View raw config** to open `mcp_config.json`.
  </Step>

  <Step title="Paste the Configuration">
    Add the following to your `mcp_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "tuner": {
          "serverUrl": "https://api.usetuner.ai/mcp/",
          "headers": {
            "Authorization": "Bearer YOUR_TUNER_API_KEY",
            "Content-Type": "application/json"
          }
        }
      }
    }
    ```

    Replace `YOUR_TUNER_API_KEY` with your Tuner API key.
  </Step>
</Steps>

***

## Chatbots

Chatbots authenticate with **OAuth**. The first time you add the server you'll be redirected to Tuner to sign in and authorize access; after that your session stays active until you revoke it.

### Claude

<Steps>
  <Step title="Add Custom Connector">
    Go to **Settings** → **Connectors**, click **Add Custom Connector**, and paste the Tuner MCP Server URL:

    ```text theme={null}
    https://api.usetuner.ai/mcp/
    ```
  </Step>

  <Step title="Connect and Authenticate">
    Click **Connect**. You will be redirected to Tuner to sign in and authorize access.
  </Step>

  <Step title="Enable Tuner in Your Chat">
    When starting a new chat, click the **+** button and verify **Tuner** is toggled on under **Connectors**.
  </Step>
</Steps>

***

## Start the setup

Once connected, paste this into your chat:

```text theme={null}
Set up Tuner observability for this agent using the Tuner MCP.
Fetch and follow the 'tuner_setup_agent' prompt from the Tuner MCP server.
```

<Tip>
  If your assistant asks which agent or workspace to configure, you'll find those details in **Workspace Settings** on the Tuner dashboard.
</Tip>

The `tuner_setup_agent` prompt walks your assistant through defining your call outcomes, intents, data-extraction fields, evals, red flags, and alerts, all from a single conversation.

## Example prompts

Bulk setup from a description:

> *"I have a restaurant booking agent. Create the following call outcomes: Reservation Booked (Success), Reservation Modified (Success), Customer Cancelled (Failure), No Availability (Failure), and General Inquiry (Success). Also add user intents for: Make a Reservation, Modify a Reservation, Cancel a Reservation, and Ask About Menu."*

Several evals at once:

> *"Add these evals: Did the agent confirm the reservation date and time? Did the agent ask for the party size? Did the agent offer alternative times when the requested slot was unavailable?"*

Reading your current setup:

> *"List all agents in my workspace and show me a summary of how each one is configured."*

## Best practices

<AccordionGroup>
  <Accordion title="Be specific, and name the agent">
    Detail gets better results. Instead of *"add some call outcomes"*, try *"for my Customer Support agent, add a call outcome called 'Appointment Booked' with type Success, defined as: the customer scheduled an appointment with a confirmed date and time."* If you have multiple agents, always say which one.
  </Accordion>

  <Accordion title="Use bulk operations for initial setup">
    Describe all your outcomes, intents, and evals in one message. The MCP processes them together, which is far faster than creating them one at a time in the dashboard.
  </Accordion>

  <Accordion title="Review changes after making them">
    Ask your assistant to list the current settings afterwards, so you can verify everything looks right before calls start flowing.
  </Accordion>

  <Accordion title="Use the dashboard for monitoring">
    The MCP is best for configuration and diagnosis. For tracking live results and trends over time, the [Tuner dashboard](https://app.usetuner.ai/) is the better tool.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection failed or timed out">
    * **Chatbots:** Verify you're using the correct MCP Server URL. Ensure your Tuner account is active and you have the required subscription.
    * **IDEs:** Check that your API key is valid and correctly placed in the configuration file. Make sure `https://api.usetuner.ai/mcp/` is reachable.
  </Accordion>

  <Accordion title="Authentication error">
    * **Chatbots:** Try disconnecting and reconnecting. In Claude, go to **Settings** → **Connectors**, remove Tuner, then add it again.
    * **IDEs:** Regenerate your API key from the Tuner dashboard and update your configuration file.
  </Accordion>

  <Accordion title="Tuner not appearing in chat">
    * **Claude:** Click the **+** button and check that Tuner is toggled on under **Connectors**.
    * **IDEs:** Verify the MCP server configuration is saved correctly and restart the IDE if needed.
  </Accordion>
</AccordionGroup>

***

## What's next?

<CardGroup cols={2}>
  <Card icon="stethoscope" href="/docs/mcp/diagnose" title="Diagnose your agent">
    Once calls are flowing, use the MCP to find what's broken, understand why, and fix it.
  </Card>

  <Card icon="tags" href="/docs/evaluation/call-classification" title="Call outcomes and intents">
    What you're configuring when you set these up via MCP.
  </Card>

  <Card icon="clipboard-check" href="/docs/evaluation/custom-evals" title="Custom evals">
    How the evals you create through your assistant are defined and scored.
  </Card>

  <Card icon="lightbulb" href="/docs/guides/agent-monitoring" title="Monitoring best practices">
    A routine for catching issues early.
  </Card>
</CardGroup>
