Cursor reads MCP server configuration from .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (per-user). There are two ways to wire up Display.dev.
If you're using Claude Desktop or Claude.ai web instead, the OAuth-based Custom connector flow is the recommended setup. Cursor uses the static API-key path described below.
Option 1 — Remote MCP (recommended)
-
Generate an API key at app.display.dev/keys. Keys start with
sk_live_…. -
Set
DISPLAYDEV_API_KEY=sk_live_...in your shell profile so the project file can reference it without committing the key. -
Edit
.cursor/mcp.json:{ "mcpServers": { "display": { "url": "/v1/mcp", "headers": { "Authorization": "Bearer ${env:DISPLAYDEV_API_KEY}" } } } } -
Reload the window (⌘⇧P → "Reload Window").
Cursor expands ${env:VAR} at server-start, so the project-scoped file is safe to commit alongside the rest of your repo.
Option 2 — Local stdio
If you already have the CLI (npm install -g @displaydev/cli + dsp login):
{
"mcpServers": {
"display": {
"type": "stdio",
"command": "dsp",
"args": ["mcp"]
}
}
}Reload the window. The display entry shows up in Settings → Features → Model Context Protocol (Cmd+Shift+J).
Troubleshooting
- Tool list empty after edit — Cursor caches MCP servers per-window. Reload (⌘⇧P → "Reload Window").
- Tool calls 401 (remote setup) — API key revoked or wrong; rotate it from the dashboard.
- Tool calls 401 (local setup) — saved session expired; run
dsp loginand reload the window. - Slow first call (local with
npx) — first invocation downloads the package; subsequent calls use the cache.