Skip to content

Client Setup

Ryan James edited this page Aug 17, 2026 · 2 revisions

Every client launches the same stdio process. Only the JSON wrapper differs: VS Code uses servers with an explicit "type": "stdio"; Claude and Cursor use mcpServers.

Add environment variables in the env block — the server reads no .env file and accepts no CLI flags. Start with DATAVERSE_AUTH_TYPE only; add write/delete gates and a host whitelist from Safety-and-Permissions once it works.

Where the config file lives

Client File
Claude Desktop (macOS) ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows) %APPDATA%\Claude\claude_desktop_config.json
Claude Code .mcp.json in the project root (project scope), or use the claude mcp add CLI
VS Code / GitHub Copilot .vscode/mcp.json in the workspace root; for a user-level entry run MCP: Open User Configuration from the Command Palette
Cursor .cursor/mcp.json in the project root, or ~/.cursor/mcp.json for all projects

Restart the client (or restart the server from its MCP panel) after editing.

Claude Desktop, Claude Code, Cursor

{
  "mcpServers": {
    "dataverse-mcp": {
      "command": "uvx",
      "args": ["dataverse-mcp"],
      "env": {
        "DATAVERSE_AUTH_TYPE": "interactive"
      }
    }
  }
}

Claude Code can write the same entry from the CLI. The -- separator is required — --env is variadic and will otherwise swallow the command:

claude mcp add dataverse-mcp -s project --env DATAVERSE_AUTH_TYPE=interactive -- uvx dataverse-mcp

-s project writes to .mcp.json in the project root. Without it the default local scope writes to ~/.claude.json instead.

VS Code / GitHub Copilot

{
  "servers": {
    "dataverse-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["dataverse-mcp"],
      "env": {
        "DATAVERSE_AUTH_TYPE": "interactive"
      }
    }
  }
}

Local checkout

Point at the checkout's virtualenv interpreter and set PYTHONPATH to its src directory. Windows shown; on macOS/Linux use /path/to/dataverse-mcp/.venv/bin/python and forward slashes.

{
  "mcpServers": {
    "dataverse-mcp-local": {
      "command": "C:\\path\\to\\dataverse-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "dataverse_mcp.server"],
      "env": {
        "PYTHONPATH": "C:\\path\\to\\dataverse-mcp\\src",
        "DATAVERSE_AUTH_TYPE": "interactive"
      }
    }
  }
}

The VS Code form is the same with "type": "stdio" added and mcpServers renamed to servers.

Two environments side by side

One server instance can already target any environment — dataverse_url is a per-call argument. Register two entries only when you need to be signed in as different accounts or tenants, and give each its own DATAVERSE_TOKEN_CACHE_PROFILE so their token caches do not overwrite each other (Authentication).

{
  "mcpServers": {
    "dataverse-prod": {
      "command": "uvx",
      "args": ["dataverse-mcp"],
      "env": {
        "DATAVERSE_AUTH_TYPE": "interactive",
        "DATAVERSE_TOKEN_CACHE_PROFILE": "prod",
        "DATAVERSE_WHITELIST": "yourorg.crm.dynamics.com"
      }
    },
    "dataverse-dev": {
      "command": "uvx",
      "args": ["dataverse-mcp"],
      "env": {
        "DATAVERSE_AUTH_TYPE": "interactive",
        "DATAVERSE_TOKEN_CACHE_PROFILE": "dev",
        "DATAVERSE_ALLOW_WRITE": "true",
        "DATAVERSE_ALLOW_DELETE": "true",
        "DATAVERSE_WHITELIST": "yourorg-dev.crm.dynamics.com"
      }
    }
  }
}

Each entry signs in once and restarts silently thereafter. Registering two servers doubles the tool count the client sees — trim both with DATAVERSE_TOOLS (Tool-Categories).

Clone this wiki locally