datagovin-mcp
This MCP server lets an LLM search and query India's Open Government Data platform (data.gov.in) — GDP, trade, industry, agriculture and hundreds of thousands of other ministry datasets.
search_datasets— keyword search over the catalog, with optionalsectorandorg/ministry filters; returns compact summaries with the dataset id, title, ministry, last update date and period covered, scanning newest entries first.describe_dataset— inspect a dataset's schema: dimension columns, and for wide time-series tables which metrics and periods they contain (call before querying or building a series).query_dataset— fetch rows with exact-match filters (by column name or id), column selection, andlimit/offsetpagination; wide tables default to just their dimension columns.get_series— reshape wide year/quarter tables into tidy, period-sorted{metric, period, value}rows, optionally filtered by dimensionitemormetricname, capped bymax_rows.Tames messy source data — normalizes inconsistent column naming so periods aren't silently dropped, trims catalog responses to avoid token bloat, and reports update dates so the model can flag stale datasets.
Safe and reliable — all tools are read-only; TTL caching, retries with exponential backoff on 429/5xx, UUID validation of dataset ids, and the API key is never echoed. Catalog search works without a key; data queries need
DATA_GOV_IN_API_KEY.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datagovin-mcp How did India's quarterly GDP growth move through COVID?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
india-data

An MCP server that lets LLMs like Claude search and query India's Open Government Data platform (data.gov.in): GDP, trade, industry, agriculture and hundreds of thousands of other datasets published by Indian ministries.
"How did India's quarterly GDP growth move through COVID?" Claude searches the catalog, finds the MoSPI dataset, pulls the series and answers with real numbers, citing the source dataset and how current it is.
Tools
Tool | What it does |
| Keyword search over the catalog, with sector and ministry filters. Returns compact summaries with the period each dataset covers. |
| A dataset's schema: dimension columns, and for wide tables, which metrics and periods it contains. |
| Rows with exact-match filters (by column name or id), column selection and pagination. |
| Reshapes wide year/quarter tables into tidy |
All tools are marked read-only.
Related MCP server: MoSPI MCP Server
Why this is more than an API wrapper
data.gov.in data is published as-is by each ministry, and it is messy in ways that trip up LLMs:
Wide tables. The quarterly GDP dataset has ~150 columns (
value_rs_in_crore___2011_12___q1, …).get_seriesparses the column names into(metric, period)pairs and returns a sorted series.Inconsistent naming within one dataset. The same dataset mixes
___q2and__q3ids and2021-22 - Q2vs2021-22- Q3names; another mixesTotal - As on 31.03.2019withTotal as on 31.03.2018. The normalizer treats these as the same metric, so no periods get silently dropped.Token bloat. Catalog responses include every column of every dataset. Search results are trimmed to summaries, and wide tables return only dimension columns unless asked.
Stale data. Many datasets stop years ago. Every summary reports the last update date and the period covered, and the server instructions ask the model to tell the user how current the data is.
Reliability and safety. Responses are cached (TTL), HTTP 429/5xx errors are retried with exponential backoff, dataset ids are validated as UUIDs before any request, and the API key is never echoed in errors.
Setup
Get a free API key: register at data.gov.in and copy the key from your My Account page.
Install with uv:
git clone https://github.com/Oolrich/india-data && cd india-data
uv sync --extra devCheck it works against the live API:
export DATA_GOV_IN_API_KEY=your-key
uv run python scripts/smoke_test.pyUse with Claude Desktop
Add this to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude:
{
"mcpServers": {
"data-gov-in": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/india-data", "run", "datagovin-mcp"],
"env": { "DATA_GOV_IN_API_KEY": "your-key" }
}
}
}Configuration
Variable | Default | Purpose |
| (required for data) | Your data.gov.in key. Catalog search works without it. |
|
| How many catalog entries one search scans, newest first. |
|
| Row cap when building a series. |
Development
uv run pytestTests run offline against a fake API built from real catalog responses, and they include an end-to-end test over the MCP protocol.
Limitations
Search scans the newest catalog entries and matches keywords locally, because the catalog API has no full-text search. Use
sectorto reach older datasets.Filters are exact-match, as supported by the upstream API.
Data is exactly as published by the source ministry. Check the dataset title and update date before relying on it.
Inspired by the datagovindia R package, rebuilt for LLM agents.
License
MIT
Available Tools
4 toolsdescribe_datasetARead-onlyIdempotent
Show a dataset's schema: its dimension columns, and for wide time-series tables, which metrics and periods it covers. Call this before query_dataset or get_series.
Args: dataset_id: The 'id' from search_datasets.
Inputs: dataset_id (required).
get_seriesARead-onlyIdempotent
Read a wide time-series table (one column per year/quarter) as tidy rows: [{, metric, period, value}], sorted by period.
Args: dataset_id: The 'id' from search_datasets. item: Optional case-insensitive filter on any dimension value, e.g. "GDP" or "Odisha". metric: Optional case-insensitive filter on the metric name, e.g. "growth" or "value". max_rows: Maximum rows to return (1-1000).
Inputs: dataset_id (required), item, metric, max_rows.
query_datasetARead-onlyIdempotent
Fetch rows from a dataset, with exact-match filters and column selection.
Args: dataset_id: The 'id' from search_datasets. filters: Column (name or id) -> exact value, e.g. {"State/UT": "Odisha"}. columns: Columns (names or ids) to return. Defaults to all, except that very wide time-series tables return only their dimension columns (use get_series for those). limit: Rows per page (1-100). offset: Row offset for pagination; use 'next_offset' from the previous call.
Inputs: dataset_id (required), limit, offset, columns, +1 more.
search_datasetsARead-onlyIdempotent
Search the data.gov.in catalog for datasets.
Args: query: Keywords that must all appear in the title, description, ministry or sector, e.g. "gdp quarterly". sector: Optional exact sector name, e.g. "Economy", "Finance", "Industries", "Agriculture". org: Optional ministry/organisation substring, e.g. "Statistics" or "Petroleum". limit: Maximum results to return (1-25).
Returns compact summaries (id, title, ministry, last update, and the period the data covers). Newest datasets are scanned first.
Inputs: org, limit, query, sector.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct stage of the workflow: search the catalog, describe a dataset, fetch rows, or extract wide time-series data. The query_dataset vs get_series overlap is explicitly clarified by their descriptions, so an agent can select correctly.
All tool names follow a consistent snake_case verb_noun pattern: search_datasets, describe_dataset, query_dataset, get_series. The convention is predictable and readable.
Four tools are tightly scoped to the data.gov.in catalog workflow, and each earns its place. The set avoids unnecessary surface area while covering discovery, inspection, and data retrieval.
The surface covers catalog search, schema inspection, row queries, and time-series extraction, which are the core read-only operations. Minor gaps exist around richer metadata or facet browsing, but agents can work around them.
Maintenance
Related MCP Connectors
Search India datasets; inspect sources, licences and previews; get notebook and Python examples.
Indian government statistics and public data: economy, elections, health, agriculture and more
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Macroeconomic and other official data from 170+ publishers, resolved from natural language with provenance.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes India's open government data (data.gov.in) APIs via the Model Context Protocol, enabling agentic AI data exploration.2MIT

MoSPI MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceProvides AI-ready access to Indian government statistics through MCP, enabling natural language queries for economic, demographic, and social indicators.149MIT- AlicenseAqualityDmaintenanceEnables natural-language access to India's Open Government Data platform, letting users discover datasets, inspect schemas, and query live data from data.gov.in.4MIT
- AlicenseAqualityBmaintenanceGives a language model direct access to Peru's National Open Data Platform: searching datasets, viewing their metadata and resources, previewing CSV columns and rows, and running filters and aggregations over full CSVs with source citation. It also exposes catalog resources and a prompt template for answering questions with public data.6MIT