Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

datagov-in-mcp

Latest version: v0.2.0

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
PyPI package Publisher: tirth.harshi
1 Versions

Scan summary

datagov-in-mcp was last scanned on 25 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 25 Nov 2026.
  • Findings: No rules fired in version 0.2.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.0 LATEST 25 Nov 2026 No rules fired

No rules fired in 0.2.0

Findings

Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

datagov-in-mcp

MCP server for India's Open Government Data portal (api.data.gov.in)

Unlike basic data.gov.in wrappers that require memorizing dataset UUIDs, this server lets any AI agent discover datasets by keyword, inspect messy schemas, auto-paginate past the 100-row API limit, normalize Indian State/District names, and run deterministic DuckDB aggregations so the LLM never hallucinates math.


✨ Features

Tool What it does
search_catalog Discover datasets by keyword (local SQLite FTS5 seed/cache first, 5s remote fallback)
inspect_schema See column names, types, and sample values before querying
find_filter_values Discover exact, case-sensitive filter strings via substring & fuzzy matching
query_records Auto-paginates past the 100-row limit, normalizes field names, auto-resolves unambiguous filters
aggregate_dataset Exact SUM/AVG/MIN/MAX/COUNT via DuckDB — no hallucinated math
join_on_geography Merges two datasets on state/district with 100+ Indian name-variant mappings
export_dataset Export normalized records to CSV, JSON, or Parquet with official citation
get_citation Generates a proper citation with URL, timestamp, and filters

🚀 Quick Start

1. Get an API Key

Register at data.gov.in to get a free API key.

2. Clone & Install
git clone https://github.com/your-username/datagov-in-mcp.git
cd datagov-in-mcp

# Create virtual environment and install
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate

pip install -e ".[dev]"
3. Set Your API Key
# Copy the template
cp .env.example .env

# Edit .env and add your key
DATA_GOV_API_KEY=your_key_here

Or set it as an environment variable:

export DATA_GOV_API_KEY=your_key_here        # macOS/Linux
set DATA_GOV_API_KEY=your_key_here            # Windows CMD
$env:DATA_GOV_API_KEY="your_key_here"         # PowerShell
4. Run Tests
pytest -v
5. Launch the Server (or run via uvx)
# Run without manual venv setup via uvx (from PyPI or local checkout)
uvx datagov-in-mcp
uvx --from . datagov-in-mcp

# Or via the installed entry-point
datagov-in-mcp

# Or directly
python -m datagov_mcp.server
6. Sync Additional Catalog Metadata (datagov-sync-catalog)

Pre-populate the local SQLite FTS5 catalog cache from api.data.gov.in:

datagov-sync-catalog --pages 10
datagov-sync-catalog --pages 5 --query agriculture

🔌 Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "datagov-in-mcp": {
      "command": "datagov-in-mcp",
      "env": {
        "DATA_GOV_API_KEY": "your_key_here"
      }
    }
  }
}

Or if using uv:

{
  "mcpServers": {
    "datagov-in-mcp": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/datagov-in-mcp", "datagov-in-mcp"],
      "env": {
        "DATA_GOV_API_KEY": "your_key_here"
      }
    }
  }
}
Cursor

Add to your Cursor MCP settings (.cursor/mcp.json):

{
  "mcpServers": {
    "datagov-in-mcp": {
      "command": "datagov-in-mcp",
      "env": {
        "DATA_GOV_API_KEY": "your_key_here"
      }
    }
  }
}
Antigravity

Create a file at .gemini/config/mcp/datagov.json:

{
  "mcpServers": {
    "datagov-in-mcp": {
      "command": "datagov-in-mcp",
      "env": {
        "DATA_GOV_API_KEY": "your_key_here"
      }
    }
  }
}
FastMCP Inspector
# List all tools
fastmcp list src/datagov_mcp/server.py

# Interactive inspector
fastmcp dev src/datagov_mcp/server.py

🛠️ Tool Reference

search_catalog(query, limit=10)

Search for datasets by keyword. Start here to find resource_id values.

query: "mandi prices agricultural commodities"
→ Returns resource_id, title, ministry, description
inspect_schema(resource_id)

Inspect column names, inferred types, and sample values before querying.

resource_id: "9ef84268-d588-465a-a308-a864a43d0070"
→ Returns columns with types (numeric, date, state, district, text)
         + sample values for each column
query_records(resource_id, filters=None, max_rows=500)

Fetch records with auto-pagination and name normalization.

resource_id: "9ef84268-...", filters: {"State": "Maharashtra"}, max_rows: 1000
→ Returns cleaned records with snake_case keys and normalized state names
aggregate_dataset(resource_id, group_by, metric_column, operation="sum", filters=None)

Run exact aggregations via DuckDB — never hallucinates math.

group_by: "state_name", metric_column: "production_tonnes", operation: "sum"
→ Returns deterministic SUM grouped by state, sorted descending
join_on_geography(resource_id_a, resource_id_b, geo_level="state", ...)

Join two datasets on normalized Indian geography (state or district).

Merges "Orissa" ↔ "Odisha", "Bangalore" ↔ "Bengaluru", etc.
→ Returns inner-joined records from both datasets
get_citation(resource_id, filters=None)

Generate a proper citation for data attribution.

→ 'Government of India, Open Government Data Portal. "Daily Wholesale Prices...".
   Resource ID: 9ef84268-... URL: https://data.gov.in/resource/9ef84268-...
   Retrieved: 2024-01-15T12:00:00+00:00.'
find_filter_values(resource_id, column, search_term, sample_size=300)

Resolve exact, case-sensitive filter strings required by api.data.gov.in (e.g., "Gram" → "Bengal Gram(Gram)(Whole)", "Kozhikode" → "Kozhikode(Calicut)").

export_dataset(resource_id, output_path, format="csv", filters=None, max_rows=2000)

Export normalized records locally to csv, json, or parquet (via DuckDB COPY ... TO), creating parent directories automatically and returning file size + citation.


📦 MCP Resources & Prompts

Resources
  • datagov://geography/states — Canonical 36 Indian States/UTs and known spelling/legacy variants (e.g., Orissa → Odisha, Keralam → Kerala).
  • datagov://catalog/featured — Curated featured datasets from data.gov.in.
Prompts
  • compare_states(topic, state_a, state_b) — Step-by-step workflow to discover, inspect, deterministically aggregate, and cite state comparisons.
  • mandi_price_check(commodity, state="Gujarat") — Step-by-step workflow to inspect Daily Mandi Prices, resolve exact commodity spelling via find_filter_values, aggregate district-wise modal_price, and cite the source.

📁 Project Structure

datagov-in-mcp/
├── pyproject.toml               # Hatchling build config (v0.2.0)
├── .env.example                 # API key template
├── README.md
├── src/
│   └── datagov_mcp/
│       ├── __init__.py
│       ├── client.py            # Async HTTP/1.1 httpx client with auto-pagination & retries
│       ├── catalog.py           # Local-first SQLite FTS5 cache + seed index + 5s remote fallback
│       ├── indexer.py           # CLI catalog sync (datagov-sync-catalog)
│       ├── normalizer.py        # Snake_case + Indian State/District canonicalizer + fuzzy matcher
│       ├── analytics.py         # DuckDB aggregation engine, geographic joins & CSV/JSON/Parquet export
│       └── server.py            # FastMCP server with 8 tools, 2 resources, and 2 prompts
└── tests/
    ├── test_normalizer.py       # Name normalization & type inference tests
    ├── test_analytics.py        # DuckDB aggregation & join tests
    └── test_v2.py               # V2 tests (filter discovery, export, indexer, resources, prompts)

📄 License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases datagov-in-mcp

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229