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

# MCP Overview

> Connect ClosedLoop AI's MCP to Claude Code, Claude Desktop, Cowork or Cursor and query product insights, Themes, and customer evidence.

ClosedLoop AI is built for the agentic stack. Connect Claude Code, Claude Desktop, Cowork, Cursor, or any MCP-compatible AI tool to your workspace, and Claude can query product intelligence, explore revenue-scored Themes, and trace insights back to real customer quotes.

## Setup

**1. Add the MCP**

> [tab] Claude Code
>
> ```bash theme={"dark"}
> # US workspace
> claude mcp add --transport http closedloop-ai https://mcp.closedloop.sh
>
> # EU workspace
> claude mcp add --transport http closedloop-ai https://eu.mcp.closedloop.sh
> ```

> [tab] Claude Desktop, web and Cowork
>
> These connect as a **custom connector**, not a local config file. Available on Free, Pro, Max, Team and Enterprise plans.
>
> 1. Open **Customize → Connectors** and click **+** next to Connectors.
>    (Team and Enterprise owners add it for everyone from **Organization settings → Connectors → Add → Custom → Web**.)
>
> 2. Name it `ClosedLoop AI` and paste the URL for your workspace's region — US is `https://mcp.closedloop.sh`, EU is `https://eu.mcp.closedloop.sh`.
>
> 3. Leave **Advanced settings** empty. The OAuth Client ID and Secret are optional, and ClosedLoop AI registers your client automatically.
>
> 4. Click **Add**, then authorize in the browser window that opens.
>
> > [!TIP]
> >
> > Adding a connector does not switch it on. In a chat, click **+** in the lower left, choose **Connectors**, and toggle ClosedLoop AI on for that conversation.

> [tab] Cursor
>
> Add to `.cursor/mcp.json`:
>
> ```json theme={"dark"}
> {
>   "mcpServers": {
>     "closedloop-ai": {
>       "url": "https://mcp.closedloop.sh"
>     }
>   }
> }
> ```
>
> For EU workspaces, use `https://eu.mcp.closedloop.sh`.

> [tab] VS Code
>
> Add to `.vscode/mcp.json`:
>
> ```json theme={"dark"}
> {
>   "servers": {
>     "closedloop-ai": {
>       "type": "http",
>       "url": "https://mcp.closedloop.sh"
>     }
>   }
> }
> ```
>
> For EU workspaces, use `https://eu.mcp.closedloop.sh`. Or install the ClosedLoop AI extension for VS Code, which adds the MCP for you.
>
> > [card] [VS Code](https://closedloop.sh/docs/mcp-server/vscode.md)
> >
> > Set up the MCP in VS Code and see what the extension adds

> [tab] LiteLLM
>
> LiteLLM can connect without a browser by using an OAuth client ID and shared secret. LiteLLM does not currently expose `private_key_jwt` configuration.
>
> > [card] [Set up machine-to-machine access](https://closedloop.sh/docs/account/mcp-service-clients.md)
> >
> > Open **ClosedLoop AI → Integrations → Developer tools → LiteLLM** to create a credential, copy the regional configuration, and verify tool discovery.

> [tab] Other Clients
>
> Any client supporting MCP HTTP transport with OAuth 2.1:
>
> | Region | MCP URL |
> | - | - |
> | US | `https://mcp.closedloop.sh` |
> | EU | `https://eu.mcp.closedloop.sh` |
>
> Auth is auto-discovered via `/.well-known/oauth-authorization-server`.
>
> Compatible machine-to-machine clients can authenticate with a registered RSA or P-256 public key. Clients that do not support `private_key_jwt` can use a shared secret.
>
> > [card] [Set up machine-to-machine access](https://closedloop.sh/docs/account/mcp-service-clients.md)
> >
> > Register a public key or configure a shared secret.

**2. Authorize access**

For Claude and Cursor, your AI tool will show an authorization link. Click it, and your browser opens the ClosedLoop AI sign-in page.

Log in (or sign up), select your workspace, and click **Connect**.

Machine-to-machine clients do not use this browser step. They authenticate with a signed JWT or shared secret and receive short-lived access tokens automatically.

> [!TIP]
>
> In Claude Code, type `/mcp` to view connections and trigger authorization.

**3. Ask your first question**

Try one of these:

* *"What are the top customer pain points?"*
* *"Show me deal blockers for enterprise customers"*
* *"How has insight volume changed over the last 3 months?"*

You should see results from your product intelligence data within seconds.

## Example queries

Once connected, just ask your AI tool naturally:

* *"What are US fintech customers frustrated about?"*
* *"Which Themes have the most revenue at risk?"*
* *"What are competitors doing better than us?"*
* *"Build a PRD for calendar management based on customer evidence"*

## What you can do

Once connected, your AI tool has access to tools covering:

* **Overview & trends**: aggregate counts, time-series, distribution by category/country/industry
* **Customer intelligence**: search customer accounts, view profiles with deals and revenue context
* **Product intelligence**: search all insights by keyword or meaning
* **Strategic insights**: satisfaction, churn risks, competitor mentions, buying behavior
* **Themes**: recurring product problems ranked by business impact with revenue data

> [card] [Core tools reference](https://closedloop.sh/docs/mcp-server/tools.md)
>
> See core tools with parameters and return values


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