agri-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agri-mcp
An MCP (Model Context Protocol) server that gives Claude access to live agricultural weather data via the OpenWeather API. Designed to run as a local tool server for Claude Desktop.
Features
get_weather — Get current weather conditions (temperature, description, humidity) for any city
get_forecast — Get a multi-day weather forecast for any city
Related MCP server: Weather MCP Server
Requirements
Python 3.10+
An OpenWeather API key (free tier works)
Setup
1. Clone / create the project folder
mkdir agri-mcp
cd agri-mcp2. (Optional) Create a virtual environment
python -m venv venv
venv\Scripts\activate3. Install dependencies
pip install mcp httpx python-dotenv4. Add your OpenWeather API key
Create a .env file in the project root (only needed for local/standalone testing — Claude Desktop passes env vars directly from its config):
OPENWEATHER_API_KEY=your_api_key_here5. Test the server standalone
python main.pyThe server communicates over stdio, so it won't print anything visible — if it doesn't immediately crash, it's working. Press Ctrl+C to stop it.
Connecting to Claude Desktop
Edit your Claude Desktop config file:
notepad "%APPDATA%\Claude\claude_desktop_config.json"Add the following (adjust the path to match where main.py actually lives on your machine):
{
"mcpServers": {
"agri-data": {
"command": "python",
"args": [
"C:\\Users\\YOUR_USERNAME\\PycharmProjects\\PythonProject\\agri-mcp\\main.py"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}Then fully quit Claude Desktop (not just close the window — end the process from Task Manager or system tray) and reopen it. Check Settings → Developer (or the MCP servers panel) to confirm agri-data shows as connected.
Project Structure
agri-mcp/
├── main.py # MCP server entry point and tool definitions
├── .env # Local environment variables (not committed)
└── README.mdTroubleshooting
Issue | Fix |
| Check the config JSON structure — |
| Disable the Python App Execution Alias in Windows Settings, or use the full path to |
Old config still showing after edit | Fully quit Claude Desktop (Task Manager → End Task) and reopen — closing the window alone doesn't reload the config |
| Confirm the key is present in both the config's |
Security Note
Do not commit your .env file or claude_desktop_config.json with a real API key to version control. If a key is ever accidentally exposed (e.g. shared in a screenshot or chat), regenerate it from your OpenWeather account dashboard.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
OpenWeather data for AI agents: list feeds, sign up, check balance, get a top-up link, fetch data.
Weather data, forecast API, climate data, historical weather, alerts, agricultural & travel weather.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Weather forecast for any city, UV index, sunrise and sunset, pollen and air quality. Free, no key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to real-time weather data, 5-day forecasts, and air quality information for any city using the OpenWeatherMap API.MIT
- FlicenseNot gradedqualityDmaintenanceProvides current weather information for any city using the OpenWeatherMap API.-
- AlicenseNot gradedqualityDmaintenanceProvides real-time and historical weather data for any city worldwide, including forecasts, air quality, and marine conditions, using the free Open-Meteo API.8 npmMIT
- AlicenseBqualityDmaintenanceProvides current weather conditions and 5-day forecasts for any city worldwide using the OpenWeatherMap API.2MIT