MCP cover image
See in Github
2025-04-02

Implementation of Anthropic's Model Context Protocol

1

Github Watches

0

Github Forks

0

Github Stars

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 data

Project 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

# Weather service
TAVILY_API_KEY=your_tavily_api_key_here

# Internet usage service
MONGODB_URI=your_mongodb_connection_string
MONGO_DB_NAME=your_database_name
MONGO_DB_COLLECTION=your_collection_name

Usage

Weather Service

1. Create the MCP server configuration
2. From a MCP Client (Claude Desktop), search for Current weather in <city_name>

Internet Usage Service

1. Create the MCP server configuration
mcp dev .<entry-point internet-usage>

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • modelcontextprotocol
  • Model Context Protocol Servers

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

    Reviews

    3 (1)
    Avatar
    user_Y38dN837
    2025-04-16

    As a dedicated user of the model-context-protocol (MCP), I am thoroughly impressed with its remarkable capabilities. Developed by arkapatra31, this protocol offers a seamless approach to managing model contexts in various applications. Its user-friendly interface and robust performance stand out, making it an invaluable tool for any developer. For more information, visit the official repository at https://github.com/arkapatra31/model-context-protocol and discover the potential of MCP!