convez.ai
MCP ServerIntegração & APIsIntermediário
arkapatra31

Model Context Protocol - Servidor MCP

arkapatra31/model-context-protocol

Servidor MCP para dados meteorológicos e estatísticas de internet

Ver no GitHub
InicialPluginScore · de 0 a 100

Implementação do Model Context Protocol (MCP) da Anthropic usando FastMCP em Python. Fornece dois serviços principais: consulta de dados meteorológicos em tempo real via API Tavily e acesso a dados de uso de internet por país via MongoDB. Permite integração padronizada com clientes MCP como Claude Desktop.

Instalação

$npx convez-ai arkapatra31/model-context-protocol

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
1
Saúde
42%
Último commit
há 8 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Integrar consultas de clima em tempo real em aplicações Claude
  • Acessar dados de uso de internet global via recursos MCP
  • Construir agentes MCP que combinam múltiplas fontes de dados

Veredito

Implementação prática do MCP com dois casos de uso reais (clima e dados de internet). Bem estruturado e documentado, serve como bom exemplo para quem quer entender como construir servidores MCP em Python com FastMCP.

README

A tradução para o português deste README ainda está na fila.

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>
Ver o original no GitHub

Bom para

Relacionados