Weather MCP Agent Real Time AI Tool Integration With FastMCP Claude
A production-style Weather Assistant built with FastMCP, exposing real-time weather as AI tools and integrated with Claude Desktop via MCP. Demonstrates tool calling, backendβLLM integration, secure API handling, and real-world GenAI architecture.
Ask AI about Weather MCP Agent Real Time AI Tool Integration With FastMCP Claude
Powered by Claude Β· Grounded in docs
I know everything about Weather MCP Agent Real Time AI Tool Integration With FastMCP Claude. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Weather-MCP-Agent-Real-Time-AI-Tool-Integration-with-FastMCP-Claude
A production-style Weather Assistant built with FastMCP, exposing real-time weather as AI tools and integrated with Claude Desktop via MCP. Demonstrates tool calling, backendβLLM integration, secure API handling, and real-world GenAI architecture.
π¦οΈ Weather MCP Agent (Production-Style Tool Integration Project)
A real-world Weather Assistant Agent built using FastMCP, OpenWeather API, and tool integration with Claude Desktop via MCP server configuration.
This project demonstrates how to expose backend Python tools to AI clients in a production-style architecture.
β Perfect for showcasing in interviews (AI Engineer, Data Scientist, GenAI Developer)
π Features
- π MCP Server using FastMCP
- π§ Tool exposed:
get_weather_data(city) - π Real-time weather using OpenWeather API
- π Secure API key using
.env - π§© Claude Desktop integration via MCP config
- π₯οΈ Production-style architecture
- π¦ Clean and simple structure
π§ Architecture
User (Claude Desktop)
β
Tool Call β MCP Server (FastMCP)
β
Python Tool β OpenWeather API
β
Response back to Claude
π Project Structure
weather-agent/
β
βββ weather_agent_mcp.py # Main MCP server + tool
βββ requirements.txt # Dependencies
βββ .env # API key (not committed)
βββ claude_desktop_config.json # Claude MCP connector config
π οΈ Tech Stack
- Python 3.10+
- FastMCP
- Requests
- Python-dotenv
- OpenWeather API
- Claude Desktop (MCP tools)
π Setup Environment
Create a .env file in your project folder:
OPENWEATHER_API_KEY=your_api_key_here
π¦ Install Dependencies
pip install -r requirements.txt
Example requirements.txt:
fastmcp
requests
python-dotenv
βΆοΈ Run the MCP Server
python weather_agent_mcp.py
Your server runs using stdio transport:
if __name__ == "__main__":
mcp.run(transport="stdio")
π§ Claude Desktop Integration
Add this in your Claude MCP config:
{
"mcpServer": {
"weather": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\MUTHU SELVAM\\OneDrive\\Desktop\\VS CODE\\own projects\\weather agent",
"run",
"weather_agent_mcp.py"
]
}
}
}
After this, Claude automatically detects your tool.
π¬ Example Usage
User asks in Claude:
What is the current weather in Bangalore?
Claude calls your tool internally:
{
"city": "Bangalore"
}
Tool response:
Weather in Bangalore:
- Condition: clear sky
- Temperature: 25Β°C (feels like 24.7Β°C)
- Humidity: 40%
π― Why This Project Is Strong
This project demonstrates:
- Real AI tool calling
- MCP server architecture
- Backend + LLM integration
- API handling
- Secure env handling
- Production-style design
This is ideal for roles like:
- AI Engineer
- GenAI Developer
- Applied Data Scientist
- ML Engineer
π Future Improvements (Optional but Powerful)
- Add logging (
logging) - Add async version (
httpx) - Add more tools (forecast, AQI, etc.)
- Add FastAPI UI
- Add Docker support
- Add unit tests with pytest
π¨βπ» Author
Muthu Selvam
AI & Data Science Enthusiast
Building real-world GenAI projects
