AI makes mistakes! Undisk makes recovery instant: every write is versioned, every file is reversible.
See it heal →

Multi-Workspace Support

Each API key can access multiple isolated workspaces. By default, requests go to the workspace marked as default. Use list_workspaces to discover all accessible workspaces (personal + organization). When you only have one accessible workspace, list_workspaces explicitly tells the agent no switching parameter is needed and returns the current Undisk MCP server time alongside the current workspace ID. Switching workspaces:
# Option 1: Query parameter on the MCP URL
https://mcp.undisk.app/v1/mcp?workspace=<workspace-id>

# Option 2: HTTP header
X-Workspace-Id: <workspace-id>
For @undisk-mcp/setup-claude / stdio-proxy users, set --endpoint (or UNDISK_ENDPOINT) to either the base URL or a full MCP URL:
# Base URL (SDK/proxy appends /mcp)
npx @undisk-mcp/setup-claude --api-key sk_live_... --endpoint "https://mcp.undisk.app"

# Full MCP URL with workspace routing
npx @undisk-mcp/setup-claude --api-key sk_live_... --endpoint "https://mcp.undisk.app/v1/mcp?workspace=<workspace-id>"
The discover_tools_and_capabilities response includes the current workspace ID, current server time, provider capability notes, deployment metadata, and caller identity details.
  • Use separate API keys per environment when possible.
  • Include explicit workspace context in automation logs.
  • Avoid implicit fallback behavior for production write paths.

Production checklist

  • Verify workspace selection in both HTTP and WebSocket clients.
  • Confirm your agent framework propagates auth headers exactly as configured.
  • Add tests for workspace mismatch failures before broad rollout.

Error responses to assert in tests

Invalid workspace ID format

{
  "error": "invalid_workspace_id",
  "message": "Workspace ID must be a valid UUID."
}
HTTP status: 400.

Workspace-scoped key no longer valid

{
  "error": "workspace_key_invalid",
  "message": "The workspace associated with this API key is no longer accessible."
}
HTTP status: 403.

Missing workspace route input

No error is returned by default; Undisk routes to your default workspace when neither query nor header is provided.