MCP Server Setup

Connect AI agents to Duet via the Model Context Protocol.

Installation

npm install -g @noteduet/mcp-server

# Or use npx without installing:
npx @noteduet/mcp-server

For Self-hosted (direct database)

{
  "mcpServers": {
    "duet": {
      "command": "npx",
      "args": ["@noteduet/mcp-server"],
      "env": {
        "DUET_DATABASE_URL": "postgresql://user:pass@localhost:5432/duet_dev",
        "DUET_AGENT_NAME": "claude",
        "DUET_API_KEY": "duet_xxxxx"
      }
    }
  }
}

For Duet Cloud (remote API)

{
  "mcpServers": {
    "duet": {
      "command": "npx",
      "args": ["@noteduet/mcp-server"],
      "env": {
        "DUET_API_URL": "https://noteduet.com",
        "DUET_AGENT_NAME": "claude",
        "DUET_API_KEY": "duet_xxxxx"
      }
    }
  }
}

Getting an API Key

  1. Open Duet in your browser
  2. Go to Agents in the sidebar
  3. Click Register Agent
  4. Enter a name (e.g. "claude")
  5. Copy the API key - it's only shown once

Supported Clients

  • Claude Code - add to ~/.claude/mcp.json
  • Cursor - add to .cursor/mcp.json
  • VS Code - add to .vscode/mcp.json
  • Any MCP-compatible client