India MCP Server

India MCP Server

Production-grade MCP server for Indian agriculture and utility workflows, enabling crop advisory, weather checks, mandi prices, and railway utilities through natural language.

Category
Visit Server

README

India Agriculture MCP Server

A Python MCP server for Indian agriculture workflows, built with FastMCP for Claude Desktop and other MCP-compatible clients.

Overview

This project exposes practical agriculture tools through the Model Context Protocol (MCP), so an AI client can call real functions instead of relying only on built-in knowledge.

The current server is focused on three common agriculture workflows:

  • Farming weather lookup for Indian locations
  • Crop advisory for common crops
  • Mandi price reference lookup by crop and state

It is designed for local use with Claude Desktop through the stdio transport pattern supported by FastMCP.

Current tools

The server currently exposes these three MCP tools:

1. weather_for_farming(location: str)

Returns current weather conditions for a location and adds basic farming suitability guidance.

Example input

  • Nagpur
  • Pune,IN
  • Delhi

What it includes

  • Weather condition
  • Temperature
  • Feels-like temperature
  • Humidity
  • Wind speed
  • Rain status if available
  • Simple farming suitability notes

2. crop_advisory(crop: str, state: str = "")

Returns reference agronomy guidance for a crop.

Example input

  • crop="soybean", state="Maharashtra"
  • crop="cotton", state="Gujarat"
  • crop="wheat", state="Punjab"

What it includes

  • Season
  • Soil type
  • Water requirement
  • Fertilizer guidance
  • Common pests or diseases
  • Practical cultivation tips

3. mandi_prices(crop: str, state: str)

Returns reference mandi price information for a crop in a specific Indian state.

Example input

  • crop="soybean", state="Maharashtra"
  • crop="cotton", state="Maharashtra"

What it includes

  • Minimum price
  • Maximum price
  • Modal price
  • Example market names

Current behavior and limitations

This server currently mixes live and reference-style outputs.

  • Weather is a live current-weather snapshot.
  • Crop advisory is reference agronomy guidance, not a field-specific expert bulletin.
  • Mandi prices should be treated as reference market information unless explicitly connected to a verified live official source.

That means the project is useful for AI-assisted agriculture workflows, demos, and portfolio use, but important farm decisions should still be verified with local agronomy experts, soil tests, and official market data.

Tech stack

Layer Technology Purpose
Language Python Core implementation
MCP framework FastMCP Tool registration and MCP server runtime
Transport stdio Local MCP communication
HTTP client httpx External API requests
Configuration python-dotenv Load environment variables from .env
Client Claude Desktop Local MCP client integration

Project structure

mcp-india-server/
├── .env.example
├── .gitignore
├── README.md
├── requirements.txt
├── run_server.py
├── src/
│   ├── __init__.py
│   ├── server.py
│   └── tools/
│       ├── __init__.py
│       ├── crops.py
│       └── weather.py

Setup

1. Clone the repository

git clone https://github.com/Parikshit2005/-mcp-india-server.git
cd mcp-india-server

If your local folder name is different, use that folder name instead.

2. Create a virtual environment

python -m venv venv

3. Activate the virtual environment

Windows CMD

venv\Scripts\activate

If your project is on another drive, open CMD and run:

cd /d F:\mcp-india-server
venv\Scripts\activate

4. Install dependencies

pip install -r requirements.txt

5. Create the environment file

copy .env.example .env

Then add the required API keys and configuration values to .env.

6. Run the server

python run_server.py

Claude Desktop integration

Claude Desktop can connect to local MCP servers by launching them as subprocesses. FastMCP supports this pattern over stdio, which makes it a good fit for local tool usage.

Add an entry like this to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "india-mcp-server": {
      "command": "F:\\mcp-india-server\\venv\\Scripts\\python.exe",
      "args": ["F:\\mcp-india-server\\run_server.py"]
    }
  }
}

After saving the config:

  1. Fully close Claude Desktop.
  2. Reopen it.
  3. Test prompts that should trigger the server tools.

Example prompts

Try prompts like these inside Claude Desktop:

  • Give crop advisory for soybean in Maharashtra.
  • Show mandi price for soybean in Maharashtra.
  • Give farming weather for Nagpur,IN.
  • What is the weather in Pune for farming today?
  • Give crop advisory for cotton in Gujarat.

Implementation notes

The server is built with FastMCP and registers tools using the @mcp.tool() decorator. The current server code exposes:

  • weather_for_farming
  • crop_advisory
  • mandi_prices

The server runs locally with:

mcp.run(transport="stdio")

This keeps the setup simple for local MCP client use.

Security

  • Store secrets in .env, not in source files.
  • Keep .env out of version control.
  • Commit only .env.example with placeholder values.
  • Review logs and debug output before sharing screenshots or demos.

Roadmap

Planned improvements:

  • Add weather freshness display using API timestamp fields
  • Improve mandi pricing with clearer official-source support
  • Expand crop coverage and regional advisory detail
  • Add tests for tool handlers and edge cases
  • Add screenshots or demo recordings from Claude Desktop
  • Add hosted deployment instructions for remote MCP usage

Use cases

This project is a good fit for:

  • MCP learning and experimentation
  • Claude Desktop custom tool integration
  • Agriculture-focused assistant workflows
  • Student and portfolio projects around AI tooling
  • Rapid prototyping of India-specific utility assistants

Two tiny things to verify before using it:

If your repo folder is literally -mcp-india-server, keep that exact name in the clone and cd commands; otherwise use mcp-india-server.

If run_server.py actually imports src.server:mcp, your current wording is still fine, but the file path in Claude Desktop must exactly match your machine path.

License

Add a license before public release so reuse terms are clear.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured