Skip to content

Cursor

Configure Cursor to publish artifacts via the Display.dev MCP server.

On this page

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.

  1. Generate an API key at app.display.dev/keys. Keys start with sk_live_….

  2. Set DISPLAYDEV_API_KEY=sk_live_... in your shell profile so the project file can reference it without committing the key.

  3. Edit .cursor/mcp.json:

    json
    {
      "mcpServers": {
        "display": {
          "url": "/v1/mcp",
          "headers": {
            "Authorization": "Bearer ${env:DISPLAYDEV_API_KEY}"
          }
        }
      }
    }
  4. 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):

json
{
  "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 login and reload the window.
  • Slow first call (local with npx) — first invocation downloads the package; subsequent calls use the cache.

Was this page helpful?