Back to MCP Servers

MoSPI MCP Server

Official MCP server from India's Ministry of Statistics, exposing eSankhyiki Portal datasets (PLFS, CPI, IIP, NAS, WPI, and more) to AI agents.

Government & Nonprofit by Ministry of Statistics and Programme Implementation (Government of India) None active
Overview

The MoSPI eSankhyiki MCP server is an official pilot project from India's Ministry of Statistics and Programme Implementation (MoSPI), released by the National Statistical Office (NSO) in February 2026. It exposes the eSankhyiki Portal's open data APIs through the Model Context Protocol so AI assistants like Claude, ChatGPT, and Cursor can query official Indian government statistics in natural language.

The server covers 23 datasets spanning employment (PLFS), inflation (CPI and WPI), industrial production (IIP), national accounts (NAS), energy and renewable energy (MNRE), education (AISHE, UDISE), health (NFHS), gender statistics, environment, agriculture (NSS rounds 77 to 80), the economic census, and household consumption. It is built on FastMCP 3.0, follows a strict sequential 4-tool workflow designed for LLM consumption, validates parameters against a Swagger schema, and ships with full OpenTelemetry observability and Docker deployment.

The project is open source under the MIT License and is also hosted publicly at https://mcp.mospi.gov.in/ with no registration or authentication required, making it plug-and-play for researchers, policymakers, journalists, and developers who need attributed, official statistics on India.

Tools

Tool Description
list_datasets Browse all available datasets on the eSankhyiki Portal. Always call this first to discover which dataset matches the user's question.
get_indicators Retrieve the list of indicators available within a given dataset (e.g. unemployment rate, LFPR for PLFS).
get_metadata Fetch valid filter values and API parameters for a dataset and indicator. Must be called before get_data so that filter codes are valid.
get_data Fetch the actual statistical data values using validated filter codes returned by get_metadata.
Setup Guide

Option 1: Connect to the hosted server (recommended)

The MoSPI team hosts a public instance at https://mcp.mospi.gov.in/ with no authentication required.

Claude Desktop / Claude Code

claude mcp add esankhyiki-mcp --transport http https://mcp.mospi.gov.in/

Cursor / Windsurf (.cursor/mcp.json)

{
  "mcpServers": {
    "esankhyiki-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.mospi.gov.in/"]
    }
  }
}

Antigravity

{
  "mcpServers": {
    "mospi_api": {
      "serverUrl": "https://mcp.mospi.gov.in/"
    }
  }
}

Option 2: Self-host

Prerequisites: Python 3.11+ and FastMCP 3.0.

git clone https://github.com/nso-india/esankhyiki-mcp.git
cd esankhyiki-mcp
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

python mospi_server.py
# or
fastmcp run mospi_server.py:mcp --transport http --port 8000

The local endpoint will be http://localhost:8000/mcp. Docker and Docker Compose configurations (with Jaeger tracing at http://localhost:16686) are also provided in the repo. Optional OpenTelemetry environment variables (OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_TRACES_EXPORTER) control observability.

Workflow note

Tools must be called in order: list_datasets then get_indicators then get_metadata then get_data. Skipping get_metadata will produce invalid filter codes.

Use Cases
  • Query India's official unemployment rate, LFPR, or WPR from the Periodic Labour Force Survey (PLFS) without leaving your AI chat
  • Pull headline and sub-group Consumer Price Index (CPI) or Wholesale Price Index (WPI) inflation series for analysis or charting
  • Compare state-level Index of Industrial Production (IIP) or National Accounts (NAS) figures for policy briefs and journalism
  • Retrieve education and health indicators from AISHE, UDISE, and NFHS for research and reporting
  • Build dashboards or RAG pipelines grounded in attributed, official government statistics from the eSankhyiki Portal
Example Prompts
  • "List all datasets available on the MoSPI eSankhyiki MCP and tell me which one has urban unemployment data."
  • "What was India's CPI inflation rate for rural areas in the last 12 months? Plot the trend."
  • "Pull the IIP for the manufacturing sector for the latest available quarter and break it down by 2-digit NIC."
  • "Compare male and female labour force participation rate across states using the latest PLFS data."
  • "Get GDP growth from the National Accounts dataset for the last five fiscal years and summarize the drivers."
Pros
  • Official source: maintained by India's National Statistical Office under MoSPI, so the data is attributed and authoritative
  • No authentication or API key needed, both for the hosted endpoint and the underlying eSankhyiki APIs
  • Broad coverage of 23 datasets spanning economic, social, and environmental statistics
  • Open source under MIT License with Docker, FastMCP Cloud, and OpenTelemetry support for self-hosting
Limitations
  • Marked as a beta pilot project, so dataset coverage and tool stability may change
  • Strict 4-tool sequential workflow means agents that skip steps will get invalid filter codes and errors
  • Read-only access to a fixed set of MoSPI datasets, no support for non-Indian or non-government statistics
Alternatives
  • data.gov.in APIs accessed via a generic HTTP MCP server for broader Indian open government data
  • World Bank Data MCP style community servers for cross-country macroeconomic indicators
  • FRED (Federal Reserve Economic Data) MCP servers for comparable US and global economic time series