Claude Code is Anthropic's CLI assistant. MCP servers live in .mcp.json (project scope, at the repo root) or in the per-user file at ~/.claude.json under the matching project key. 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. Claude Code uses the static API-key path described below.
Option 1 — Remote MCP (recommended)
Paste a URL + an API key. Works from a fresh checkout with no other install.
-
Generate an API key at app.display.dev/keys. Keys start with
sk_live_…. -
Pick the scope:
- Project scope —
.mcp.jsonat the repo root. Ships in source control; teammates pick it up automatically. - User scope —
~/.claude.jsonon your machine.
- Project scope —
-
Add the server:
{ "mcpServers": { "display": { "type": "url", "url": "/v1/mcp", "headers": { "Authorization": "Bearer sk_live_..." } } } } -
Restart the conversation (or run
/mcpto refresh).
For project scope, don't commit a real API key. Either keep the entry in ~/.claude.json (user scope) and ask teammates to do the same, or in .mcp.json substitute an env var your team resolves: "Authorization": "Bearer ${DISPLAYDEV_API_KEY}".
Option 2 — Local stdio
If you already have the CLI installed (npm install -g @displaydev/cli + dsp login), point Claude Code at the local server. Auth comes from your saved session — no API key needed.
{
"mcpServers": {
"display": {
"command": "dsp",
"args": ["mcp"]
}
}
}Claude Code resolves dsp against the shell PATH. If you don't want to install globally, use:
{
"mcpServers": {
"display": {
"command": "npx",
"args": ["-y", "@displaydev/cli", "mcp"]
}
}
}Or use the claude mcp add helper:
claude mcp add --transport stdio display -- dsp mcp # project scope
claude mcp add --transport stdio --scope user display -- dsp mcp # user scopeYou can run dsp login from inside a Claude Code shell session — it writes the same ~/.displaydev/config.json that the local MCP server reads. After login, restart the conversation (or run /mcp to refresh).