MCP Reference
The Dango client API is also exposed as an MCP server: most of the same operations as the RPC Reference, as 5 tools for LLM agents and MCP clients (Claude Desktop, etc.). CSV import and export stay RPC-only (ImportCSV, ExportCSV); the MCP surface instead offers get-project-result to fetch enriched lines directly as JSON, without a file round-trip.
Endpoint
https://api.dangofish.com/mcpSingle Streamable HTTP endpoint, same host and port as the ConnectRPC API. A single JSON-RPC request body is capped at 8 MiB, comfortably above the largest realistic tool call (add-project-activities with many staged lines).
Authentication
Every tool call carries a bearer token, resolved through one of two paths:
| Token shape | Path | Organization |
|---|---|---|
dk_org_... | Organization API key, same as the REST API | Resolved from the key. The optional org input must match it if supplied. |
Compact JWT (x.y.z) | OAuth 2.1 access token issued by Dango’s sign-in provider | Not carried by the token: every tool’s org input is required, and is checked against the caller’s membership in that organization. |
Authorization: Bearer dk_org_...A request with a missing or unrecognizable Authorization header gets a 401 whose WWW-Authenticate header points at the OAuth discovery document:
GET https://api.dangofish.com/.well-known/oauth-protected-resourcewhich returns the resource URL and the authorization server a client should use to obtain a token (RFC 9728 protected resource metadata). This lets an MCP client like Claude Desktop start the login flow without any manual configuration beyond the server URL itself.
Tools
| Tool | Mirrors | Required scope |
|---|---|---|
create-project | CreateProject | create project |
add-project-activities | AddActivities | update project |
submit-project | Submit | update project |
get-project-progress | GetProgress | view project |
get-project-result | (no RPC equivalent) | view project |
Every tool input accepts an optional (API key path) or required (OAuth path) org field: the organization identifier the call acts on.
create-project
Creates an empty enrichment project for the current organization.
Input
| Field | Type | Description |
|---|---|---|
org | string | Organization identifier: required for OAuth, optional (and must match) for an API key. |
name | string | Name of the project to create. |
Output
| Field | Type | Description |
|---|---|---|
project_id | string | Project identifier, to reuse for other tools. |
add-project-activities
Stages activity lines (designation, supplier, price, …) on an unsealed project.
Input
| Field | Type | Description |
|---|---|---|
org | string | Organization identifier (see above). |
project_id | string | Project identifier. |
activities | array | Activity lines to stage, each with designation (required), plus optional supplier, unit_price, currency, quantity, unit, purchase_date, weight, notes, category. |
Output
| Field | Type | Description |
|---|---|---|
staged | int64 | Number of lines staged by this call. |
submit-project
Seals the project (no more lines can be added) and starts enrichment.
Input
| Field | Type | Description |
|---|---|---|
org | string | Organization identifier (see above). |
project_id | string | Project identifier. |
webhook_url | string | Optional. Called upon enrichment completion. |
Output
| Field | Type | Description |
|---|---|---|
status | string | Project status after sealing. |
get-project-progress
Returns the project’s enrichment progress (counters by status).
Input
| Field | Type | Description |
|---|---|---|
org | string | Organization identifier (see above). |
project_id | string | Project identifier. |
Output
| Field | Type | Description |
|---|---|---|
status | string | One of pending, enriching, completed. |
total_lines | int64 | Total number of lines in the batch. |
enriched | int64 | Lines successfully enriched. |
in_progress | int64 | Lines currently being enriched. |
failed | int64 | Lines that failed enrichment. |
submitted_at | string | RFC3339 timestamp; omitted when not set. |
completed_at | string | RFC3339 timestamp; omitted when not set. |
get-project-result
Returns a page of the project’s enriched lines directly as JSON, no CSV export round-trip needed.
Input
| Field | Type | Description |
|---|---|---|
org | string | Organization identifier (see above). |
project_id | string | Project identifier. |
limit | int | Optional. Max lines to return (default 50, max 500). |
offset | int | Optional. Number of lines to skip. |
Output
| Field | Type | Description |
|---|---|---|
lines | array | One entry per line: status (pending, enriching, or completed) plus fields, a map keyed by the same French column headers as the CSV export (designation, supplier, ADEME category, emission factor, emissions, components, sources, …). |
total_count | int64 | Total number of lines in the project, use with limit/offset to paginate. |
Note: bulk CSV import and export remain RPC-only. See ImportCSV and ExportCSV in the RPC Reference. There is no MCP tool equivalent for either.
Prompts
Alongside the tools, the server exposes 4 canned prompts: templates that seed the conversation with instructions for a common project lifecycle entry point. Clients that support MCP prompts (unlike tools, which the model discovers and invokes on its own) surface these as typeable slash commands, e.g. /mcp__dango__new-project.
| Prompt | Arguments | Description |
|---|---|---|
new-project | name (required) | Create a new enrichment project and stage activities conversationally. |
check-project-progress | project_id (required) | Report the enrichment progress of an existing project. |
export-project | project_id (required) | Fetch the enriched results of a completed project (paginated via get-project-result). |
submit-project-for-enrichment | project_id (required), webhook_url (optional) | Seal a staged project and start enrichment. |
Note: some MCP clients (notably claude.ai custom connectors) only surface tools, never prompts. Prompts show up as slash commands in clients like Claude Desktop or a local
.mcp.jsonentry (claude mcp add --transport http), but not in a claude.ai connector.
Tool errors
A failing tool call never returns a raw RPC/gRPC code. It comes back as a normal MCP result with isError: true and an English text message:
| Underlying code | Tool error message |
|---|---|
Unauthenticated | missing or invalid authentication: an organization API key is required |
PermissionDenied | access denied: project not found for this organization, or insufficient scope for this action |
FailedPrecondition | operation not possible in the project’s current state (for example: already sealed, or no line pending) |
InvalidArgument | invalid parameters: (detail) |
| anything else | an internal error occurred |