MCP Clients
Dagu's MCP server is built into the Dagu HTTP server, so client setup means adding Dagu's Streamable HTTP endpoint to the tool. There is nothing to install per client.
Before You Start
export DAGU_MCP_URL=http://localhost:8080/mcp
export DAGU_MCP_API_KEY=dagu_...Use the HTTPS URL for a remote or shared Dagu server. See Quickstart for the URL table and Authentication for key roles and surfaces.
Pick Your Client
| Client | Page |
|---|---|
| Claude Code | Claude Code |
| Codex | Codex |
| Cursor | Cursor |
| VS Code and GitHub Copilot | VS Code |
| Gemini CLI | Gemini CLI |
| OpenCode | OpenCode |
| Zed | Zed |
| Cline | Cline |
| Windsurf | Windsurf |
| Claude Desktop and claude.ai | Claude Apps |
| Anything else | Other Clients |
For a repository-wide setup that teammates share, see Team Setup.
Configuration Shapes
Clients agree on the concepts and disagree on the field names. This table is the fastest way to translate an example from one client to another.
| Client | Configuration | Endpoint field | Header auth | Secret from environment |
|---|---|---|---|---|
| Claude Code | claude mcp add, .mcp.json, ~/.claude.json | "type": "http" with url | Yes | ${VAR}, ${VAR:-default} |
| Codex | codex mcp add, ~/.codex/config.toml | url | Bearer only, from an environment variable | bearer_token_env_var |
| Cursor | .cursor/mcp.json, ~/.cursor/mcp.json | url | Yes | ${env:VAR} |
| VS Code | .vscode/mcp.json, user mcp.json | "type": "http" with url | Yes | ${input:id} prompt |
| Gemini CLI | gemini mcp add, settings.json | httpUrl | Yes | $VAR, ${VAR} |
| OpenCode | opencode.json | "type": "remote" with url | Yes | {env:VAR} |
| Zed | settings.json | url | Yes | Not documented, value is literal |
| Cline | Cline MCP settings JSON | "type": "streamableHttp" with url | Yes | Not documented, value is literal |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | serverUrl | Yes | ${env:VAR} |
| Claude Desktop and claude.ai | Connectors UI | Remote MCP server URL | No, OAuth or unauthenticated only | Not applicable |
Two field names cause most failures: Gemini CLI uses httpUrl for Streamable HTTP and reserves url for SSE, and Windsurf uses serverUrl instead of url.
Transport
Dagu serves Streamable HTTP at /mcp and does not expose an SSE endpoint. Clients that only speak stdio or SSE need the mcp-remote bridge described in Other Clients.
Verify Any Client
After the client connects, three tools should be listed:
dagu_readdagu_changedagu_execute
A good first read is the built-in authoring reference:
dagu://reference/authoringTroubleshooting
| Symptom | Cause |
|---|---|
401 Unauthorized | Missing or wrong API key, key not accepted on the mcp surface, or a role without the needed permission. See Authentication. |
404 Not Found | Server base path missing from the URL. A server mounted at /dagu exposes MCP at /dagu/mcp. |
| Client reports a missing command or a stdio server | The entry has a URL but no transport type. Add the client's HTTP type field. |
| Client connects but no tools appear | The key's role is too narrow, or the client cached an earlier failed session. Reconnect the server. |
| Client only supports SSE or stdio | Use the mcp-remote bridge. |
| Tools appear but every call fails against a remote server | The client cannot reach the Dagu URL. Confirm the host, port, and TLS from the machine running the client. |

