Skip to content
MCP Reference

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/mcp

Single 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 shapePathOrganization
dk_org_...Organization API key, same as the REST APIResolved 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 providerNot 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-resource

which 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

ToolMirrorsRequired scope
create-projectCreateProjectcreate project
add-project-activitiesAddActivitiesupdate project
submit-projectSubmitupdate project
get-project-progressGetProgressview 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

FieldTypeDescription
orgstringOrganization identifier: required for OAuth, optional (and must match) for an API key.
namestringName of the project to create.

Output

FieldTypeDescription
project_idstringProject identifier, to reuse for other tools.

add-project-activities

Stages activity lines (designation, supplier, price, …) on an unsealed project.

Input

FieldTypeDescription
orgstringOrganization identifier (see above).
project_idstringProject identifier.
activitiesarrayActivity lines to stage, each with designation (required), plus optional supplier, unit_price, currency, quantity, unit, purchase_date, weight, notes, category.

Output

FieldTypeDescription
stagedint64Number of lines staged by this call.

submit-project

Seals the project (no more lines can be added) and starts enrichment.

Input

FieldTypeDescription
orgstringOrganization identifier (see above).
project_idstringProject identifier.
webhook_urlstringOptional. Called upon enrichment completion.

Output

FieldTypeDescription
statusstringProject status after sealing.

get-project-progress

Returns the project’s enrichment progress (counters by status).

Input

FieldTypeDescription
orgstringOrganization identifier (see above).
project_idstringProject identifier.

Output

FieldTypeDescription
statusstringOne of pending, enriching, completed.
total_linesint64Total number of lines in the batch.
enrichedint64Lines successfully enriched.
in_progressint64Lines currently being enriched.
failedint64Lines that failed enrichment.
submitted_atstringRFC3339 timestamp; omitted when not set.
completed_atstringRFC3339 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

FieldTypeDescription
orgstringOrganization identifier (see above).
project_idstringProject identifier.
limitintOptional. Max lines to return (default 50, max 500).
offsetintOptional. Number of lines to skip.

Output

FieldTypeDescription
linesarrayOne 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_countint64Total 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.

PromptArgumentsDescription
new-projectname (required)Create a new enrichment project and stage activities conversationally.
check-project-progressproject_id (required)Report the enrichment progress of an existing project.
export-projectproject_id (required)Fetch the enriched results of a completed project (paginated via get-project-result).
submit-project-for-enrichmentproject_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.json entry (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 codeTool error message
Unauthenticatedmissing or invalid authentication: an organization API key is required
PermissionDeniedaccess denied: project not found for this organization, or insufficient scope for this action
FailedPreconditionoperation not possible in the project’s current state (for example: already sealed, or no line pending)
InvalidArgumentinvalid parameters: (detail)
anything elsean internal error occurred