---
title: MCP
description: Remote MCP at https://api.linkdash.dev/mcp with the same Unkey bearer key as the HTTP API.
sidebar:
  label: MCP
  order: 5
---

Remote MCP at `https://api.linkdash.dev/mcp`. Auth is `Authorization: Bearer ldash_...` from [API keys](https://linkdash.dev/dashboard/keys). Same keys as the [HTTP API](/api). Device login stays on the CLI. Plain markdown: [mcp.md](https://linkdash.dev/mcp.md).

## Connect

**Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "linkdash": {
      "url": "https://api.linkdash.dev/mcp",
      "headers": { "Authorization": "Bearer ${env:LINKDASH_API_KEY}" }
    }
  }
}
```

**Claude Code:** `claude mcp add --transport http linkdash https://api.linkdash.dev/mcp --header "Authorization: Bearer $LINKDASH_API_KEY"` (JSON needs `"type": "http"`).

**Codex:** `codex mcp add linkdash --url https://api.linkdash.dev/mcp --bearer-token-env-var LINKDASH_API_KEY`

**OpenCode:** `opencode mcp add linkdash --url https://api.linkdash.dev/mcp --header Authorization="Bearer $LINKDASH_API_KEY"`

Local: Convex `.site` URL + `/mcp`.

## Files

Do not send bytes through MCP JSON. Mint a URL (`{uploadUrl,storageId}`), PUT the file from the host, then create the link:

```bash
curl https://api.linkdash.dev/v1/uploads \
  -H "Authorization: Bearer ldash_..." \
  -H "Content-Type: application/json" \
  -d '{"fileSize":12345}'

curl -X PUT -H "Content-Type: video/mp4" --data-binary @clip.mp4 "$uploadUrl"

curl https://api.linkdash.dev/v1/links \
  -H "Authorization: Bearer ldash_..." \
  -H "Content-Type: application/json" \
  -d '{"storageId":"…","fileName":"clip.mp4","fileType":"video/mp4","fileSize":12345}'
```

MCP tools: `files_upload_url` returns `{uploadUrl,storageId}` → host PUTs to `uploadUrl` → `links_create` with that `storageId`. Optional unfurl card: `previewName`, `previewDescription`, `previewImageStorageId` (same upload). Optional `maxOpenings` pauses after that many openings; `links_update` can raise it or pass `clearMaxOpenings`. Do not print `uploadUrl` to the user.

`auth create` / `auth login` / `auth logout` are not MCP tools. Mapping: [api.md](https://linkdash.dev/api.md).
