MoSPI
Access India's official government statistics through natural language. MoSPI's MCP server connects AI assistants to national datasets covering GDP, inflation, employment, industrial production, higher education, health, energy, environment, trade, and more. All data comes directly from the Ministry of Statistics and Programme Implementation (MoSPI), Government of India, via the eSankhyiki portal.
- Homepage
- https://www.datainnovation.mospi.gov.in/mospi-mcp
- Remote URL
https://mcp.mospi.gov.in/- Transport
- streamable-http
Tools (4)
Extracted live via the executor SDK.
-
get_indicatorsReturns 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 147 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-3 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
Args: dataset: Dataset name — one of: PLFS, CPI, IIP, ASI, NAS, WPI, ENERGY, AISHE, ASUSE, GENDER, NFHS, ENVSTATS, RBI, NSS77, NSS78, NSS79, CPIALRL, HCES, TUS, EC, UDISE, MNRE. For CPI, IIP, WPI: returns available base years and frequencies. user_query: The user's original question, used for context.
Returns: dict with indicator list (codes, names, definitions where available). For frequency-based datasets (PLFS, ASUSE), indicators are grouped by frequency_code.
-
get_metadataReturns 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
Args: dataset: Dataset name (same values as get_indicators). indicator_code: Required for: PLFS, NAS, ENERGY, AISHE, ASUSE, GENDER, NFHS, ENVSTATS, RBI, NSS77, NSS78, NSS79, CPIALRL, HCES, TUS, EC, UDISE, MNRE. Not applicable for: CPI, IIP, ASI, WPI. For RBI, this maps to sub_indicator_code internally. frequency_code: Required for PLFS and ASUSE. PLFS: 1=Annual, 2=Quarterly bulletin, 3=Monthly. ASUSE: 1=Annual, 2=Quarterly. base_year: Required for CPI ("2024"/"2012"/"2010"), IIP ("2011-12"/"2004-05"/"1993-94"), NAS ("2022-23"/"2011-12"), WPI ("2011-12"/"2004-05"/"1993-94"). Not applicable for PLFS, ASI. level: Required for CPI ("Group"/"Item"). frequency: Required for IIP ("Annually"/"Monthly"). classification_year: Required for ASI ("2008"/"2004"/"1998"/"1987"). series: For CPI and NAS only ("Current"/"Back"). use_of_energy_balance_code: For ENERGY only (1=Supply, 2=Consumption).
Returns: dict with 'filter_values' (valid codes for each parameter), 'api_params' (parameter definitions), and dataset-specific parameter documentation.
-
get_dataFetches 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
Args: dataset: Dataset name (PLFS, CPI, IIP, ASI, NAS, WPI, ENERGY, AISHE, ASUSE, GENDER, NFHS, ENVSTATS, RBI, NSS77, NSS78, NSS79, CPIALRL, HCES, TUS, EC, UDISE, MNRE). CPI auto-routes to Group or Item endpoint based on whether filters contain item_code. IIP uses a single endpoint; pass frequency="Annually" or frequency="Monthly" in filters. filters: Key-value pairs from get_metadata filter_values. PLFS requires frequency_code (1=Annual, 2=Quarterly, 3=Monthly). NAS requires base_year ("2022-23" or "2011-12"). MNRE: indicator_code (1-5) is mapped to type_of_renewable_energy_code. Pass limit (e.g., "50") to retrieve more than 10 records.
Returns: dict with statistical records, or an error/validation message if parameters are invalid.
-
list_datasetsReturns 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, 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):
- list_datasets() — identify the dataset
- get_indicators(dataset) — list available indicators
- get_metadata(dataset, indicator_code) — retrieve valid filter values
- get_data(dataset, filters) — fetch the data
Returns: dict with 'datasets' (name, description, use_for for each dataset) and 'workflow' (the four-step sequence).