MCP Weather and Currency Assistant
Enables natural language query interpretation and tool selection through the OpenAI Responses API.
Used for running unit tests on the server's logic without external API dependencies.
Used as the runtime language for the MCP server and client implementation.
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., "@MCP Weather and Currency AssistantConvert 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.
Finance and weather assistant with MCP
Command-line application that combines a local MCP server with the OpenAI Responses API. The assistant understands natural language queries, discovers the tools published by the server, and executes them to query current currency and weather data.
The project integrates FastMCP, ExchangeRate-API and Open-Meteo. It also supports chained calls: for example, it converts a city name into coordinates and then queries its current weather or forecast.
Features
Conversion of amounts between currencies using ISO 4217 codes.
Query exchange rates for a base currency.
Geocoding of cities.
Query current weather and 1 to 7 day forecast.
Automatic discovery of MCP tools by the client.
Interactive terminal interface in Spanish.
Retries on temporary errors when calling OpenAI and network error handling.
Related MCP server: Weather MCP Server
Architecture
Usuario
|
v
CLI (main_client.py)
|
v
Cliente OpenAI Responses <----> Servidor MCP local (FastMCP)
|
+--> ExchangeRate-API
+--> Open-MeteoThe server is exposed via HTTP transport at http://127.0.0.1:8000/mcp/ by default. The client connects to that URL, loads the five available tools, and delivers their results to the model to generate the final response.
MCP Tools
Tool | Description |
| Converts an amount between two currencies using the current rate. |
| Returns the rates of a base currency against a selection of currencies. |
| Gets the coordinates, country, and time zone of a city. |
| Queries temperature, feels-like, humidity, wind, and current weather condition. |
| Returns temperatures, precipitation probability, and weather condition for the upcoming days. |
Requirements
Python 3.10 or higher.
An OpenAI API key with access to the Responses API.
Internet connection to query OpenAI and external APIs.
An ExchangeRate-API key is optional. Without it, its open endpoint is used.
Installation
Clone the repository and create a virtual environment:
git clone <URL_DEL_REPOSITORIO>
cd <NOMBRE_DEL_REPOSITORIO>
python -m venv .venvActivate the virtual environment:
# Windows PowerShell
.venv\Scripts\Activate.ps1
# Windows (cmd)
.venv\Scripts\activate.bat
# macOS/Linux
source .venv/bin/activateInstall the dependencies:
python -m pip install -r requirements.txtConfiguration
Copy the example configuration file and fill in the credentials. The .env file is local and should not be included in the repository:
Copy-Item .env.example .envOn macOS or Linux:
cp .env.example .envThe resulting file must contain these variables:
OPENAI_API_KEY=tu_clave_de_openai
# Opcional. Si se deja vacío se usa el endpoint abierto de ExchangeRate-API.
API_KEY_EXCHANGE=
# Opcionales.
MCP_HOST=127.0.0.1
MCP_PORT=8000
OPENAI_MODEL=gpt-4o-miniOPENAI_API_KEY is required to use the client. Open-Meteo does not require credentials. The application uses a 10-second timeout for external HTTP calls.
Usage
The server and client run in separate terminals. Start the server first:
python main_server.pyIn another terminal, with the virtual environment activated, start the client:
python main_client.pyTests
Unit tests cover currency logic, weather forecast, WMO codes, and error sanitization without calling OpenAI or external APIs:
python -m pip install -r requirements-dev.txt
python -m pytestThen you can write queries like:
Convierte 100 USD a EUR
¿Cuál es el clima actual en Madrid?
Dame la previsión del tiempo para Nueva York durante 5 días
¿Qué coordenadas tiene Tokio?Available CLI commands:
Command | Action |
| Shows the tools and example queries. |
| Shows common currency codes. |
| Closes the client. |
Project structure
.
├── .env.example # Plantilla de configuración local
├── .gitignore # Archivos excluidos del repositorio
├── client/
│ ├── cli_interface.py # Interfaz interactiva de terminal
│ └── openai_client.py # Orquestación OpenAI + MCP
├── config/
│ └── settings.py # Variables de entorno y endpoints
├── server/
│ ├── api_clients.py # Clientes HTTP para las APIs externas
│ ├── currency_tools.py # Herramientas de divisas
│ ├── geocoding_tools.py # Herramienta de geocodificación
│ ├── mcp_server.py # Servidor FastMCP y registro de herramientas
│ └── weather_tools.py # Herramientas meteorológicas
├── main_client.py # Punto de entrada del cliente
├── main_server.py # Punto de entrada del servidor
├── requirements.txt # Dependencias de Python
└── README.mdExternal APIs
OpenAI Responses API: query interpretation and tool selection.
ExchangeRate-API: exchange rates and conversions.
Open-Meteo: geocoding and weather data.
Results depend on the availability, limits, and terms of use of these services. Using OpenAI may incur costs depending on the account and configured model.
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.
Related MCP Servers
- Alicense-qualityDmaintenanceA server that integrates the MCP library with OpenAI's API, allowing users to interact with various tools, such as the weather tool, through natural language queries.MIT
- Flicense-qualityDmaintenanceEnables users to get current weather conditions and forecasts for any city through OpenWeatherMap API integration. Designed as a sample MCP server for the Puch AI Hackathon with basic weather querying capabilities.
- Alicense-qualityDmaintenanceA MCP server for querying real-time weather information for any city worldwide using the free Open-Meteo API, supporting CLI and integration with AI clients like Claude and Cursor.15MIT
- Flicense-qualityCmaintenanceA proof-of-concept MCP server that provides weather information using the Open-Meteo API, with tools for greeting, getting weather by coordinates, and by location name.
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for GLM chat completions using Zhipu AI models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/adri14gl/MCP-Weather-and-Currency-Assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server