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

# Remote MCP Server

> Connect your AI coding assistant to Annie with zero setup — no API tokens, no Node.js, just a URL.

The remote MCP server lets AI coding assistants connect to Annie over HTTP with OAuth authentication. No local dependencies, no API tokens to manage — your editor handles login automatically.

<Note>
  The remote server gives you the full Annie experience: infrastructure investigation, log analysis, incident debugging, and more. It replaces the need for a locally running MCP server.
</Note>

## Setup

### One-command install

Install across all your editors at once using [add-mcp](https://github.com/neondatabase/add-mcp):

```bash theme={null}
npx add-mcp https://api.anyshift.io/mcp/remote -n annie -g
```

This auto-detects your installed editors (Claude Code, Cursor, Windsurf, VS Code, Claude Desktop, etc.) and configures them all.

### Manual configuration

Add to your editor's MCP config file (e.g. `.cursor/mcp.json`, `~/.claude.json`, `claude_desktop_config.json`):

```json theme={null}
{
  "mcpServers": {
    "annie": {
      "type": "http",
      "url": "https://api.anyshift.io/mcp/remote"
    }
  }
}
```

## First Use

On your first Annie tool call, your editor will open a browser window:

1. Log in with your Anyshift account
2. The connection is established automatically
3. No tokens to copy — your editor stores the credentials

That's it. All subsequent tool calls are authenticated automatically.

## Available Tools

### Asking Annie

| Tool                 | Description                                                                                                                                                                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ask_annie`          | Ask a question about your cloud infrastructure. Pass `mode="rca"` to run a multi-step root-cause investigation instead of a chat. Pass `hint="report"` to format the answer as report blocks, or `hint="diagram"` for a Mermaid diagram. |
| `get_annie_response` | Poll for Annie's answer (called automatically by your editor)                                                                                                                                                                            |
| `list_projects`      | List your Anyshift projects                                                                                                                                                                                                              |
| `set_project`        | Switch the active project for queries                                                                                                                                                                                                    |

### Custom Reports

After an `ask_annie` call with `hint="report"`, you can save the answer as a reusable report definition and re-run it later.

| Tool                      | Description                                                                                  |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| `save_report_definition`  | Save a report-shaped answer as a named definition                                            |
| `list_report_definitions` | List the report definitions in the active project                                            |
| `list_report_instances`   | List past runs of a specific definition                                                      |
| `get_report_instance`     | Fetch a generated report as markdown or JSON                                                 |
| `generate_report`         | Trigger a fresh run of a definition. The backend dedupes if a generation is already pending. |

### Feedback

Ratings flow back into Annie so future investigations can take your judgment into account.

| Tool                         | Description                                                                                            |
| ---------------------------- | ------------------------------------------------------------------------------------------------------ |
| `submit_answer_feedback`     | Thumbs up or down on a chat or RCA answer                                                              |
| `submit_hypothesis_feedback` | Thumbs up or down on a single hypothesis inside an RCA. The rating reaches the agent as a live update. |

## Pre-built skills for Claude Code

If your agent runs in [Claude Code](https://docs.anthropic.com/en/docs/claude-code), install the [Annie Skills plugin](/pages/product/integration/skills) to skip the prompt-engineering work. The plugin ships ready-made skills that teach Claude Code when to call which MCP tool, how to chain calls, and how to recover from auth or staleness failures. Source: [`anyshift-io/annie-skills`](https://github.com/anyshift-io/annie-skills).

## Example Prompts

```text theme={null}
Use Annie to investigate the spike in 5xx errors on the payments service
```

```text theme={null}
Ask Annie what changed in our infrastructure in the last 24 hours
```

```text theme={null}
Ask Annie to trace the dependency chain for the prod RDS instance
```

```text theme={null}
Ask Annie why the Lambda function can't connect to the database
```

<Tip>
  Annie typically takes 30 seconds to a few minutes depending on the complexity of the question. Your editor will poll automatically until the answer is ready.
</Tip>

## Managing Access

You can view and revoke authorized MCP connections from your [profile page](https://app.anyshift.io/my-profile) under **Authorized Apps**.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Re-authenticate">
    If your session expires, reset the connection and try again:

    ```bash theme={null}
    # Claude Code
    claude mcp reset annie
    ```

    Your next Annie tool call will re-open the browser for login.
  </Accordion>

  <Accordion title="Browser doesn't open during auth">
    Make sure your default browser is set in your OS settings. If using a remote/SSH session, you may need to use the local stdio server instead.
  </Accordion>

  <Accordion title="Timeout waiting for response">
    This is normal — Annie is still working. The `get_annie_response` tool is called automatically by your editor until the answer is ready. Complex investigations can take a few minutes.
  </Accordion>
</AccordionGroup>
