> ## 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.

# Set Up Your Agent

> Connect the Tuner MCP server to your IDE or chatbot and configure your agent's observability using natural language.

Set up your integration with [Cursor](#cursor), [Claude Code](#claude-code), [Antigravity](#antigravity), or [Claude](#claude) and manage your agent configurations using natural language.

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

***

<Note>
  Tuner MCP Server: [https://api.usetuner.ai/mcp/](https://api.usetuner.ai/mcp/)
</Note>

## IDEs

Connect Tuner to your IDE to manage agent configurations directly from your development environment.

The MCP server uses **API-key authentication** through an `Authorization` header. Copy your API key from **Workspace Settings** → **API Keys & Integrations** and use it as a Bearer token when configuring the MCP in your IDE.

### 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

Connect Tuner to your AI chatbot to manage agent configurations through natural language conversations.

Chatbots connect to Tuner using **OAuth-based authentication**. When you add the Tuner MCP server for the first time, you will be redirected to Tuner's sign-in page to authorize access. Once authenticated, your session remains active and you won't need to re-authenticate unless you revoke access.

### Claude

<Steps>
  <Step title="Add Custom Connector">
    You need a **Pro subscription or higher**. Go to **Settings** → **Connectors**, click **Add Custom Connector**, and paste your 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 you've connected Tuner to your chatbot or IDE, paste the following into your chat to begin configuring your agent:

```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 can 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. Once calls start flowing, head to [Diagnose Your Agent](/docs/mcp/diagnose-your-agent) to find and fix issues.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection failed or timed out">
    * **Chatbots:** Verify you're using the correct MCP Server URL from the Tuner Dashboard. 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** and 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-your-agent" title="Diagnose Your Agent">
    Use the MCP to find what's broken, understand why, and fix it, including adding the evals that keep it fixed.
  </Card>

  <Card icon="robot" href="/user-guide/quick-start/manage-tuner-with-mcp" title="Manage Tuner with MCP">
    Examples, best practices, and use cases for managing your agent with AI assistants.
  </Card>

  <Card icon="tags" href="/docs/agent-configurations/classifying-calls-call-analysis-settings" title="Classifying Calls">
    Learn about call outcomes and user intents you can configure via MCP.
  </Card>

  <Card icon="clipboard-check" href="/docs/agent-configurations/creating-custom-evaluations-evaluation-criteria" title="Creating Custom Evaluations">
    Understand evals that you can create through your AI assistant.
  </Card>
</CardGroup>
