Logo Data360 MCP

Data360 MCP

Tổ chức
worldbank

Model Context Protocol (MCP) server that gives LLM agents and chatbots direct access to the World Bank's Data360 Platform. Search, validate, and retrieve development indicators—from GDP and poverty to gender equality and climate—with structured metadata and time-series data, without hallucinating values.

Nhà phát hànhworldbank
Kho mãdata360-mcp
Ngôn ngữPython
Bản fork
8
Sao
42
Công cụ có sẵn
0
Phương thức truyền tảistdio
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Data360 MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    42 sao và 8 bản fork từ kho mã được liên kết.

Data360 MCP Server

A Model Context Protocol (MCP) server that gives LLM agents direct access to the World Bank's Data360 Platform. Agents can search, validate, and retrieve development indicators—covering topics from GDP and poverty to gender equality and climate—without hallucinating data values.

Audience: Developers building AI agents and chatbots that need reliable, structured access to World Bank development data.


Key Features

  • Smart indicator discovery — search across hundreds of indicators with enriched metadata and country coverage checks
  • Rich metadata retrieval — fetch methodology, definitions, limitations, and statistical concepts on demand
  • Reliable time-series data — query historical data points with filters for country, time period, sex, age, and urbanization
  • LLM-optimized resources — built-in system prompts, codelists, and chain-of-thought guidance for chatbot integration
  • Agent-friendly design — significant "glue" logic makes the raw Data360 API composable and safe for LLM tool use

Installation & Version Pinning

Releases follow Semantic Versioning; every release publishes a vX.Y.Z git tag plus a corresponding GitHub Release. Minor releases keep backward-compatible API contracts, so pin a major/minor to lock behavior.

Install the Python server from PyPI and pin a known-good release:

bash
pip install data360-mcp==0.1.3

Roll back to an earlier verified release by installing any prior version listed on the Releases page:

bash
pip install data360-mcp==<previous-version>

The @data360/* npm UI packages are published on every release under the same version number; pin them the same way:

bash
npm install @data360/mcp-ui@X.Y.Z

See DEVELOPMENT.md for how releases are cut.


Prerequisites

  • Python 3.11+
  • uv (recommended) — or pip

Installation

With uv (recommended):

bash
git clone https://github.com/worldbank/data360-mcp.git
cd data360-mcp
uv sync
# LangChain / LangGraph client + examples + repo-root shim (data360_mcp_service.py):
uv sync --extra agent --group dev

With pip:

bash
git clone https://github.com/worldbank/data360-mcp.git
cd data360-mcp
pip install -e .

Configuration

Copy the example environment file and adjust as needed:

bash
cp .env.example .env
VariableDescriptionDefault
DATA360_API_BASE_URLBase URL for the World Bank Data360 APIhttps://data360api.worldbank.org
MCP_PORTPort for the MCP server8000
MCP_TRANSPORTTransport protocol (http or sse)http
MCP_CHARTS_API_URLOptional URL for an external chart rendering API(none)
DATA360_READ_TIMEOUTSeconds to wait for a Data360 API response (connect/write/pool have their own knobs)8
DATA360_RETRY_MAX_ATTEMPTSAttempts for retry-safe requests (idempotent methods and read-only Data360 POSTs)3
DATA360_RETRY_BUDGET_SECONDSWall-clock ceiling for retrying one request; set <= DATA360_READ_TIMEOUT to never retry a timeout16
DATA360_DEGRADATION_COOLDOWN_SECONDSHow long a stale metadata snapshot is reused before the API is retried30
DATA360_BACKGROUND_READ_TIMEOUTRead timeout for background/bulk calls (dimension catalog, dataset catalogue, group hierarchy) on their own client + pool30
DATA360_BACKGROUND_INLINE_WAIT_SECONDSHow long a user request may wait for the dimension catalog before serving raw codes (0 never waits)2

Run the Server

bash
uv run poe serve
# Server starts at http://localhost:8000/mcp

Or with custom port/transport:

bash
uv run poe serve --port 8021 --transport sse
# SSE endpoint: http://localhost:8021/sse

Connect Your Agent

SettingValue
Transporthttp (default) or sse
URL (http)http://localhost:8000/mcp
URL (sse)http://localhost:8021/sse
Docker / externalReplace localhost with host.docker.internal

Try the Demo

bash
uv run scripts/llm_mcp_demo.py
# DEBUG mode:
DEBUG=true uv run scripts/llm_mcp_demo.py

Minimal external agent (one-shot): examples/agents/langchain-minimal/README.md — copy-paste run_once.py that loads data360://system-prompt and tools, then calls the model.

Multi-agent / LangGraph: examples/agents/langchain-graph/README.md — register Data360 as a node (create_data360_langgraph_node or gated create_data360_gated_langgraph_node) alongside supervisors and other specialists. Client library (publishable on PyPI): packages/data360-mcp-agent/ (pip install data360-mcp-agent). The repo-root data360_mcp_service.py shim re-exports data360_mcp_agent for older import paths.


MCP Tools

ToolDescription
data360_search_indicatorsSearch indicators with enriched metadata. Pass required_country for server-side coverage check. Returns covers_country, latest_data, dimensions.
data360_get_dataFetch data points with filters (country, time period, SEX, AGE, etc.).
data360_get_metadataGet indicator metadata. Use select_fields for specific fields.
data360_get_disaggregationCheck available filter values (countries, years, dimensions) for an indicator.
data360_find_codelist_valueResolve human-readable names to codes (e.g., "Kenya" → KEN, "female" → F).
data360_list_indicatorsList all indicators for a given database.

Recommended Agent Workflow

1. Search    → data360_search_indicators(query, required_country="Kenya")
               Returns: covers_country, latest_data, dimensions per indicator

2. Get Data  → data360_get_data(database_id, indicator_id, filters)
               Use REF_AREA code from search; add time period filters

MCP Resources

ResourceDescription
data360://system-promptChain-of-thought guidance for chatbot integration
data360://databasesAvailable databases (WB_WDI, WB_SSGD, etc.)
data360://codelistsCodelist reference (REF_AREA, SEX, AGE, etc.)
data360://metadata-fieldsField mapping for smart question routing
data360://data-filtersAvailable filters and usage guidance
data360://search-usageSearch examples and best practices

For chatbot integration, copy data360://system-prompt into your system prompt. It includes chain-of-thought reasoning templates and filter guidance.


Documentation

Project site: worldbank.github.io/data360-mcp — landing page with features, tools, and connection details.

A markdown overview lives in docs/overview.md. The site is deployed with GitHub Actions on pushes to main or dev. In the repository Settings → Pages, set Build and deployment source to GitHub Actions (first-time setup).

Preview locally: from the repository root, run python -m http.server --directory docs and open http://127.0.0.1:8000/.

For developer setup, testing, and contribution instructions, see DEVELOPMENT.md.


Contact

AI for Data - Data for AI Team (ai4data@worldbank.org) Development Data Group / Office of the World Bank Group Chief Statistician World Bank Group


License

This project is licensed under the MIT License together with the World Bank IGO Rider. The Rider is purely procedural: it reserves all privileges and immunities enjoyed by the World Bank, without adding restrictions to the MIT permissions. Please review both files before using, distributing or contributing.

See LICENSE and WB-IGO-RIDER.md for the full license texts.


Dùng MCP Data360 MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Data360 MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Data360 MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Data360 MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "data360-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Data360 MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Data360 MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Data360 MCP giúp tôi làm việc này không?
Data360 MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Data360 MCP.

Câu hỏi thường gặp

Máy chủ MCP Data360 MCP dùng để làm gì?

Data360 MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Data360 MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Data360 MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Data360 MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Data360 MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Data360 MCP với TypingMind?

Data360 MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Data360 MCP cung cấp những công cụ nào trong TypingMind?

Data360 MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Data360 MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Data360 MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇