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

# MCP Server

> Connect MentionLab to AI tools using the Model Context Protocol

## Overview

MentionLab provides a remote [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server
that lets you work with your brand analytics directly from AI tools like Claude, Cursor, and
Windsurf.

It is a hosted, remote server: there is nothing to install and no local process to run. You point
your client at a URL, sign in through MentionLab, and your assistant can manage projects, queries,
entities and tags, and query every analytics surface in plain language.

> [!WARNING]
>
> The MCP server is currently in beta and is subject to breaking changes.

## Server URL

```
https://mcp.mentionlab.io/mcp
```

One URL for every client. The server is stateless and keeps no session, so a dropped connection costs
you nothing.

## Authentication

The server uses **OAuth 2.1** with dynamic client registration and PKCE. On first connection your
client opens a browser window, you sign in to MentionLab and approve access, and the client stores
the token. There are no API keys to create and nothing to paste.

Your assistant sees exactly what your MentionLab account sees: the same organizations, projects
and permissions. To revoke access, disconnect the server in your client.

## Connect your client

> [tab] Claude
>
> Claude Desktop, Claude web and the Claude mobile apps all connect the same way, as a **custom
> connector**. There is no config file to edit.
>
> 1. Open **Settings → Connectors**.
> 2. Click **Add custom connector**.
> 3. Paste the URL:
>    ```
>    https://mcp.mentionlab.io/mcp
>    ```
> 4. Click **Add**, then **Connect** and sign in to MentionLab when the browser opens.
>
> The connector then appears in the attachments menu of any chat.

> [tab] Claude Code
>
> Run this in your terminal:
>
> ```bash theme={null}
> claude mcp add --transport http mentionlab https://mcp.mentionlab.io/mcp
> ```
>
> Then run `/mcp` inside Claude Code and choose **Authenticate** to complete the browser sign-in.

> [tab] Cursor
>
> Add this to `.cursor/mcp.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "mentionlab": {
>       "url": "https://mcp.mentionlab.io/mcp"
>     }
>   }
> }
> ```
>
> Then open **Settings → MCP** and click **Login** next to the MentionLab server.

> [tab] Windsurf
>
> Add this to `~/.codeium/windsurf/mcp_config.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "mentionlab": {
>       "serverUrl": "https://mcp.mentionlab.io/mcp"
>     }
>   }
> }
> ```
>
> Then click **Refresh** in the MCP panel and complete the browser sign-in.

> [tab] Other clients
>
> Any client with remote MCP + OAuth support works. Point it at
> `https://mcp.mentionlab.io/mcp` and let it discover the OAuth configuration from
> `/.well-known/oauth-protected-resource`.

## A large tool surface

MentionLab exposes a lot of tools, and some clients cap how many they will load. Nothing is lost when
that happens:

| Tool | What it does |
| - | - |
| `search_tools` | Finds a tool by keyword |
| `describe_tool` | Returns one tool's full schema |
| `run_code` | Calls any read-only tool by name, and aggregates before answering |

> [!NOTE]
>
> If your client shows a truncated tool list, ask the assistant to look the tool up with
> `search_tools` and call it through `run_code`. Both work whether or not the tool was listed.

## Example usage

Once connected, work in plain language:

> "Show me my brand's visibility trend for the last 30 days."

> "Which domains cite my brand most frequently?"

> "Compare sentiment across my top 5 competitors."

> "Create a new query: 'What is the best CRM for startups?' with the tag 'Product'."

> [!TIP]
>
> Ask the assistant to call `guide` first when starting a bigger analysis. It returns the domain
> model and a set of workflow playbooks, which makes the follow-up answers noticeably better.

## Troubleshooting

> [accordion] The client asks me to sign in again on every session
>
> Your client is not persisting the OAuth token. Reconnect the server; if it keeps happening,
> remove and re-add it so a fresh client registration is issued.

> [accordion] Only some tools show up, or the client says there are too many tools
>
> Your client caps its tool list. Ask the assistant to find what it needs with `search_tools` and
> call it through `run_code`.

> [accordion] Requests fail with 401 unauthorized
>
> The access token expired or was revoked. Disconnect and reconnect the server to re-authorize.

> [accordion] A tool returns 'result too large'
>
> Ask the assistant to re-run the same call inside `run_code` and aggregate there, so only the
> summary comes back.

## Next steps

> [card] [REST API](https://docs.mentionlab.io/rest-api/getting-started.md)
>
> Learn the basics of the MentionLab REST API.

> [card] [Core Concepts](https://docs.mentionlab.io/guides/core-concepts.md)
>
> Understand projects, queries, entities, and tags.


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