Currency-Weather MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Currency-Weather MCP ServerConvert 100 USD to EUR"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Servidor MCP de divisas y clima con cliente OpenAI Responses
Proyecto Python con un servidor MCP basado en FastMCP y un cliente CLI que usa la API Responses de OpenAI para llamar herramientas MCP de conversión de monedas, geocodificación y clima.
Estructura
├── server/
│ ├── __init__.py
│ ├── mcp_server.py
│ ├── currency_tools.py
│ ├── weather_tools.py
│ ├── geocoding_tools.py
│ └── api_clients.py
├── client/
│ ├── __init__.py
│ ├── openai_client.py
│ └── cli_interface.py
├── config/
│ ├── __init__.py
│ └── settings.py
├── main_server.py
├── main_client.py
├── requirements.txt
├── .env.example
└── README.mdRelated MCP server: MCP Weather Server
APIs utilizadas
ExchangeRate-API: conversión de monedas y tasas actuales. Requiere
API_KEY_EXCHANGE.Open-Meteo Forecast API: clima actual y pronóstico. No requiere API key.
Open-Meteo Geocoding API: ciudad a coordenadas. No requiere API key.
Herramientas MCP
convert_currency(amount, from_currency, to_currency)get_exchange_rates(base_currency, target_currencies=None)geocode_city(city_name, count=1, language="es")get_current_weather(latitude, longitude)get_weather_forecast(latitude, longitude, forecast_days=5)
Instalación
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envEn Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .envEditar .env y configurar:
OPENAI_API_KEY=tu_openai_api_key_aqui
API_KEY_EXCHANGE=tu_api_key_exchange_aquiEjecución
Terminal 1:
python main_server.pyEl servidor MCP queda disponible por defecto en:
http://127.0.0.1:8000/mcpTerminal 2:
python main_client.pyUso CLI
Consultas de ejemplo:
Convierte 100 USD a EUR.
¿Cuál es el clima actual en Madrid?
Dame el pronóstico del tiempo para Nueva York.
¿Qué coordenadas tiene Tokio?Comandos especiales:
/salir
/ayuda
/monedasFlujo geocodificación → clima
Para una pregunta como:
¿Cuál es el clima actual en Madrid?El modelo debe llamar de forma secuencial:
geocode_city("Madrid")get_current_weather(latitude, longitude)Responder con temperatura, humedad, viento, descripción y zona horaria.
Para pronóstico:
geocode_city("Nueva York")get_weather_forecast(latitude, longitude, forecast_days=5)Responder con el resumen diario.
Configuración principal
OPENAI_MODEL=gpt-4o-mini
MCP_HOST=127.0.0.1
MCP_PORT=8000
MCP_PATH=/mcp
MCP_PUBLIC_URL=http://127.0.0.1:8000/mcp
API_TIMEOUT_SECONDS=10
API_RETRY_ATTEMPTS=3
DEFAULT_FORECAST_DAYS=5
LOG_LEVEL=INFOMCP_PUBLIC_URL permite indicar la URL que se pasa a OpenAI Responses. Para un entorno local de evaluación se usa http://127.0.0.1:8000/mcp. Si se ejecuta desde un entorno donde OpenAI no pueda alcanzar localhost, debe usarse una URL accesible hacia el servidor MCP local.
Manejo de errores
El proyecto valida:
Cantidades positivas en conversiones.
Códigos de moneda ISO de tres letras incluidos en la lista soportada.
Nombres de ciudad no vacíos y con caracteres válidos.
Latitud entre -90 y 90.
Longitud entre -180 y 180.
Pronóstico entre 1 y 16 días.
También gestiona:
Timeouts HTTP.
Errores de red.
Códigos HTTP inválidos.
Respuestas JSON inválidas.
Errores de API de ExchangeRate-API y Open-Meteo.
Reintentos en llamadas HTTP externas y en OpenAI Responses.
Prueba rápida de herramientas
Con el servidor activo, iniciar el cliente y ejecutar:
¿Qué coordenadas tiene Tokio?Resultado esperado: el modelo llama a geocode_city y devuelve latitud, longitud, país y zona horaria.
Para una conversión:
Convierte 100 USD a EUR.Resultado esperado: el modelo llama a convert_currency y devuelve cantidad convertida, tasa utilizada y actualización de la API.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/albats/mcp-currency-weather-project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server