MODEL CONTEXT PROTOCOL
About
Implementation of Anthropic's Model Context Protocol
Details
- Author
- arkapatra31
- Downloads
- 320
- Categories
- Other
Jump to
- Real‑time weather data for any city
- Internet usage statistics by country
- Async API for efficient processing
- MCP‑based protocol for standardized communication
- MongoDB integration for internet usage storage
Install dependencies with Poetry, then create a .env file with your Tavily API key and MongoDB credentials. For weather, configure an MCP client (e.g., Claude Desktop) and search for “Current weather in <city>”. For internet usage, run mcp dev .<entry-point internet-usage> in the project directory.
MODEL CONTEXT PROTOCOL
A service built using the Model Context Protocol (MCP) with FastMCP. This project enables users to query real-time weather information for any city using the Tavily search API, as well as access internet usage data by country.
Setup
Configure Poetry to create virtual environment
poetry config virtualenvs.in-project true
Install dependencies
poetry install
Update dependencies
poetry update --lock
Features
Get current weather information for any city Query internet usage data by country Async API for efficient processing MCP-based protocol for standardized communication MongoDB integration for internet usage dataProject Structure
Weather Service
➡️weather/weather_mcp_server.py: Defines the FastMCP server with a weather tool
➡️weather/weather_tool.py: Contains utility functions for fetching weather data
➡️weather/__init__.py: Entry point that runs the MCP server
Internet Usage Service
➡️internet_usage/internet_mcp_server.py: Defines the FastMCP server for internet usage data
➡️internet_usage/internet_usage_resource.py: Contains resource definitions and MongoDB connection
➡️internet_usage/__init__.py: Entry point for the internet usage service
📃Resources
The internet usage service provides the following resources:
1️⃣list://resources: Lists all available resources
2️⃣internet-usage://{country}: Retrieves internet usage data for a specific country
Create .env file
```
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



