Skip to content

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

bash
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

ClientPage
Claude CodeClaude Code
CodexCodex
CursorCursor
VS Code and GitHub CopilotVS Code
Gemini CLIGemini CLI
OpenCodeOpenCode
ZedZed
ClineCline
WindsurfWindsurf
Claude Desktop and claude.aiClaude Apps
Anything elseOther 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.

ClientConfigurationEndpoint fieldHeader authSecret from environment
Claude Codeclaude mcp add, .mcp.json, ~/.claude.json"type": "http" with urlYes${VAR}, ${VAR:-default}
Codexcodex mcp add, ~/.codex/config.tomlurlBearer only, from an environment variablebearer_token_env_var
Cursor.cursor/mcp.json, ~/.cursor/mcp.jsonurlYes${env:VAR}
VS Code.vscode/mcp.json, user mcp.json"type": "http" with urlYes${input:id} prompt
Gemini CLIgemini mcp add, settings.jsonhttpUrlYes$VAR, ${VAR}
OpenCodeopencode.json"type": "remote" with urlYes{env:VAR}
Zedsettings.jsonurlYesNot documented, value is literal
ClineCline MCP settings JSON"type": "streamableHttp" with urlYesNot documented, value is literal
Windsurf~/.codeium/windsurf/mcp_config.jsonserverUrlYes${env:VAR}
Claude Desktop and claude.aiConnectors UIRemote MCP server URLNo, OAuth or unauthenticated onlyNot 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_read
  • dagu_change
  • dagu_execute

A good first read is the built-in authoring reference:

text
dagu://reference/authoring

Troubleshooting

SymptomCause
401 UnauthorizedMissing or wrong API key, key not accepted on the mcp surface, or a role without the needed permission. See Authentication.
404 Not FoundServer base path missing from the URL. A server mounted at /dagu exposes MCP at /dagu/mcp.
Client reports a missing command or a stdio serverThe entry has a URL but no transport type. Add the client's HTTP type field.
Client connects but no tools appearThe key's role is too narrow, or the client cached an earlier failed session. Reconnect the server.
Client only supports SSE or stdioUse the mcp-remote bridge.
Tools appear but every call fails against a remote serverThe client cannot reach the Dagu URL. Confirm the host, port, and TLS from the machine running the client.

Dagu is open source under the GNU General Public License v3.0.