Configuration
The Ductape MCP server uses stdio transport. Configure your MCP client to spawn the server as a child process and supply your Publishable Key via the env block so you never have to pass it on individual tool calls.
The examples below use npx (no global install needed). If you have installed globally (npm install -g @ductape/mcp), replace "command": "npx", "args": ["-y", "@ductape/mcp"] with "command": "ductape-mcp".
Cursor
Add the server in MCP settings. Config file locations:
- User-wide:
~/.cursor/mcp.json - Project-scoped:
.cursor/mcp.jsonin your project root
{
"mcpServers": {
"ductape": {
"command": "npx",
"args": ["-y", "@ductape/mcp"],
"env": {
"DUCTAPE_PUBLISHABLE_KEY": "your-publishable-key-here",
"DUCTAPE_WORKSPACE": "your-workspace-id-here"
}
}
}
}
After editing config, restart Cursor or reload MCP servers from the MCP settings panel.
Claude Desktop
Claude Desktop uses the same JSON format. On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ductape": {
"command": "npx",
"args": ["-y", "@ductape/mcp"],
"env": {
"DUCTAPE_PUBLISHABLE_KEY": "your-publishable-key-here",
"DUCTAPE_WORKSPACE": "your-workspace-id-here"
}
}
}
}
Restart Claude Desktop after saving.
Claude Code
The quickest setup is to run this from your project directory:
claude mcp add ductape \
-e DUCTAPE_PUBLISHABLE_KEY="your-publishable-key" \
-e DUCTAPE_WORKSPACE="your-workspace-id" \
-e DUCTAPE_PROJECT_DIR="directory-to-project" \
--scope local \
-- npx -y @ductape/mcp
Replace all three placeholder values before running the command. Use an absolute path for DUCTAPE_PROJECT_DIR; it tells Ductape where to run project-aware CLI operations. The local scope keeps this MCP server configuration private to you and the current project.
Alternatively, add the server to your Claude Code MCP settings manually:
{
"mcpServers": {
"ductape": {
"command": "npx",
"args": ["-y", "@ductape/mcp"],
"env": {
"DUCTAPE_PUBLISHABLE_KEY": "your-publishable-key-here",
"DUCTAPE_WORKSPACE": "your-workspace-id-here",
"DUCTAPE_PROJECT_DIR": "/absolute/path/to/your/project"
}
}
}
}
Other MCP clients
Any client that supports stdio MCP servers can use the same pattern:
| Field | Value |
|---|---|
command | npx (or ductape-mcp with global install) |
args | ["-y", "@ductape/mcp"] for npx; omit for global binary |
env.DUCTAPE_PUBLISHABLE_KEY | Your workspace publishable key |
env.DUCTAPE_WORKSPACE | Your workspace ID (scopes CLI operations) |
| Transport | stdio (default for spawned processes) |
Clients that support MCP over SSE or HTTP would need a separate adapter — the Ductape MCP server ships stdio only.
Environment variables
DUCTAPE_PUBLISHABLE_KEY
Your Publishable Key is in Workbench → Tokens → Publishable key.
Set it in the env block of your MCP config. The server reads it at startup and uses it for every tool call automatically. You can still override it per-call by passing publishable_key as a tool argument.
DUCTAPE_WORKSPACE
Your Workspace ID is shown directly below the publishable key on the same page in the Workbench.
Set this so the MCP server automatically scopes ductape_cli operations to the correct workspace. Without it, the CLI uses whichever workspace was last active on the machine — which may not match your publishable key's workspace.
When set, the server:
- Checks login state once per process (no repeated
whoamicalls) - Switches to this workspace once at startup (before the first
ductape_clicall) - Injects
--workspace <id>automatically when the agent triggers aductape_cli("login ...")call
DUCTAPE_PROJECT_DIR
Set this to the absolute path of the linked Ductape project. The MCP server runs ductape_cli subprocesses from this directory so project-aware commands can find ductape/config.json and related local files.
The workspace ID and project directory only select context; they do not grant access. The publishable key authenticates the MCP server's permitted runtime calls, while privileged server-side or CLI operations still require their corresponding credentials or login session.
Project-scoped vs user-wide config
| Scope | Best for |
|---|---|
User-wide (~/.cursor/mcp.json) | Personal development across all projects |
Project-scoped (.cursor/mcp.json) | Team-shared config committed to the repo |
For project-scoped config committed to a repo, avoid hardcoding the key. Instead, reference a shell variable or leave the env block out and pass publishable_key per call during shared team sessions.