diff --git a/content/hub/get-started/connect-your-assistant.md b/content/hub/get-started/connect-your-assistant.md deleted file mode 100644 index df597f3..0000000 --- a/content/hub/get-started/connect-your-assistant.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -description: Add the DFO MCP server to Claude, Cursor or ChatGPT and ask your assistant a question it answers from DFO data. ---- - -# Connect your assistant - -Connect your assistant to the DFO through the Model Context Protocol (MCP), which lets AI assistants call DFO tools. Then ask about health spending in Kenya. The assistant looks the question up in the DFO, fetches the data, and answers with its source. - - - -## What you'll build - -An assistant that answers from DFO data and names its source: - -> Health expenditure per person in Kenya rose between 2000 and 2023, according to World Development Indicators. - - - -## What you'll learn - -- How to add the DFO MCP server to Claude, Cursor or ChatGPT. -- How to check that your assistant can see the DFO tools. -- How to ask a question your assistant answers from DFO data. -- How to find the source behind the answer. - -## What you'll need - -- Claude (claude.ai, Claude Desktop or Claude Code), Cursor, or ChatGPT on a plan with Developer Mode. -- The DFO MCP server address, `https:///mcp`. -- A DFO access token. - -The walk-through takes about ten minutes. - -## Step 1: add the DFO server - -Add the DFO MCP server once. Your assistant then has access to all DFO tools. Follow the steps for your assistant, then go on to Step 2. - -:::tabs - -::tab{label="Claude (web and Desktop)"} - -1. Open Customize, then Connectors. -1. Click "Add custom connector". -1. Name it `DFO` and paste `https:///mcp` as the MCP server URL. -1. Choose how to sign in. -1. Click Add. - -A free Claude plan allows one custom connector. - -::tab{label="Claude Code"} - -Set `DFO_MCP_TOKEN` to your access token, then run this command in a terminal. - -```bash -claude mcp add --transport http dfo https:///mcp \ - --header "Authorization: Bearer $DFO_MCP_TOKEN" -``` - -Check that Claude Code can reach it with the command below. - -```bash -claude mcp list -``` - -`dfo` should appear in the list as connected. - -::tab{label="Cursor"} - -Add the server to `~/.cursor/mcp.json`, or use `.cursor/mcp.json` in a project to limit it to that project. - -```json title="mcp.json" -{ - "mcpServers": { - "dfo": { - "url": "https:///mcp", - "headers": { - "Authorization": "Bearer ${env:DFO_MCP_TOKEN}" - } - } - } -} -``` - -Cursor reads `${env:DFO_MCP_TOKEN}` from your environment. The config file holds the variable reference, while Cursor supplies the token. - -::tab{label="ChatGPT"} - - - -1. Open Settings, then Connectors, then Advanced settings, and turn on Developer Mode. Developer Mode is available on Pro, Team, Enterprise and Edu plans. -1. Click "Add custom connector". -1. Name it `DFO`, add a short description, and paste `https:///mcp` as the URL. -1. Choose the sign-in method. - -::: - -## Step 2: check the tools - -Open a new chat and check that the tool list includes `search`, `get_data`, and `describe`, plus the other DFO tools. - - - -`search` turns a question into a DFO dataset, `get_data` fetches its rows, and `describe` explains what a graph identifier such as `country/KEN` means. - -## Step 3: ask a question - -Ask your assistant: - -> What was health spending per person in Kenya from 2000 to 2023? Use the DFO tools. - -By naming the DFO tools, you direct the assistant to look up the answer. You should see it call `search` first, then `get_data`, and answer with the first and last values and the source, World Development Indicators. - -## Step 4: find the source - -Ask a follow-up: - -> Which dataset did those numbers come from, and how should I cite it? - -The `get_data` result includes a citation for your assistant to quote. It also includes a dataset reference with a `spec_id`, such as `spec_0002907ee44bf25fc98f343372614a84`, and a `content_version`. Together, the two ids identify the exact rows your assistant read, which a colleague can fetch in code. - -## Next - -- [Versions and snapshots](../data/versions.md) explains how `spec_id` and `content_version` identify a dataset and its version. -- [What a skill is](../skills/what-a-skill-is.md) explains the domain notes an agent can load alongside DFO data. diff --git a/content/hub/index.md b/content/hub/index.md index cb2c69e..7fc42e1 100644 --- a/content/hub/index.md +++ b/content/hub/index.md @@ -8,25 +8,55 @@ The Development Finance Observatory (DFO) brings development finance data from t See the full list of datasets on the [sources page](/data/sources), and check out the [roadmap](/data/roadmap) to see what's in the pipeline. +## Connect your AI assistant + +Connect Claude, ChatGPT, Gemini, or Le Chat to the DFO, and your assistant answers development finance questions from DFO data and names the source of each figure. Each assistant needs this server address and no account or token. + +```text +https://developmentfinance.org/mcp +``` + +:::tabs + +::tab{label="Claude"} + +[Add the DFO to Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=DFO&connectorUrl=https%3A%2F%2Fdevelopmentfinance.org%2Fmcp). The link opens Claude with the connector's name and address filled in, and you confirm. + +::tab{label="ChatGPT"} + +Open [Plugins](https://chatgpt.com/plugins) in ChatGPT, select **+**, then **Add custom MCP server**. Name it DFO, paste the address under **Connection**, choose **No authentication**, and select **Create as a plugin**. + +::tab{label="Gemini"} + +Open [Connected Apps](https://gemini.google.com/apps) in Gemini on the web, select **Add a custom app**, paste the address, and select **Next**. Custom apps need a personal Google account held by someone in the US aged 18 or over. On Gemini Enterprise, a team administrator can add the server for the team. + +::tab{label="Le Chat (Mistral)"} + +In [Le Chat](https://chat.mistral.ai), open **Intelligence**, then **Connectors**, and select **Add Connector**. On the **Custom MCP Connector** tab, enter DFO as the name, paste the address as the **Server URL**, and select **Connect**. + +::: + +[Connect your assistant](../dfo-ai/connect.md) covers team plans, coding tools such as Claude Code, and a question that checks the connection. + ## Where to start Choose the starting point that matches what you want to do. | If you want to… | Use | Start here | | ------------------------------------------------------------------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| Ask an AI assistant (like Claude or ChatGPT) about the data | The DFO MCP server, a connector that lets AI assistants use DFO tools | [Connect your assistant](../dfo-ai/connect.md) | | Make a chart, e.g. French health aid for a briefing | DFO Studio ([/studio](/studio)) | [Use DFO Studio](get-started/use-studio.md) | | Download data as a CSV, e.g. aid disbursements to Nigeria | Data search ([/data](/data)) | [Get data](get-started/get-data.md) | -| Let an AI assistant (like Claude or ChatGPT) query the data | The DFO MCP server, a connector that lets AI assistants use DFO tools | MCP server guide | -| Pull data into a script or app | The DFO API | API quickstart | +| Pull data into a script or app | The DFO API | [API quickstart](../dfo-apis/quickstart.md) | | Load OECD, IMF, or TOSSD data into Python (pandas) | DFO Python packages | Python packages: [ODA reader](../oda_reader/index.md), [IMF reader](../imf-reader/index.md), and [TOSSD reader](../tossd-reader/index.md) | | Convert amounts between currencies or to constant prices in Python | DFO Python packages | [pydeflate](/docs/tools/pydeflate) | | Manage and load data to a Data Commons Platform instance | DFO Python packages | [DCP tools](../dcp-tools/index.md) | **Do I need an account?** -The DFO, its tools, and its infrastructure are free to use. For Studio you'll need an account after making five search queries. Sign in to save your work in Studio. +The DFO, its tools, and its infrastructure are free to use. The MCP server and the API need no account. For Studio you'll need an account after making five search queries. Sign in to save your work in Studio. ## Next +- [Connect your assistant](../dfo-ai/connect.md): Add the DFO to Claude, ChatGPT, Gemini, Le Chat, or a coding tool in a few minutes. - [Get data](get-started/get-data.md): A step-by-step guide to finding a dataset and downloading it as a CSV. -- How the data fits together: Explore [the knowledge graph](data/knowledge-graph.md) to see how the DFO matches data from different publishers so one search can cover them all. diff --git a/hub.yaml b/hub.yaml index a97852c..aca47fc 100644 --- a/hub.yaml +++ b/hub.yaml @@ -10,13 +10,14 @@ nav: - title: Home page: index.md + - mount: dfo-ai + - title: Get started children: - title: Get data page: get-started/get-data.md - title: Use DFO Studio page: get-started/use-studio.md - # Connect your assistant (get-started/connect-your-assistant.md) joins once the MCP endpoint is public. - title: Build with the DFO children: @@ -27,7 +28,6 @@ nav: - title: Use DFO data in your code page: build/use-data-in-code.md - mount: dfo-apis - - mount: dfo-ai - title: Data children: diff --git a/sources.yaml b/sources.yaml index 5a52ee5..d390fb8 100644 --- a/sources.yaml +++ b/sources.yaml @@ -83,7 +83,7 @@ sources: ref: dev docs_dir: docs/guide path: mcp - title: MCP server + title: AI assistants (MCP) - name: dfo-skills repo: DevelopmentFinanceObservatory/skills