# Connect Claude Code to Robylon via MCP

Add the Robylon MCP server to Claude Code with one command, sign in with your Robylon account, and query your support analytics and conversations from the terminal.

> Source: https://www.robylon.ai/docs/mcp/claude-code
> Section: MCP

To connect Claude Code to Robylon, add the server with the command below, then sign in to Robylon from the `/mcp` menu. There is no API key to paste.

```bash
claude mcp add --transport http robylon https://api.robylon.ai/mcp/
```

You need an Admin or Super-admin role in each Robylon workspace you connect. See [Setup](https://www.robylon.ai/docs/mcp/setup#what-do-i-need-before-i-connect) for the full requirements.

## How do I connect Claude Code?

<Steps>
  <Step title="Add the server">
    Run the command above in your terminal. Add `--scope user` before the name to use Robylon in every project, not only the current one.
  </Step>
  <Step title="Open the MCP menu">
    Start Claude Code and type `/mcp`. Select **robylon** and press Enter.
  </Step>
  <Step title="Sign in to Robylon">
    Choose **Authenticate**. Your browser opens Robylon's sign-in page: sign in, tick the workspaces to include and click **Connect**.
  </Step>
</Steps>

You can also sign in from the terminal with `claude mcp login robylon`.

## Which scope should I use?

The scope decides where Claude Code saves the server and who else gets it.

| Scope | Who gets it | Where it is saved |
| --- | --- | --- |
| `local` (default) | You, in the current project only | `~/.claude.json` |
| `user` | You, in every project | `~/.claude.json` |
| `project` | Everyone who works on the project | `.mcp.json` in the project root, committed to git |

With `project` scope, each teammate still signs in with their own Robylon account. The file shares the server URL, never anyone's access.

## How do I check the connection?

Run `claude mcp list`. Before you sign in, Robylon shows as needing authentication, which is expected. After you sign in, ask a question such as "How many chats did the AI agent resolve on its own last week?"

## What if the Claude Code connection does not work?

* **Sign in from an interactive session.** Sign-in cannot run in `claude -p`. Authenticate once in a normal session first.
* **If Robylon asks you to sign in again,** open `/mcp`, select **robylon** and choose **Re-authenticate**.
* **Put flags before the name.** `--transport` and `--scope` go before `robylon` and the URL.
* **If Robylon refuses the connection,** the page it shows explains why. See [Why can't I connect?](https://www.robylon.ai/docs/mcp/setup#why-cant-i-connect)
