AEMET API integration with MCP (Model Context Protocol)
Project description
AEMET-MCP. Integration via MCP with the AEMET API
AEMET is the State Meteorological Agency of Spain.
Aemet-mcp allows you to retrieve historical climate data and meteorological information from the AEMET API directly from Claude AI and other MCP compatible clients, using the Model Context Protocol (MCP).
Aemet-mcp is an MCP server that exposes tools enabling LLMs to query data from weather stations across Spain.
It includes secure handling of API keys and resource JSON files for using supporting data.
Key Features
- Query for historical daily values (temperature, wind, precipitation, etc.)
- Access to monthly climate summaries by station.
- Filtering by year, month, and AEMET station code.
- Query beach conditions, including ultraviolet radiation indices.
- Responses ready for use in JSON format.
Installation
Prerequisites
- Python 3.10 or higher.
- uv package manager.
Installing uv
The first step is to install uv
, a package manager for Python.
It can be installed from the command line.
On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
On Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
You can also install it with pip:
pip install uv
For more information about installing uv, visit the uv documentation.
Integration with clients like Claude for Desktop
Once uv is installed, you can use the MCP server from any compatible client such as Claude for Desktop, in which case the steps to follow are:
- Go to Claude > Settings > Developer > Edit Config >
claude_desktop_config.json
- Add the following block inside
"mcpServers"
:
"aemet_mcp_": {
"command": "uvx",
"args": [
"aemet_mcp"
],
"env": {
"AEMET_API_KEY": "YOUR_AEMET_API_KEY"
}
}
- Get a free API key from AEMET at: https://opendata.aemet.es/centrodedescargas/altaUsuario
- Replace
YOUR_AEMET_API_KEY
with your actual API key (leave the quotes). - If you already have another MCP server configured, separate each with a comma
,
.
In general, to integrate it into any other MCP-compatible client such as Cursor, CODEGPT, or Roo Code, simply go to the MCP server configuration of your client and add the same code block.
Usage Examples
Once properly configured, you can ask things like:
- "What's the weather like in Seville?"
- "Tell me the radiation levels at Maspalomas beach for tomorrow"
- "Give me the historical rainfall data for Albacete between January 1st, 2020 and February 1st, 2020"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aemet_mcp-0.1.20.tar.gz
.
File metadata
- Download URL: aemet_mcp-0.1.20.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145c262a6eeb4c6cf08e7e93888ba72787499f817daf3d72eae4136c3b29b91f |
|
MD5 | d2fb14894e47d08531357e1b0ed0fc00 |
|
BLAKE2b-256 | ad20a835db1f954b45e2a6aaa502e4e22c90bd59f532df497a4056d4032b846e |
Provenance
The following attestation bundles were made for aemet_mcp-0.1.20.tar.gz
:
Publisher:
pypi-publish.yml
on AnCode666/aemet-mcp
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
aemet_mcp-0.1.20.tar.gz
- Subject digest:
145c262a6eeb4c6cf08e7e93888ba72787499f817daf3d72eae4136c3b29b91f
- Sigstore transparency entry: 199603337
- Sigstore integration time:
- Permalink:
AnCode666/aemet-mcp@5a1f40da63fd8bb4917c949d17016db6d11f8a96
- Branch / Tag:
refs/tags/v0.1.20
- Owner: https://github.com/AnCode666
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
pypi-publish.yml@5a1f40da63fd8bb4917c949d17016db6d11f8a96
- Trigger Event:
release
- Statement type:
File details
Details for the file aemet_mcp-0.1.20-py3-none-any.whl
.
File metadata
- Download URL: aemet_mcp-0.1.20-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b09c70bc8d12befb62f6ecf8179c22f3c53f32a905e489831c404839d7e8ea6 |
|
MD5 | e17fb9359c0bc82a0b6609b5d7d1cee8 |
|
BLAKE2b-256 | ceb1e3b7511ad97fc5035e24a7f3b4dfcdf6a827a2dc6f0d6773d06c1c8367ab |
Provenance
The following attestation bundles were made for aemet_mcp-0.1.20-py3-none-any.whl
:
Publisher:
pypi-publish.yml
on AnCode666/aemet-mcp
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
aemet_mcp-0.1.20-py3-none-any.whl
- Subject digest:
5b09c70bc8d12befb62f6ecf8179c22f3c53f32a905e489831c404839d7e8ea6
- Sigstore transparency entry: 199603340
- Sigstore integration time:
- Permalink:
AnCode666/aemet-mcp@5a1f40da63fd8bb4917c949d17016db6d11f8a96
- Branch / Tag:
refs/tags/v0.1.20
- Owner: https://github.com/AnCode666
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
pypi-publish.yml@5a1f40da63fd8bb4917c949d17016db6d11f8a96
- Trigger Event:
release
- Statement type: