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

smithery badge

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.

AEMET-MCP MCP server

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 from 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 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

mseep_aemet_mcp-0.1.20.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

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

mseep_aemet_mcp-0.1.20-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file mseep_aemet_mcp-0.1.20.tar.gz.

File metadata

  • Download URL: mseep_aemet_mcp-0.1.20.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_aemet_mcp-0.1.20.tar.gz
Algorithm Hash digest
SHA256 df8475cfac40b1d7c9b2bea2cd31aabc5f93cc32ec460ef8f30e1d86f2f57972
MD5 a1a786aed1cf4b8d2529628d849bd68b
BLAKE2b-256 9c969891398d7e91911d08e8d4c345725ef18058ce35ba72574484cb4b1f7fe1

See more details on using hashes here.

File details

Details for the file mseep_aemet_mcp-0.1.20-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_aemet_mcp-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 7bf5631ed8b6c63a5ff674577c6310088aa50243a738eb3fa0004bde9a2ff1c5
MD5 63583856e6e6d3e47ed2ee95464d521c
BLAKE2b-256 81f2bf38b410337ca1d02df6f870b81e455332dc0134e902a73d5aa36c232af6

See more details on using hashes here.

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