DocSpace Docs

Use DocSpace with Claude

Connect Claude to your DocSpace space so it can search and read your pages, and publish the HTML deliverables it generates (reports, dashboards, prototypes, decks) as DocSpace artifacts: pages with a stable link, version history and the same permissions as the rest of the space.

Claude app How it connects Status
Claude Code The docspace plugin Available
Claude Desktop The mcp-remote bridge with an agent key Available
claude.ai Custom connector After OAuth (AX3)
Availability. The hosted endpoint https://mcp.docspace.dev/mcp opens with the remote MCP rollout. Until then, /mcp only answers on a local development server (http://localhost:4000/mcp, see Self-hosting). The steps are the same; only the URL changes.

Create an agent key

Every Claude app below authenticates with an agent key: access to one space, with a role and scopes you choose. You need to be an administrator of the space.

  1. Open the space, then Settings → Agents and keys → Create key.
  2. Name it after where it will run, such as claude-code-laptop.
  3. To publish artifacts, choose the Editor role and the Full write scopes: publishing needs artifacts:write. A Read only key can search and read, but not publish. See Scopes and roles.
  4. Copy the key (dsk_<id>_<secret>). It is shown only once.
Every example on this page uses the placeholder dsk_live_REPLACE_ME. Keep your real key in your environment or a secrets manager; never commit it or paste it in a shared chat.

Claude Code with the docspace plugin

The docspace plugin bundles two things:

1. Set the variable

export DOCSPACE_AGENT_KEY='dsk_live_REPLACE_ME'   # your agent key

Put it in your shell profile (~/.zshrc, ~/.bashrc) or load it from a secrets manager, then start Claude Code from that shell. To use another server, such as a local or self-hosted one, also set DOCSPACE_MCP_URL (for example http://localhost:4000/mcp); it defaults to https://mcp.docspace.dev/mcp.

2. Install the plugin

The plugin lives in the DocSpace repository under integrations/claude-plugin/. From a checkout:

claude plugin marketplace add ./integrations/claude-plugin
claude plugin install docspace@docspace

Or load it for a single session without installing:

claude --plugin-dir ./integrations/claude-plugin

Check it with claude mcp list (or /mcp inside Claude Code): docspace should be connected. /plugin shows the plugin and its publish-to-docspace skill.

3. Try it

Make a one-page HTML report of this space.

Claude reads the space (get_context, search, get_page), builds one self-contained HTML document, calls publish_artifact and answers with the link:

Published "Space report" to DocSpace (version 1): https://app.docspace.dev/artifacts/123

Then ask for a change:

Add a section on open risks.

Claude calls update_artifact on the same page. The link stays the same and the version goes to 2.

Without the plugin

You can also add only the MCP server, without the skill:

claude mcp add --transport http docspace 'https://mcp.docspace.dev/mcp' \
  --header 'Authorization: Bearer dsk_live_REPLACE_ME'

DocSpace's server instructions still ask Claude to publish HTML deliverables, but the plugin's skill makes it consistent and keeps your key out of the command history.

Claude Desktop

Claude Desktop launches local (stdio) servers from its configuration file, so use the mcp-remote bridge to reach the HTTP endpoint (it needs Node.js 18 or later). Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "docspace": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote", "https://mcp.docspace.dev/mcp",
        "--header", "Authorization: Bearer ${DOCSPACE_AGENT_KEY}"
      ],
      "env": { "DOCSPACE_AGENT_KEY": "dsk_live_REPLACE_ME" }
    }
  }
}

Restart Claude Desktop. The DocSpace tools appear in the tools menu of a new conversation. Claude Desktop has no plugin skill, so ask for publishing explicitly the first time ("publish it to DocSpace"); the server instructions cover later requests.

claude.ai custom connector

After OAuth (AX3). claude.ai connects to remote MCP servers with OAuth, not with a pasted key. Once DocSpace's OAuth authorization server is live, you will add DocSpace under Settings → Connectors → Add custom connector with the URL https://mcp.docspace.dev/mcp, sign in and choose the space and scopes on a consent screen. This section will be completed then.

What gets published

What One self-contained HTML document per artifact: inline CSS and scripts, no external files. Claude publishes by default when you ask for, or it produces, a report, dashboard, prototype, one-pager or deck. Ask for a local file if you do not want it published.
Where it lands A new artifact page in the key's space, at the top level or under a parent page you name. Its link is https://app.docspace.dev/artifacts/<id>; its text is searchable like any page.
Who owns it The person who created the agent key. The artifact gets the space's permissions; the generator is recorded as the client name (for example claude-code).
Versions update_artifact adds a new version of the same page; the link never changes. Earlier versions stay in the version history.
Size Up to 10 MB of HTML (artifact.too_large above that).
Secret check Every upload is scanned. HTML that contains API keys, tokens, private keys or similar is refused with artifact.secrets_detected, and Claude is told never to include them.
Audit Every call appears in Settings → Agents and keys → Activity: tool, scope, result and latency, never the content.

Troubleshooting

Symptom Fix
docspace is not connected in /mcp DOCSPACE_AGENT_KEY is not set in the shell that started Claude Code. Set it and restart.
401 / mcp.unauthorized The key is wrong or revoked. Create a new one.
mcp.scope_denied on publish_artifact The key lacks artifacts:write. Create an Editor key with Full write scopes.
artifact.secrets_detected The HTML contains a secret. Remove it (use a placeholder) and ask again.
A change created a second page The revision was asked in a new conversation. Give Claude the artifact link so it can call update_artifact with that id.

Every code is listed in Errors; every tool in the tool reference.