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
npx skills add display-dev/skill --skill display-devConnect 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:
npm install -g @displaydev/cli
dsp loginPreserve the other entries in ~/.cursor/mcp.json, then add or update only display:
{
"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. Then see Publish with your agent to publish your own work and choose who can open it.
Alternative: connect with OAuth
Cursor supports OAuth for remote MCP servers (checked in the Cursor docs on 14 October 2026). Use it when you want a browser sign-in and no API key.
-
Add this server to
.cursor/mcp.jsonor~/.cursor/mcp.json. Do not add aheadersentry.{ "mcpServers": { "display": { "url": "https://api.display.dev/v1/mcp" } } } -
Open Settings → MCP, select
display, and complete the browser sign-in. Select an organization and approve access.
An OAuth connection acts with your role in the organization you select. Revoke it from Connected apps.
Alternative: connect with an API key
-
Generate a key from API keys.
-
Make
DISPLAYDEV_API_KEYavailable to the process that launches Cursor. -
Add this server to
.cursor/mcp.jsonor~/.cursor/mcp.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:
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.
- OAuth sign-in does not start – reload the Cursor window, then select
displayin Settings → MCP again. - Remote calls return
401– confirm the environment check succeeds for the Cursor process, or rotate the API key. - Local calls return
401– rundsp loginagain and reload Cursor. - Local server cannot start – run
which dsp; use the printed absolute path ascommandif Cursor cannot resolvedsp.