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

# MCP Server Setup

> Connect any MCP-compatible client to Kasava's product intelligence tools

Kasava exposes 8 live-data tools (plus 3 AI agents and 2 workflows) via the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). Any MCP-compatible client can connect to search code, query commits, search customer signals, load plans, and more. Cacheable data (product graph, work breakdowns, ownership, rationale) lives in the local `.kasava/` artifact maintained by the [Kasava CLI](/docs/developer/cli) — it's not in MCP because reading filesystem-cached data costs zero tokens at session start while live MCP schemas don't.

## Connection Details

| Field         | Value                               |
| ------------- | ----------------------------------- |
| **URL**       | `https://api.kasava.dev/v1/mcp/sse` |
| **Transport** | SSE (Server-Sent Events)            |
| **Auth**      | Bearer token (Kasava API key)       |

## Prerequisites

1. A Kasava account with at least one indexed repository
2. An API key from [Settings > API Keys](https://app.kasava.dev/settings/api-keys)

## Client Setup

### Claude Code

The easiest option is to [install the Kasava plugin](/docs/developer/claude-code-plugin), which configures MCP automatically.

For manual setup, add to your project's `.mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "kasava": {
      "type": "sse",
      "url": "https://api.kasava.dev/v1/mcp/sse",
      "headers": {
        "Authorization": "Bearer kasava_live_YOUR_KEY"
      }
    }
  }
}
```

### Cursor

Add to your Cursor MCP settings (`~/.cursor/mcp.json` or project-level):

```json theme={null}
{
  "mcpServers": {
    "kasava": {
      "url": "https://api.kasava.dev/v1/mcp/sse",
      "headers": {
        "Authorization": "Bearer kasava_live_YOUR_KEY"
      }
    }
  }
}
```

See the [Cursor-specific guide](/docs/developer/cursor-setup) for detailed instructions.

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json theme={null}
{
  "mcpServers": {
    "kasava": {
      "url": "https://api.kasava.dev/v1/mcp/sse",
      "headers": {
        "Authorization": "Bearer kasava_live_YOUR_KEY"
      }
    }
  }
}
```

### Windsurf

Add to your Windsurf MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "kasava": {
      "serverUrl": "https://api.kasava.dev/v1/mcp/sse",
      "headers": {
        "Authorization": "Bearer kasava_live_YOUR_KEY"
      }
    }
  }
}
```

## Available Tools

Once connected, your AI agent has access to 8 tools, 3 AI agents, and 2 workflows. See the [MCP Tool Reference](/docs/developer/api-reference) for the complete list.

Key capabilities:

* **Code intelligence** (`code-tool`): Symbol search, definitions, usages, dependencies, semantic search, comments, dead code, code smells
* **Commit analysis** (`commit-tool`): Semantic classification, hotspots, changelog
* **Unified search** (`search-tool`): One-call multi-corpus search with plan staleness flags
* **Customer signals** (`document-search-tool`): Search uploads, plans, signals, product docs
* **Competitive intel** (`competitor-tool`): Live scrapings, change detection, market trends
* **Graph traversal** (`entity-analysis-tool`): Feature / layer / symbol relationships
* **Plan specs** (`spec-export-tool`): Agent-prompt format
* **Decision recording** (`record-decision-tool`): Write decisions against the bound product
* **AI agents**: `ask_codeIntelligenceAgent`, `ask_productInsightsAgent`, `ask_architectureInvestigationAgent`
* **Workflows**: `run_bugAnalysisWorkflow`, `run_deepResearchWorkflow`

What's **not** in MCP — and why:

* **Product graph queries** → cached in `.kasava/graph.json` after `kasava sync` (zero token cost)
* **Work breakdowns** → `.kasava/work-items.json`
* **Plan markdown** → `.kasava/plans/<slug>.md`
* **File ownership / rationale** → `kasava ownership <file>` and `kasava rationale <file>` CLI commands
* **GitHub / Linear / Jira / Asana writes** → web app or `gh` CLI

## Verify Connection

Test your connection with curl:

```bash theme={null}
curl -N -H "Authorization: Bearer kasava_live_YOUR_KEY" \
  https://api.kasava.dev/v1/mcp/sse
```

You should see SSE events streaming. Press Ctrl+C to disconnect.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection refused or timeout">
    Check that your API key is valid and hasn't expired. Try creating a new key at [Settings > API Keys](https://app.kasava.dev/settings/api-keys).
  </Accordion>

  <Accordion title="401 Unauthorized">
    Ensure your Authorization header uses the `Bearer` prefix: `Authorization: Bearer kasava_live_...`
  </Accordion>

  <Accordion title="Tools not appearing">
    After connecting, your MCP client needs to discover tools. In Claude Code, try asking "What Kasava tools are available?" In Cursor, check the MCP panel.
  </Accordion>
</AccordionGroup>
