datagovin
Core server for exposing India’s open government data (data.gov.in) APIs via the Model Context Protocol, powering agentic AI data exploration.
claude mcp add --transport stdio the-data-gateway-initiative-datagovin-mcp-server python -m datagovin_mcp_server.main \ --env API_KEY="your_actual_api_key_here" \ --env REDIS_HOST="optional Redis host (if using external Redis)" \ --env REDIS_PORT="optional Redis port (if using external Redis)"
How to use
The datagovin MCP server exposes India’s open government data APIs (data.gov.in) through the Model Context Protocol, enabling agentic AI tools to explore and reason over data sources. After starting the server, you can interact with its capabilities via the MCP Inspector for testing endpoints and tools, or integrate the server with development environments like VS Code to power Copilot-assisted data queries. The server implements a set of data access tools and resources that agents can invoke as part of a conversational workflow, such as querying datasets, metadata, and API endpoints exposed by data.gov.in. Use the Inspector UI to validate tool behavior and then connect your agent tooling to the stdio-based server for live experimentation. Configuration through environment variables allows you to supply your API key and optionally point to a Redis instance for caching or session storage.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Optional: Python virtual environment tooling (venv)
- Access to data.gov.in API key
Step-by-step installation:
-
Clone the repository: git clone <repo-url> cd datagovin-mcp-server
-
Create and activate a virtual environment: python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies (editable mode for development): pip install -e .[dev]
-
Configure environment variables:
- Copy example env file and edit it: cp .env.example .env
- Set your API key and optional Redis settings in .env: API_KEY=your_actual_api_key_here REDIS_HOST=optional_host REDIS_PORT=optional_port
-
Run the server for testing: python -m datagovin_mcp_server.main
-
Optional: Run code quality and tests: mypy pytest black . ruff check
Additional notes
Notes and tips:
- The server relies on a Data.gov.in API key; ensure API_KEY is correctly set in the environment.
- If you use an external Redis, provide REDIS_HOST and REDIS_PORT in .env.
- For debugging with the MCP Inspector, ensure Node.js is installed to run the inspector proxy (npx @modelcontextprotocol/inspector).
- The inspector proxy exposes a web UI at http://localhost:6274 and can be used to test the server tools before integrating them into agents.
- In VS Code integration, you must replace placeholder paths with the actual Python executable path from your virtual environment when configuring .vscode/mcp.json.
- This is a Python-based MCP server; there is no npm package associated with it (npm_package will be null).
Related MCP Servers
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
mcp-pinecone
Model Context Protocol server to allow for reading and writing from Pinecone. Rudimentary RAG
Gitingest
mcp server for gitingest
blender-open
Open Models MCP for Blender Using Ollama
microsoft_fabric_mcp
MCP server wrapping around the Fabric Rest API
mcp -memos-py
A Python package enabling LLM models to interact with the Memos server via the MCP interface for searching, creating, retrieving, and managing memos.