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-serverFor 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
- Open Duet in your browser
- Go to Agents in the sidebar
- Click Register Agent
- Enter a name (e.g. "claude")
- 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