mcpField
P
Portugal (public data)

Portugal (public data)

Local
thiagolannes.comLegal & Government1Updated today

About Portugal (public data)

Portugal (public data) is a read-only MCP server that gathers tools for querying official and open Portuguese data sources. It covers areas including weather, statistics, Parliament, health, energy, and transport, with answers identifying their source and date; no API key or account is required.

Key features

  1. 01Query weather, warnings, and fire risk
  2. 02Search statistics, economic, and parliamentary data
  3. 03Look up public contracts and open datasets
  4. 04Retrieve public health and medicine information
  5. 05Find fuel prices and EV chargers
  6. 06Check bus and rail timetables

Use cases

  1. 01Check Portuguese weather and fire risk
  2. 02Track unemployment or Euribor changes
  3. 03Find nearby fuel stations or EV chargers
  4. 04Check bus arrivals and direct intercity services

MCP support

This read-only MCP server provides MCP clients with tools for querying Portuguese public data. It supports stdio and can also serve over Streamable HTTP; no API key or account is required.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"thiagojacoblannes-portugal": {
"command": "uvx",
"args": [
"portugal-mcp"
],
"env": {
"PORTUGAL_MCP_FEATURES": "<PORTUGAL_MCP_FEATURES>"
}
}
}
}
Run commanduvx portugal-mcp
Environment variables to set
PORTUGAL_MCP_FEATURESOptional comma list of features to load (e.g. clima,geo,ine) or to drop (-contratos). Default: all.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiportugal-mcp0.2.0

Tools

47

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
latanyNo
lonanyNo
placeanyNo

Details

From the project README

portugal-mcp

CI Live sources PyPI

Portugal's public data for AI assistants, in one MCP server. Ask Claude (or any MCP client) about the weather and warnings, a postal code, unemployment or inflation, the Euribor, what Parliament voted, who won a public contract, how busy the emergency rooms were, whether a medicine is in shortage, the cheapest fuel nearby, when the next train to Porto leaves or how much has burned this fire season.

Read-only, no API keys, no accounts. Every answer comes from an official or public open-data source and says which one and for which date. Not affiliated with any of the sources.

Português: servidor MCP com os dados públicos de Portugal (IPMA, INE, Banco de Portugal, Parlamento, Portal BASE, dados.gov.pt, SNS, Infarmed, DGEG, MOBI.E, Carris Metropolitana, horários da CP, Metro de Lisboa, Carris e Fertagus, incêndios do EFFIS). Só leitura, sem chaves. As ferramentas aceitam perguntas em português.

What it covers

FeatureToolsSource
climaweather_forecast, weather_warnings, fire_risk, sea_forecast, earthquakesIPMA
geopostal_code, where_is, municipality, public_holidaysGeoAPI.pt (CAOP, CTT, INE census); holidays computed from the Labour Code
ineine_search, ine_indicatorINE indicator API
bpstatbpstat_search, bpstat_seriesBanco de Portugal BPstat
parlamentoparliament_search, parliament_initiative, parliament_votes, parliament_deputiesAssembleia da República open data
contratospublic_contracts, public_contracts_summaryIMPIC / Portal BASE
dadosopen_data_search, open_data_dataset, open_data_previewdados.gov.pt
saudesns_find_institutions, sns_emergency_stats, sns_surgery_wait_stats, sns_consultation_wait_stats, sns_search_datasets, sns_query_datasetSNS Transparency portal
medicamentosmedicine_availability, pharmacies, find_medicine_near, medicine_helpInfarmed public pages, pharmacies on duty
energiafuel_prices, fuel_station_detail, fuel_types, ev_chargers, ev_charger_detailDGEG, MOBI.E
transportesbus_find_stops, bus_next_arrivals, bus_line_info, bus_service_alerts, bus_vehicle_positionsCarris Metropolitana API
transittransit_operators, transit_find_stops, transit_departures, transit_trips_betweenOfficial GTFS timetables of CP, Metro de Lisboa, Carris and Fertagus
incendioswildfiresEFFIS (Copernicus, CC BY 4.0)

There are 47 tools in total. If your client struggles with that many, load only what you need with PORTUGAL_MCP_FEATURES (see below).

Things to know
  • Statistics are dated. INE, BPstat and SNS figures are official series with a reference period, often a few months back. Answers quote the period.
  • Health and medicines: information, not advice. SNS figures are monthly statistics, not live emergency-room queues. Per-pharmacy stock is not public in Portugal, so the tools never claim a pharmacy has a medicine. In an emergency call 112; for health advice call SNS 24, 808 24 24 24.
  • Parliament: votes are recorded per parliamentary group, as the Parliament publishes them. The first call downloads about 100 MB (roughly a minute), then it is cached for a day.
  • Public contracts: the yearly BASE files are 15-55 MB, so the first query for a year takes a minute or two. Amounts are contract prices without VAT as reported by the buyer. Tax numbers (NIF) of individual people are hidden; company and public-body NIFs are shown.
  • Fuel / EV: the first EV query loads the national MOBI.E feed (about 80 s), then it is cached.
  • Timetables are scheduled, not live. CP, Metro de Lisboa, Carris and Fertagus publish official GTFS timetables; each is loaded into a local SQLite file on first use (Carris takes about 20 s) and refreshed when the operator publishes a new one. transit_trips_between finds direct services only (no changes). Metro do Porto and STCP do not publish a current official feed.
  • Wildfires are satellite-mapped burnt areas (EFFIS), a day or more after the fact, not live incidents. For today's danger use fire_risk; in an emergency call 112.

Install

Needs Python 3.10+. With uv nothing else is required:

uvx portugal-mcp --list-tools

Or with pip: pip install portugal-mcp.

Claude Code
claude mcp add portugal -- uvx portugal-mcp
Claude Desktop

Add this to claude_desktop_config.json (also in claude_desktop_config.snippet.json):

{
  "mcpServers": {
    "portugal": {
      "command": "uvx",
      "args": ["portugal-mcp"]
    }
  }
}
Codex and other MCP clients

Any client that runs stdio servers works: command uvx, args ["portugal-mcp"]. For HTTP, run portugal-mcp --http, which serves streamable HTTP on 127.0.0.1:8000 (change it with MCP_HOST / MCP_PORT).

Configuration

VariableDefaultWhat it does
PORTUGAL_MCP_FEATURESallComma list of features to load (clima,geo,ine) or to drop (-contratos,-parlamento).
PORTUGAL_MCP_CACHE_DIROS cache dirWhere downloaded files are cached.
PORTUGAL_MCP_LOG_LEVELINFOLog level; logs go to stderr.

portugal-mcp --refresh downloads the large files ahead of time (Parliament, this year's contracts, EV chargers, timetables) and then exits.

Example questions

  • "Vai chover no Porto esta semana? Há avisos?"
  • "Qual é o risco de incêndio hoje em Monchique?"
  • "What's the unemployment rate in Portugal, latest month?"
  • "Como evoluiu a Euribor a 6 meses nos últimos 12 meses?"
  • "O que o Parlamento votou sobre habitação este mês, e como votou cada partido?"
  • "Quais os maiores ajustes diretos de 2026? Quanto a Câmara de Lisboa contratou este ano?"
  • "Preciso de ibuprofeno em Coimbra — está em rutura? Que farmácias estão de serviço?"
  • "Gasóleo mais barato perto de Setúbal" / "Carregadores rápidos perto do Marquês"
  • "Quando passa o próximo autocarro na paragem do Cais do Sodré?"
  • "Comboios diretos de Lisboa Oriente para o Porto amanhã de manhã?" / "Próximo elétrico 28 nos Prazeres?"
  • "Quanta área ardeu este ano no Algarve?"

Development

python -m venv .venv && .venv/bin/pip install -e ".[dev]"
pytest              # offline unit tests (fixtures, no network)
pytest -m live      # hits every real source; CI runs this daily
ruff check .

CONTRIBUTING.md explains how features are laid out and the rules for adding a source. SECURITY.md explains how to report a vulnerability.

Maintenance
  • CI: lint and unit tests on Linux and Windows for every push and pull request, plus pip-audit.
  • Live sources: a daily run against the real APIs that opens an issue when a source changes its format.
  • Dependabot: proposes dependency and GitHub Actions updates. Actions are pinned by commit SHA.
  • Releases: only from a version tag, and only after the tests pass. Publishing goes through PyPI trusted publishing and the official MCP Registry, with no stored tokens.

Replaces

This package merges four earlier servers by the same author, which are now deprecated: sns-portugal-mcp, portugal-medicines-mcp, portugal-fuel-ev-mcp and carris-metropolitana-mcp. Their tools continue here. The SNS, medicine and bus tools now carry a prefix (sns_, medicine_, bus_) so they stay unambiguous among the 47 tools.

License

MIT. The data belongs to its publishers and is used under their open-data terms; please credit them when you reuse it.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.