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

# Connect Claude Code

> Add Prefer's MCP server to Claude Code with an MCP key, then ask about your AI visibility from the terminal.

**1. Create an MCP key**

In Prefer, open **Integrations → MCP** in the left navigation and create a key on the **Keys** tab. See [MCP keys](https://tryprefer.com/docs/ai-assistants/mcp-keys.md).

**2. Add the server**

Run this in your terminal, with your key in place of `<MCP key>`:

```bash theme={null}
claude mcp add --transport http prefer https://mcp.tryprefer.com/mcp --header "Authorization: Bearer <MCP key>"
```

**3. Check the connection**

Run `claude mcp list`. Prefer shows as connected.

**4. Ask**

Start Claude Code and ask in plain words, for example "How visible is my brand in AI answers right now?" or "What should we fix first?". Claude asks before it uses a Prefer tool the first time.

> [!TIP]
>
> To keep the key out of your shell history, read it into a variable first: run `read -rs PREFER_KEY`, paste the key, then use `--header "Authorization: Bearer $PREFER_KEY"` in the command above.

## Skills as slash commands

Prefer's skills arrive as prompts, which Claude Code lists as slash commands under the server's name. Type `/prefer:` to see them, for example `/prefer:prefer_weekly_pulse` for a weekly AI visibility pulse or `/prefer:prefer_competitor_radar` to see where a rival beats you.

## Where the server is available

`claude mcp add` adds the server for the folder you run it in. Add `--scope user` to make Prefer available in every Claude Code session on your machine.

## Remove it

Run `claude mcp remove prefer`, and revoke the key in Prefer if you no longer need it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.