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

# MCP Server Overview

> Connect AI coding assistants to your Whilst workspace

The Whilst MCP Server implements the [Model Context Protocol](https://modelcontextprotocol.io/) to let AI coding assistants (Cursor, Claude Desktop, VS Code) query and manage your Whilst documents and folders.

## Capabilities

* **Document CRUD** — List, get, create, update, and delete documents
* **Folder Management** — Full folder tree operations
* **Semantic Search** — Find documents by meaning through your AI assistant
* **Bulk Operations** — Batch delete, move, tag, and update visibility
* **Workspace Isolation** — Every operation scoped to your workspace via API key
* **Real-time Integration** — Changes publish events to AppSync for UI updates

## Architecture

```
┌─────────────────────────────────────────┐
│  AI Application (Cursor / Claude / VS Code)  │
└──────────────┬──────────────────────────┘
               ▼
┌─────────────────────────────────────────┐
│  Whilst MCP Server                       │
│  ├─ Transport: STDIO / HTTP+SSE         │
│  ├─ Auth: API Key                       │
│  ├─ Tools (CRUD, Search, Organize)      │
│  ├─ Resources (Documents, Folders)      │
│  └─ Prompts (Templates)                │
└──────────────┬──────────────────────────┘
               ▼
┌─────────────────────────────────────────┐
│  Whilst Backend                          │
│  ├─ tenant-store (DB access)            │
│  └─ PostgreSQL (Neon)                   │
└─────────────────────────────────────────┘
```

## Quick Setup

```json theme={null}
{
  "mcpServers": {
    "whilst": {
      "command": "npx",
      "args": ["@whilst/mcp-server"],
      "env": {
        "WHILST_API_KEY": "whl_live_your_key_here"
      }
    }
  }
}
```

See [Setup](/mcp/setup) for full configuration instructions per IDE.
