Skip to main content

AEMET API integration with MCP (Model Context Protocol)

Project description

en es

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:

  1. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json
  2. Add the following block inside "mcpServers":
"aemet_mcp_": {
    "command": "uvx",
    "args": [
        "aemet_mcp"
    ],
    "env": {
        "AEMET_API_KEY": "YOUR_AEMET_API_KEY"
    }
}
  1. Get a free API key from AEMET at: https://opendata.aemet.es/centrodedescargas/altaUsuario
  2. Replace YOUR_AEMET_API_KEY with your actual API key (leave the quotes).
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aemet_mcp-0.1.20.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

aemet_mcp-0.1.20-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

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

Hashes for aemet_mcp-0.1.20.tar.gz
Algorithm Hash digest
SHA256 145c262a6eeb4c6cf08e7e93888ba72787499f817daf3d72eae4136c3b29b91f
MD5 d2fb14894e47d08531357e1b0ed0fc00
BLAKE2b-256 ad20a835db1f954b45e2a6aaa502e4e22c90bd59f532df497a4056d4032b846e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aemet_mcp-0.1.20.tar.gz:

Publisher: pypi-publish.yml on AnCode666/aemet-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for aemet_mcp-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 5b09c70bc8d12befb62f6ecf8179c22f3c53f32a905e489831c404839d7e8ea6
MD5 e17fb9359c0bc82a0b6609b5d7d1cee8
BLAKE2b-256 ceb1e3b7511ad97fc5035e24a7f3b4dfcdf6a827a2dc6f0d6773d06c1c8367ab

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page