Skip to content

Cursor

Connect Cursor to publish and update work without leaving your project.

On this page

Connect Display.dev so Cursor can publish and update your HTML or Markdown files. Each published piece of work is an artifact, with its own link. The recommended setup installs the display.dev skill and uses a local connection with your signed-in CLI session.

Cursor reads project configuration from .cursor/mcp.json and global configuration from ~/.cursor/mcp.json.

Use the Quickstart setup prompt to have your agent guide you, or follow the steps below. Complete any sign-in or approval steps yourself.

Install the skill

bash
npx skills add display-dev/skill --skill display-dev

Connect through local MCP

The local Model Context Protocol (MCP) server lets Cursor use Display.dev through your CLI session. Install the CLI, run dsp login, and complete the browser sign-in:

bash
npm install -g @displaydev/cli
dsp login

Preserve the other entries in ~/.cursor/mcp.json, then add or update only display:

json
{
  "mcpServers": {
    "display": {
      "type": "stdio",
      "command": "dsp",
      "args": ["mcp"]
    }
  }
}

Open Settings → MCP to confirm that display is connected and its tools are enabled. Reload the Cursor window after editing the file.

Publish your first artifact

Once Display.dev's tools are available, use the first-publish example to create a Private sample and open its link.

Alternative: connect with an API key

  1. Generate a key from API keys.

  2. Make DISPLAYDEV_API_KEY available to the process that launches Cursor.

  3. Add this server to .cursor/mcp.json or ~/.cursor/mcp.json:

    json
    {
      "mcpServers": {
        "display": {
          "url": "https://api.display.dev/v1/mcp",
          "headers": {
            "Authorization": "Bearer ${env:DISPLAYDEV_API_KEY}"
          }
        }
      }
    }

Before opening Cursor from that same terminal, check that the variable exists without printing the secret:

bash
test -n "$DISPLAYDEV_API_KEY" && echo "DISPLAYDEV_API_KEY is set" || echo "DISPLAYDEV_API_KEY is missing"

Launching Cursor from Finder, the Start menu, or another desktop launcher may not inherit variables from your shell profile. Configure the variable in the environment used by that launcher, or start Cursor from a terminal where the check succeeds.

Do not commit the API key itself. The configuration above contains only the variable name.

Troubleshooting

  • Tool list is empty – reload the Cursor window, then check Settings → MCP.
  • Remote calls return 401 – confirm the environment check succeeds for the Cursor process, or rotate the API key.
  • Local calls return 401 – run dsp login again and reload Cursor.
  • Local server cannot start – run which dsp; use the printed absolute path as command if Cursor cannot resolve dsp.

Was this page helpful?