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

# MCP Server Introduction

> Use Tokencraft with Claude, Cursor, and other MCP clients

# Model Context Protocol (MCP)

Use your Tokencraft design tokens with AI assistants through natural language. Connect via OAuth — no API key to paste.

## Quick start

<Steps>
  <Step title="Add the MCP server">
    URL: `https://app.tokencraft.dev/api/mcp`

    In **Cursor**: Settings → MCP → add remote server with this URL.
  </Step>

  <Step title="Authorize">
    On first use, your browser opens for OAuth consent. Approve the scopes.
  </Step>

  <Step title="Ask">
    *"Show me my workspaces"* or *"Bulk import these design tokens"*
  </Step>
</Steps>

See [Configuration](/mcp/configuration) and [MCP OAuth](/mcp/oauth) for details.

## What you can do

<CardGroup cols={2}>
  <Card title="Browse & Explore" icon="magnifying-glass">
    Navigate workspaces, tokensets, modes, and tokens naturally
  </Card>

  <Card title="Bulk import" icon="upload">
    Import entire tokensets with modes and tokens in one call
  </Card>

  <Card title="Multi-Format Export" icon="file-export">
    Generate CSS, JSON, iOS Swift, Android XML instantly
  </Card>

  <Card title="CRUD Operations" icon="pen">
    Create, update, and delete tokens via conversation (with write scope)
  </Card>
</CardGroup>

## Supported clients

* **Cursor** — remote MCP with OAuth
* **Claude** — remote MCP with OAuth
* **Figma plugin** — OAuth via browser
* Any MCP client supporting Streamable HTTP + OAuth

## Architecture

```
┌─────────────────┐
│  MCP Client     │
│  (Cursor, etc.) │
└────────┬────────┘
         │ HTTPS + OAuth Bearer
         │
┌────────▼───────────┐
│ Tokencraft         │
│ /api/mcp           │
└────────┬───────────┘
         │ REST API
         │
┌────────▼───────────┐
│ Tokencraft API     │
│ /api/v1            │
└────────────────────┘
```

## Tools (24)

| Category   | Tools                                                                                                         |
| ---------- | ------------------------------------------------------------------------------------------------------------- |
| Workspaces | `list_workspaces`, `get_workspace`, `create_workspace`, `update_workspace`, `delete_workspace`                |
| Tokensets  | `list_tokensets`, `get_tokenset`, `create_tokenset`, `update_tokenset`, `delete_tokenset`                     |
| Modes      | `list_modes`, `get_mode`, `create_mode`, `update_mode`, `delete_mode`                                         |
| Tokens     | `list_tokens_by_tokenset`, `list_tokens_by_mode`, `get_token`, `create_token`, `update_token`, `delete_token` |
| Export     | `export_tokenset`, `export_mode`                                                                              |
| Import     | `bulk_import`                                                                                                 |

[Complete Tools Reference](/mcp/tools)

## Resources

Hosted MCP exposes dynamic `tokencraft://` resources:

| Resource URI                             | Description                     |
| ---------------------------------------- | ------------------------------- |
| `tokencraft://workspaces`                | All workspaces                  |
| `tokencraft://workspace/{id}/tokensets`  | Tokensets in a workspace        |
| `tokencraft://tokenset/{id}/tokens`      | All tokens with resolved values |
| `tokencraft://tokenset/{id}/export.json` | JSON export                     |
| `tokencraft://tokenset/{id}/export.css`  | CSS export                      |

## Security

* Scoped OAuth consent per application
* Revoke access from [API Settings](https://app.tokencraft.dev/api-settings)
* Same rate limits as REST API (100 req/min)

## Next Steps

<CardGroup cols={2}>
  <Card title="MCP OAuth" icon="shield-check" href="/mcp/oauth">
    OAuth flow and scopes
  </Card>

  <Card title="Configuration" icon="gear" href="/mcp/configuration">
    Connect your MCP client
  </Card>

  <Card title="Tools" icon="wrench" href="/mcp/tools">
    Tool reference
  </Card>

  <Card title="Examples" icon="code" href="/mcp/examples/basic-usage">
    Example interactions
  </Card>
</CardGroup>
