MCP Guide

Talk to the data. Your AI does the rest.

Connect Claude, Cursor, Gemini, or ChatGPT to the ElkassabgiData libraries once, then just ask in plain English. Your assistant finds the exact series across billions of economic observations (and the HF equity data), downloads it, and hands it back with the citation and license attached.

New to MCP? Read this first.

MCP (Model Context Protocol) is a small, open standard that lets an AI assistant plug into an outside service — like a USB-C port that fits any charger. You connect the ElkassabgiData MCP server to your AI once, and from then on it can search the catalog, pull data, and read the licensing rules on its own, inside your conversation.

No coding to set up: you paste one URL (or a short config) into your AI tool. Then you type questions like a normal chat — "how many people live below the poverty line in Poland?" — and the assistant figures out which dataset answers that, downloads it, and cites it.

Plain English in

No series codes to memorize. Ask the way you'd ask a research assistant.

Citations out

Every series returns with its source, license, and attribution — ready for a paper.

One key, every library

Your free ElkassabgiData key unlocks the economic data and the HF equity data through one connection.

What it actually looks like

These are real series the connected assistant finds live. It searches, reads the titles, and picks the right one — asking you to disambiguate when a question has more than one correct answer.

Poverty in Poland Econ Data Library
How many people live below the poverty line in Poland?
→ the AI calls search_econ_series("poverty Poland")
"Below the poverty line" can mean different thresholds — here are the main official measures:
worldbank_wdi:SI.POV.NAHC — Poverty headcount ratio at national poverty lines (% of population)
pip:PIP:headcount:POL:215 — Poverty headcount ratio at $2.15/day (2017 PPP), Poland
pip:PIP:headcount:POL:1000 — Poverty headcount ratio at $10.00/day (2017 PPP), Poland
Which line — Poland's national definition, or an international benchmark?
The national one.
→ get_econ_series("worldbank_wdi:SI.POV.NAHC"), filtered to Poland
Here's the series as a table, with the World Bank citation and license to include if you publish.
Trade into Australia Econ Data Library
How much does Australia import each year?
→ search_econ_series("Australia imports total trade")
The headline annual import value:
unctad_gasbtoia:…imports…total-trade-in-goods-and-services.australia — Imports, Total trade in goods and services, Australia (US$ at current prices, millions)
Want goods-only, or the trade balance alongside it?
Goods and services is fine — download it.
Done — annual series delivered with its UNCTAD attribution line attached.

The intelligence is your AI plus honest metadata working together: it searches, reads real titles and units, and never invents a number — a wrong guess returns an honest "not found," never fake data.

Set it up — pick your AI tool

You need a free ElkassabgiData API key. Browsing and searching work without one; downloading data needs it. Replace YOUR_KEY below with your key — it's the same key you use on hfdatalibrary.com.

Claude — web, desktop & mobile

Works on Free, Pro, Max, Team & Enterprise (Free allows one custom connector). No install.

  1. Open Settings → Connectors in the Claude app or on claude.ai.
  2. Click Add custom connector.
  3. Name it ElkassabgiData and paste this URL (key embedded — nothing else to configure):
    https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp?api_key=YOUR_KEY
  4. Click Add, then ask a data question. Claude will show the ElkassabgiData tools it uses.

Claude connects from Anthropic's cloud, so a hosted URL like ours works with no local setup.

Claude Code (terminal)

One command. Install with npm i -g @anthropic-ai/claude-code.

  1. Add the server over HTTP transport:
    claude mcp add --transport http elkassabgidata \
      "https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp?api_key=YOUR_KEY"
  2. Prefer a header instead of the URL? Use:
    claude mcp add --transport http elkassabgidata \
      https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp \
      --header "Authorization: Bearer YOUR_KEY"
  3. Run claude, type /mcp to confirm it's connected, then ask away.

Cursor

Add a global server in ~/.cursor/mcp.json (or Settings → Tools & MCP → New MCP Server).

  1. Open (or create) ~/.cursor/mcp.json:
    {
      "mcpServers": {
        "elkassabgidata": {
          "url": "https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp",
          "headers": { "Authorization": "Bearer YOUR_KEY" }
        }
      }
    }
  2. Save, then open Settings → Tools & MCP and confirm elkassabgidata shows a green dot.
  3. Ask a data question in Agent mode.

Gemini CLI

Configure in ~/.gemini/settings.json. Gemini uses httpUrl (not url) for remote servers.

  1. Add the server:
    {
      "mcpServers": {
        "elkassabgidata": {
          "httpUrl": "https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp",
          "headers": { "Authorization": "Bearer YOUR_KEY" }
        }
      }
    }
  2. Start gemini and run /mcp to verify the server and tools loaded.
  3. Ask your question in the CLI.

ChatGPT

Custom MCP connectors live in Developer Mode (web). Available on Plus, Pro, Business, Enterprise & Edu.

  1. Go to Settings → Connectors → Advanced and turn on Developer Mode.
  2. In Connectors, add a new remote MCP server with this URL:
    https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp?api_key=YOUR_KEY
  3. Save and refresh the connector, then enable it from the tools menu in a chat and ask your question.

Note: ChatGPT is OpenAI's product (not built on Claude), but it speaks the same open MCP standard — so this one server works for Claude, ChatGPT, Gemini, and Cursor alike.

Your connect URL and configs contain your real key — treat them like a password. Don't paste them into shared or public chats, or commit them to a public repo. If a key leaks, regenerate it from your account page; the old one revokes instantly.

The tools your AI gets

ToolWhat it doesKey?
search_econ_seriesSearch billions of series across 300+ sources
get_econ_seriesFetch a series as rows (long format) with citation + license inline; date windowing; honest truncationrequired
get_econ_series_metadataFull metadata: license (incl. commercial-use flag), attribution, coverage
list_econ_sourcesAll 300+ sources with licenses
get_data_freshnessLive per-source update board — same ledger as the status page, staleness never hidden
get_hf_download_linkAuthenticated instructions for 1-minute bars and the 25 academic variablesfor use
get_hf_variables_dictionaryThe 25 pre-computed variables, exact definitions
get_family_statusLive stats + data currency for both libraries
get_auth_statusWhether a key is configured on this connection (masked)

The server also publishes MCP resources (a data-honesty charter — survivorship caveats, the 2022 HF source break, per-source licensing, freshness semantics — plus the variables dictionary and a family overview) and guided prompts (analyze_econ_series, compare_countries, hf_event_study) that bake the honesty rules into each workflow.

Fair use & licenses. MCP traffic uses the same account, the same 100 downloads/min limit, and the same per-series licenses as the website APIs. Each response carries its license — please honor them, especially the non-commercial sources, and keep the attribution lines in published work. Your key is used server-side only; it is never echoed into the AI conversation.

Troubleshooting

The AI can't reach the server.
Confirm the URL is exactly https://elkassabgidata-mcp.elkassabgi.workers.dev/mcp. In Claude Code and Gemini CLI, run /mcp to see status.
Search works, but downloads fail with an auth error.
Your key is missing or wrong. Copy it from your account page. Search and metadata are keyless; only get_econ_series and HF downloads need the key.
It found the wrong series.
Add detail (units, country, period, "national vs international poverty line"). The assistant re-searches — that's the normal loop, not a failure.
Which key — HF or Econ?
There's only one. Your HF Data Library key is your ElkassabgiData key; it works across every library through this one server.
ElkassabgiData

One account. Every library.

HF Data Library  ·  Econ Data Library  · more to come