Skip to Content

The MCP server

Endpoint, seven tools, limits, and refusal codes for the DFO's public MCP server.

The DFO serves one MCP server, named dfo, over streamable HTTP.

Server addresshttps://developmentfinance.org/mcp

Any client can call the endpoint without an API key or sign-in. Connect an assistant has the set-up steps for every client.

Tools

ToolTitleWhat it does
searchSearch DFO dataMatches a query to DFO data and returns a spec_id that get_data fetches. Takes up to 6 parts, one per indicator.
get_dataGet dataFetches the data for a spec_id as a frame, with its source. Its scope argument changes the places, years, or unit before the fetch.
run_stepsRun analysis stepsRuns a plan of up to 12 analysis steps in one call.
chartChart a frameDraws a frame as a trend chart, a ranked bar chart, a headline card, or a table.
describeDescribe a referenceDescribes any id (up to 8 at once). sources lists the DFO's sources, skill:<id> describes a skill, and op:<name> gives an operation's arguments.
export_dataExport data as a fileWrites a frame as CSV, Excel, or Parquet, optionally zipped with README.md, datapackage.json, and CITATION.cff, and returns a public link.
get_skillLoad a skillLoads a skill's SKILL.md and lists its other files, or reads one file when given path.

search, get_data, describe, and get_skill are read-only. The server sends instructions when a client connects. They describe how the tools fit together. Call get_skill("dfo") for the dfo skill and worked plans.

export_data returns the file's link in url. Its cite field gives the name of the field that contains the link to cite:

  • For data from get_data, export_data also pins the version and returns the URL of that version's page on /data in snapshot_url. The DFO keeps a pinned version indefinitely. cite is "snapshot_url".
  • If the pin fails, for example because the caller has reached the daily limit, the response has no snapshot_url, snapshot_note gives the reason, and cite is "url".
  • A computed result from run_steps has no page on /data, so cite is "url".

Frames

get_data returns a frame reference as a pair of spec_id and content_version. The spec_id identifies a spec and stays the same when the data is refreshed. The content_version identifies one set of rows and changes when the rows change, for example when the publisher revises the data. Pass the pair to run_steps, chart, describe, and export_data. To cite the exact data an answer used, export the frame and cite the link in the field whose name is in cite.

Every get_data result and every frame from run_steps ends with a Next: line that lists likely follow-ups as run_steps steps.

Analysis operations

A run_steps step has the shape {id, op, args}, and a step's frame can reference an earlier step's id. The server checks every step before running any. A plan can call these operations:

  • filter, aggregate, rank, share_of, growth, compare, and join
  • the shortcuts top_n, share_of_total, change_over, and total_by
  • chart, which takes the same arguments as the chart tool

Call describe with ref set to op:<name> for an operation's full input schema. share_of with operation set to quotient divides one indicator by another in any two units, such as debt service per person.

Charts

chart returns a component with an id and a write token that let a later call revise it. Clients that declare the MCP Apps extension draw the component as an interactive view. Clients that declare capabilities without MCP Apps get the component's data as a Markdown table in the reply.

Skills

A search result can list matching skills, which get_skill loads by id. The server also exposes skills as resources (skill://<id>/SKILL.md, skill://<id>/_manifest, and skill://<id>/<path>) and through the Skills over MCP extension. A skill file longer than 32,000 characters comes in pages, and a page ends with the call to read the next one.

Limits

LimitValue
A tool call or resource read45 seconds, then the server cancels the request
Requests to /mcp300 per minute from one IP address, counted by the site
Concurrent callsSet per deployment, per server instance. The server refuses excess calls immediately.
Calls per secondSet per deployment, in one token bucket across all callers. The server refuses excess calls immediately.
Rows in a frame250,000
Steps in one run_steps12
Parts in one search6
Ids in one describe8

Claude, ChatGPT, and Gemini call from their providers' IP addresses, so multiple users share the 300-request-per-minute limit for one IP address. Requests over that limit get HTTP 429 with a Retry-After header.

A large get_data fetch can take longer than one 45-second call. A few seconds before the limit, the server refuses the call with operation_still_processing while the fetch continues upstream. Repeating the same call returns the data once the fetch finishes.

Refusals

A refusal is a tool result with isError set. Its text gives the cause and the next step, and _meta has {"code": ...} under the key org.one.dfo/refusal. Its structuredContent contains the refusal as JSON.

JSON
{
  "code": "operation_still_processing",
  "retry_mode": "retry_after_delay",
  "message": "This dataset is still being prepared upstream …",
  "fix": { "operation_id": "…", "last_status": "running", "elapsed_s": 30.2 },
  "retry_after_s": 5.0
}

fix gives what the next call needs: the corrected values for a correct_and_retry refusal, or, as here, the state of the work to wait for. retry_after_s appears when waiting will help. retry_mode sets the client's next step.

retry_modeWhat to do
correct_and_retryChange an argument, using fix, and call again.
refresh_then_retryFetch fresh state, such as a new get_data call, then retry.
retry_after_delayRepeat the same call after retry_after_s.
do_not_retryStop. This call cannot succeed on this server.

Clients get these refusal codes most often.

CodeCauseFix
entity_ambiguousA name matches more than one place or party, such as "Congo"Call again with one of the candidates the refusal lists
entity_not_foundA name matches nothing in the DFOCorrect the name
definition_not_heldThe server has no stored spec for the spec_idRun search again
over_ceilingA get_data fetch is larger than the frame limitNarrow the places or years
frame_too_largeA run_steps result is larger than the frame limitNarrow the input frames
operation_still_processingA large fetch continues upstream past the call limitRepeat the same call after retry_after_s
comparison_periods_disjointA compare step's two sides have no period in commonPick frames or windows that overlap
cross_frame_unit_mismatchTwo frames in one step are in different unitsFetch both in one unit, or use share_of with quotient
growth_gap_yearNo indicator has numbers in both the first and last year of a growth window for any place or provider and recipient pairUse the window the refusal gives
rate_limitedThe server is at its concurrent-call or calls-per-second limitRepeat after retry_after_s
service_unavailableAn upstream service failed or timed outRepeat after retry_after_s
capability_unavailableThis deployment has turned the feature offNone
tool_not_foundThe tool name is not one of the sevenUse one of the tools listed in fix
internal_errorA tool failed with no more specific refusalSend the time of the call and the tool's name to [email protected]

A search part with the status no_data or unsupported is a result, not a refusal. A no_data part means the DFO has no data for that part and may list related indicators. An unsupported part means the question is outside the DFO's scope and gives the reason.

Troubleshooting

ProblemCauseFix
A redirect on connect, or "server unreachable" with a 308 in logsThe URL ends in /mcp/Use /mcp, omitting the trailing slash
HTTP 429 from the siteOne IP address sent more than 300 requests in a minuteWait the number of seconds given in the Retry-After header