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

# Getting Started

> The OnePerfectSlice MCP server connects your AI agents to structured context from your calls and CRM. Analyze patterns, search posts, and retrieve evidence — all through natural language in Claude Code, Claude Desktop, or Codex.

The OnePerfectSlice MCP server is **hosted** — there's nothing to download, install, or update. Point your client at one URL and sign in through your browser:

```
https://mcp.oneperfectslice.ai/mcp
```

## Authentication

The server uses **OAuth 2.0** — no API keys to copy or store. The first time you connect from any client:

1. Your browser opens to OnePerfectSlice
2. You log in (or you're already signed in)
3. You **select the team** whose data this connection should access
4. The client receives a token and reconnects automatically

Tokens refresh on their own, so you authenticate once per client. To switch teams, reconnect and pick a different team.

## Set up your client

Setup takes under a minute — add the URL, then authenticate. Pick your client:

<Columns cols={3}>
  <Card title="Claude Code" icon="terminal" href="/mcp/claude-code">
    One CLI command. Best for developers in the terminal.
  </Card>

  <Card title="Claude Desktop" icon="desktop" href="/mcp/claude-desktop">
    Add a custom connector. Best for non-technical users.
  </Card>

  <Card title="ChatGPT" icon="comments" href="/mcp/chatgpt">
    Add a connector in settings. No terminal required.
  </Card>

  <Card title="Cursor" icon="arrow-pointer" href="/mcp/cursor">
    Add the URL in MCP settings.
  </Card>

  <Card title="VS Code" icon="code" href="/mcp/vscode">
    Connect through GitHub Copilot's MCP support.
  </Card>

  <Card title="Codex" icon="terminal" href="/mcp/codex">
    Configure and run `codex mcp login`.
  </Card>
</Columns>

<Card title="Any other MCP client" icon="plug" href="/mcp/other-clients">
  Windsurf, Cline, Goose, Zed, LM Studio and more — the same URL works anywhere.
</Card>

## How it works

The MCP server sits on top of the [OnePerfectSlice REST API](/api/introduction) and exposes 9 tools designed for agent interaction. Key differences from calling the API directly:

* **Composite operations** — `run_slice` starts a run, polls for completion, and fetches evidence in one call, not three.
* **Flat parameters** — no nested objects. Every filter is a top-level argument the agent can set directly.
* **Guided errors** — when something goes wrong, error messages tell the agent exactly which tool to call next.

## Available tools

| Tool                                                    | What it does                                                    |
| ------------------------------------------------------- | --------------------------------------------------------------- |
| [`list_slices`](/mcp/tools#list_slices)                 | Discover available analyses or get details for a specific slice |
| [`preview_slice_count`](/mcp/tools#preview_slice_count) | Count matched calls before running (free, no AI cost)           |
| [`run_slice`](/mcp/tools#run_slice)                     | Execute an analysis and get results + evidence                  |
| [`get_run`](/mcp/tools#get_run)                         | Retrieve results from a past or in-progress run                 |
| [`list_runs`](/mcp/tools#list_runs)                     | Browse run history with optional filtering                      |
| [`search_posts`](/mcp/tools#search_posts)               | Find summaries and scorecards matching your criteria            |
| [`get_post`](/mcp/tools#get_post)                       | Get a single post with full structured content                  |
| [`search_evidence`](/mcp/tools#search_evidence)         | Search evidence quotes across all completed runs                |
| [`get_filter_options`](/mcp/tools#get_filter_options)   | Discover valid filter values (call owners, companies, CRM data) |

See [Tools](/mcp/tools) for the full parameter reference with examples.
