Feedback

Basic information

Transport
Streamable HTTP
Authentication
None
Author
mospi
Quality
100 (F)
Views
124

About MoSPI MCP Server

Query official Indian government statistics (GDP, inflation, jobs, industry, health, education) from MoSPI in any AI assistant.

MoSPI is a remote MCP server listed in the AddMCP.net directory, published by MoSPI. It exposes 4 tools, including get_indicators, get_metadata, get_data, list_datasets. Supported transport: Streamable HTTP. Related topics: economics, government-data, india, open-data, statistics.

Connection details

https://mcp.mospi.gov.in/

Setup

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

MoSPI MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mospi": {
            "type": "http",
            "url": "https://mcp.mospi.gov.in/"
        }
    }
}

MoSPI MCP Server tools

  • get_indicators — Returns the full list of available indicators for a given dataset. Datasets often have broader coverage than expected ΓÇö for example, ASI covers 57 indicators (capital structure, wages, employment, GVA, fuel consumption), and GENDER covers 154 indicators across health, education, labor, and crime. For PLFS and ASUSE, indicators are grouped by frequency_code: - PLFS frequency_code=1 (Annual): all 8 indicators including wages - PLFS frequency_code=2 (Quarterly): indicators 1-4 only - PLFS frequency_code=3 (Monthly): indicators 1-3 only frequency_code selects the indicator set, not time granularity. Step 2 of: list_datasets ΓåÆ get_indicators ΓåÆ get_metadata ΓåÆ get_data
    dataset:string*, user_query, classification_year, base_year, frequency, frequency_code, level, series, Format
  • get_metadata — Returns the valid filter values (states, years, quarters, etc.) for a given dataset and indicator. Filter codes are arbitrary and dataset-specific ΓÇö for example, PLFS state_code 99 means "All India", and NAS frequency_code 1 means "Annual". These values cannot be inferred or guessed from parameter names alone. The returned filter_values and api_params should be used as-is when calling get_data. Step 3 of: list_datasets ΓåÆ get_indicators ΓåÆ get_metadata ΓåÆ get_data
    dataset:string*, indicator_code, base_year, level, frequency, classification_year, frequency_code, series, use_of_energy_balance_code, sub_indicator_code, survey_code, module, …
  • get_data — Fetches statistical data from a MoSPI dataset. This is the final step of the workflow. It requires filter values from get_metadata ΓÇö filter codes are arbitrary (e.g., indicator_code=3 means "Unemployment Rate" in PLFS but something different in other datasets). All filter parameters including limit and page go inside the filters dict, not as top-level arguments. Step 4 of: list_datasets ΓåÆ get_indicators ΓåÆ get_metadata ΓåÆ get_data
    dataset:string*, filters:object*
  • list_datasets — Returns an overview of all MoSPI statistical datasets with descriptions and coverage. This is the starting point ΓÇö call this first to identify the right dataset. The API covers 500+ indicators across employment, prices, industry, national accounts, health, education, disability, housing, environment, trade, and more. Each dataset has its own indicator codes, filter parameters, and valid values ΓÇö these are not standardized and cannot be inferred or guessed from parameter names alone. Four-step workflow (each step depends on the previous): 1. list_datasets() ΓÇö identify the dataset 2. get_indicators(dataset) ΓÇö list available indicators 3. get_metadata(dataset, indicator_code) ΓÇö retrieve valid filter values 4. get_data(dataset, filters) ΓÇö fetch the data Returns: dict with 'datasets' (name, description, use_for for each dataset) and 'workflow' (the four-step sequence).
    (no parameters)

Overview

What is MoSPI?

MoSPI MCP Server is the official hosted endpoint (https://mcp.mospi.gov.in/) from India's Ministry of Statistics and Programme Implementation that lets AI assistants query official Indian government statistics such as GDP, inflation, employment and industrial output. It is free and needs no sign-in.

MoSPI, through the National Statistics Office (NSO), publishes India's core economic and social statistics on its eSankhyiki portal and open data APIs. The MCP server is a bridge between those APIs and assistants like Claude, ChatGPT and Cursor, so economists, journalists, students, policy researchers and developers can ask for a statistic in plain language instead of navigating survey tables and filter codes by hand. The server code is open source under the MIT license in the nso-india/esankhyiki-mcp repository.

How to use MoSPI?

No account or API key is required. Add the server URL to your client:

https://mcp.mospi.gov.in/

Claude Code

From the project README:

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

Verify with claude mcp list.

Claude Desktop and claude.ai

Open Settings, go to Connectors, choose "Add custom connector", name it MoSPI and paste https://mcp.mospi.gov.in/. No sign-in step follows.

Cursor

{
  "mcpServers": {
    "esankhyiki-mcp": {
      "url": "https://mcp.mospi.gov.in/"
    }
  }
}

The README's own Cursor and Windsurf example wraps the URL with npx mcp-remote https://mcp.mospi.gov.in/, which also works if your client version only supports local commands.

VS Code

{
  "servers": {
    "esankhyiki-mcp": {
      "type": "http",
      "url": "https://mcp.mospi.gov.in/"
    }
  }
}

Self-hosting

The README also explains how to run the same server yourself with Python and FastMCP (python mospi_server.py, serving at http://localhost:8000/mcp) or with Docker.

Key features of MoSPI

  • Official source: run by MoSPI with code published by the NSO India organization on GitHub.
  • Free, public endpoint with no authentication.
  • Broad coverage: the tools describe more than 500 indicators across employment, prices, industry, national accounts, health, education, disability, housing, environment, trade and more.
  • Major datasets include PLFS (labour force), CPI and WPI (prices), IIP and ISP (industrial and services production), ASI (factories), NAS (GDP and national accounts), NFHS (family health), energy, environment and RBI statistics.
  • A guided four-step workflow that keeps the model from guessing dataset-specific filter codes.
  • Open-source, self-hostable server with Docker support and OpenTelemetry observability.

MoSPI tools

The server exposes four tools meant to be called in order:

  • Find the dataset: list_datasets returns every available MoSPI dataset with a description and what it is used for. The agent calls it first.
  • Find the indicator: get_indicators lists the indicators available in a chosen dataset.
  • Find valid filters: get_metadata returns the valid filter values (states, years, quarters and so on) for a dataset and indicator. Filter codes are dataset-specific; for example, in PLFS a state code of 99 means All India.
  • Fetch numbers: get_data retrieves the statistics using the filters from get_metadata.

Use cases of MoSPI

  • Economic research: "What was India's real GDP growth rate for the last five financial years?"
  • Inflation tracking: "Show CPI inflation for food items in Kerala versus the all-India figure."
  • Labour market analysis: "What is the unemployment rate for urban women according to the latest PLFS?"
  • Journalism and fact-checking: confirm a quoted statistic against the official MoSPI source.
  • Education and health studies: pull school enrolment from UDISE+ or nutrition indicators from NFHS.
  • App development: give a data-analysis agent a reliable source of Indian official statistics.

Troubleshooting MoSPI MCP Server

  • The model returns wrong or empty data: make sure it follows the full sequence list_datasets, get_indicators, get_metadata, get_data. Skipping get_metadata usually leads to invalid filter codes.
  • Filters seem ignored: in get_data, all filter parameters, including limit and page, go inside the filters object, not as top-level arguments.
  • A sub-survey is missing from the list: some NSS rounds have sub-parts (for example NSS77A or NSS79C) that are reached through their parent dataset, such as NSS77 or NSS79.
  • Client cannot connect over HTTP: use the npx mcp-remote wrapper shown in the README.

Frequently asked questions

1 Is MoSPI MCP Server official?

Yes. It is hosted on the government domain mospi.gov.in, and the source code is published by the NSO India organization on GitHub.

2 Is MoSPI MCP free?

Yes. The hosted endpoint requires no account, API key or payment.

3 What data can I get from MoSPI MCP?

Official Indian statistics on employment, prices, industrial and services production, GDP and national accounts, energy, education, health, gender, environment, household consumption and more.

4 Does MoSPI MCP work with Claude Code, Cursor and VS Code?

Yes. The README documents Claude Code, Cursor, Windsurf and Antigravity, and any client that supports Streamable HTTP can connect by URL.

5 Can I run MoSPI MCP locally?

Yes. The repository includes instructions for running it with Python and FastMCP or Docker, which serves the same tools at http://localhost:8000/mcp.

6 Why does the server use four tools in sequence?

Each MoSPI dataset has its own indicator codes and filter values that cannot be guessed. The four-step workflow lets the model look up valid values before fetching data.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬