Skip to main content

AEMET API integration with MCP (Model Context Protocol)

Project description

AEMET-MCP. Integration via MCP with the AEMET API

en es

DISTRIBUTIONS

Smithery

smithery badge

Glama

AEMET-MCP MCP server

MseeP

MseeP.ai Security Assessment Badge Verified on MseeP

DESCRIPTION

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

Installing via Smithery

To install AEMET Weather Data Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @AnCode666/aemet-mcp --client claude

Install with uv

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 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?"
- `"Give me a list of the beaches in the province of Málaga"`
- "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"
- `"Give me a list of the weather stations within a 50 km radius from the coordinates lat:40.4165, lon:-3.70256"`.

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.2.0.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aemet_mcp-0.2.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file aemet_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: aemet_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 28.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 4dbb3caf3e9af1354466d96f734921b68dc4c16fa84e273f2b254d8910dfe5b4
MD5 a29903651616865f9480e528f7dedfde
BLAKE2b-256 7426990118d2c7e077d0f772394cda7c96437df0d37fc0a522f675b3a847379b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aemet_mcp-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: aemet_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b46c9f88013d5ae0c59944a7eaa45b23bc5977ca7815b7652f20a71b36b75fc3
MD5 52692dfd5c40e098722f0dbc0c3e7e37
BLAKE2b-256 06474ace0d3596f70fefb71d2e613ad2b1f4ce64300e5681a4015759f3b2590c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aemet_mcp-0.2.0-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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page