MCP server¶
DagForge exposes a Model Context Protocol (MCP) server so AI agents can work with your workspace. There are two MCP surfaces, and they do different jobs:
| Surface | URL | What it does |
|---|---|---|
| Management MCP | /mcp on the DagForge API |
An external agent lists and operates Dags, runs, tasks, logs, connections, variables, pools, assets, API collections and Forge files. |
| API Platform MCP | /mcp/{workspace}/{collection} |
Your published collection is exposed as MCP tools, so an AI client can call your workflow endpoints. |
Connect an agent¶
- Discovery: the server supports
tools/listandprompts/list. - Auth:
Authorization: Bearer <token>— the same token as the API docs (POST /api/v2/auth/token). The token is workspace-scoped. - Docs: the live tool and prompt reference is at
/docs/mcp/.
Example client config¶
{
"mcpServers": {
"dagforge": {
"url": "https://workflows-preview.dagforge.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
The exact shape depends on your MCP client. Any client that supports a remote HTTP MCP server with headers can connect.
What an agent can do¶
The management MCP is a curated surface, not every API route. It includes:
- Dags — list, details, tags, versions, reparse and patch.
- Dag runs — trigger, list, get, clear and wait until finished.
- Tasks and task instances — list, get, logs, XComs, HITL, clear and patch.
- Assets — list, events and materialize.
- Backfills — create, list, pause, resume and cancel.
- Connections, pools and variables — read and manage.
- API Platform — collections, endpoints, clients and policies.
- Forge — tree, files, git history and package apply.
- Jobs, event logs, providers, health and version.
Destructive deletes and configuration are deliberately excluded from the tool surface.
Safety¶
- The MCP server enforces the same authentication and workspace roles as the REST API. A token only sees its workspace.
- Mutations are attributable to the token and recorded in the audit log.
- The in-product AI Chat uses the same MCP surface, with an approval gate before any change. External agents act with the permissions of the token you give them, so issue a least-privilege token and rotate it.
- The API Platform gateway applies its own rate limits and quotas to MCP traffic.
Related¶
- API Platform — collections and the collection MCP URL.
- Access and roles — workspace roles and tokens.
- MCP Docs — live tools and prompts.