Skip to main content
Glama

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, de Lisboa, Porto, Coimbra, Braga, Aveiro, Cascais, Barreiro, Algarve e Madeira e da FlixBus, autocarros ao vivo no Porto, Coimbra e Lisboa, cortes de luz programados da E-REDES, registos do Turismo de Portugal (alojamento local, praias com bandeira azul, hotéis), agenda cultural, obras, reciclagem e estado do Metro de Lisboa, condicionamentos de trânsito e sensores do Porto, consumo e falhas de eletricidade, incêndios do EFFIS, ocorrências da Proteção Civil, feriados municipais, Arquivo.pt, resultados eleitorais, albufeiras, Diário da República, estatísticas das escolas, cobertura de fibra e estações dos CTT, áreas protegidas e árvores classificadas). Só leitura, sem chaves. As ferramentas aceitam perguntas em português.

What it covers

Feature

Tools

Source

clima

weather_forecast, weather_warnings, fire_risk, sea_forecast, earthquakes

IPMA

geo

postal_code, where_is, municipality, public_holidays (national, plus a concelho's municipal holiday and the Azores/Madeira regional ones)

GeoAPI.pt (CAOP, CTT, INE census); national holidays computed from the Labour Code, municipal ones from the SAPO holiday service

ine

ine_search, ine_indicator

INE indicator API

bpstat

bpstat_search, bpstat_series

Banco de Portugal BPstat

parlamento

parliament_search, parliament_initiative, parliament_votes, parliament_deputies

Assembleia da República open data

contratos

public_contracts, public_contracts_summary

IMPIC / Portal BASE

dados

open_data_search, open_data_dataset, open_data_preview

dados.gov.pt

saude

sns_find_institutions, sns_emergency_stats, sns_surgery_wait_stats, sns_consultation_wait_stats, sns_search_datasets, sns_query_dataset

SNS Transparency portal

medicamentos

medicine_availability, pharmacies, find_medicine_near, medicine_help

Infarmed public pages, pharmacies on duty

energia

fuel_prices, fuel_station_detail, fuel_types, ev_chargers, ev_charger_detail

DGEG, MOBI.E

transportes

bus_find_stops, bus_next_arrivals, bus_line_info, bus_service_alerts, bus_vehicle_positions

Carris Metropolitana API

transit

transit_operators, transit_find_stops, transit_departures, transit_trips_between, transit_vehicles (live)

Official GTFS timetables of CP, Metro de Lisboa, Carris, Fertagus, Metro do Porto, TUB (Braga), SMTUC and SIT (Coimbra), Busway (Aveiro region), MobiCascais, TCB (Barreiro), Vamus and Próximo (Algarve), Horários do Funchal and the SIGA network (Madeira), and FlixBus coaches (ODbL). Live positions: STCP (Porto urban platform), SMTUC (AGIT), Carris (GTFS-Realtime)

incendios

wildfires

EFFIS (Copernicus, CC BY 4.0)

ocorrencias

active_incidents (live: what civil protection is responding to near a place, closest first; included on the hosted endpoint; a local install needs its own free personal key in FOGOS_API_KEY; police activity is not public)

ANEPC via Fogos.pt (request a key)

eletricidade

power_cuts (planned interruptions by postal code, municipality or parish), electricity_price (day-ahead wholesale price for Portugal, per 15 minutes), electricity_grid (a day's national consumption, peak and wind/solar/hydro generation on the distribution grid), electricity_local (monthly consumption of a municipality or postal area, and how often the power went out there)

E-REDES open data (CC BY 4.0), OMIE (free use, unaltered, source cited)

turismo

local_accommodation (the Alojamento Local register: is it registered, how many on a street), tourism_places (Blue Flag beaches, surf spots, golf, spas, villages, walking routes, Ways of Saint James, marinas, UNESCO sites, hotels)

Turismo de Portugal open data (CC BY 4.0)

lisboa

lisbon_events (the city's cultural agenda), lisbon_street_works (licensed occupations of public space, road and pavement works), lisbon_recycling (nearest ecoponto, vidrão, oleão...), lisbon_metro_status (is each Metro line running normally now)

Agenda Cultural de Lisboa (CC BY), Lisbon open data (CC0 for occupations), Metropolitano de Lisboa line status

arquivo

web_archive_search (full-text search of archived Portuguese websites since 1996), web_archive_history (when an address was captured and how often it changed), web_archive_page (the text of a page as it was on a date)

Arquivo.pt (FCT), API

porto

porto_road_closures (streets with traffic or parking restrictions on a day: works, events, loading, plus unplanned ones such as accidents and burst pipes), porto_sensors (latest air-quality, noise and weather readings of the city's street sensors)

Porto open data (Câmara Municipal do Porto), Porto Digital urban platform (CC0)

eleicoes

election_results (official results of the 2025, 2024 and 2022 legislative, 2025 and 2021 local, 2024 European and 2021 presidential elections, for the country, a district, a municipality or a parish, with the previous election of the same kind)

SGMAI, Ministério da Administração Interna

agua

reservoir_levels (how full mainland reservoirs are per river basin, against the month's historical average and a year before)

APA, SNIRH

diario

diario_republica (what the latest Diário da República issue published, Series I and II, with links)

Diário da República (INCM)

escolas

school_stats (per school, public and private: students, retention or dropout rate, the share finishing on time next to comparable students nationally, and direct-success paths, from the 1st cycle to secondary and vocational)

InfoEscolas, DGEEC

anacom

broadband_coverage (fibre, cable and copper at a place, dated), post_offices (CTT post offices, postal agents and post boxes nearby, with hours, services and last collection)

ANACOM (Fonte: ANACOM)

natureza

protected_areas (is a place in a natural park, reserve, Natura 2000 site, Ramsar wetland or biosphere reserve), notable_trees (classified trees of public interest)

ICNF

There are 72 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. Each operator's official GTFS timetable is loaded into a local SQLite file on first use (up to about a minute) and refreshed when the operator publishes a new one. Outside Lisbon, name the city or region (operator="porto", "coimbra", "madeira"...); without it only CP and the Lisbon operators are searched. When an operator's published timetable has run out, answers carry a warning instead of silently showing nothing. transit_trips_between finds direct services only (no changes). STCP (Porto buses) last published a timetable valid until September 2026, so Porto buses have live positions only (transit_vehicles); no open feeds were found for Viseu, Évora, Leiria, the Azores or the Tagus ferries.

  • Live positions (transit_vehicles) are what the vehicles report, usually under a minute old, not arrival predictions.

  • Power cuts (power_cuts) are the interruptions E-REDES has planned for maintenance, usually for the next two weeks; live faults are not published (call E-REDES, 808 100 100).

  • Local accommodation: the register shows what each owner declared; it does not vouch for an online listing. Owner and operator names of tourist establishments are left out on purpose (many are private individuals).

  • Town-hall data: open_data_search(organization="Lisboa") (or Porto, Cascais, Oeiras, Águeda...) finds that town hall's datasets on dados.gov.pt. Most other towns publish little or nothing.

  • Electricity prices (electricity_price) are OMIE's wholesale day-ahead prices for Portugal in €/MWh, as published (averages and cheapest periods are computed from them). OMIE's download files lag the market by about a day, so today's and tomorrow's prices may only be on omie.es yet. Not the price on a regular bill.

  • Not included: REN Data Hub (its terms forbid reusing its data without consent).

  • 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.

Related MCP server: IPMA MCP Server

Install

No install: the hosted endpoint

A free shared copy runs at https://mcp.thiagolannes.com/portugal (streamable HTTP, no key, no sign-in). In Claude, add it as a custom connector; in Claude Code:

claude mcp add --transport http portugal https://mcp.thiagolannes.com/portugal

It is rate-limited to 60 requests a minute per IP (Claude's own connectors on claude.ai, desktop and mobile all arrive from Anthropic's servers, so those addresses get 600), and it stays awake and refreshes the large files (contracts, Parliament, EV chargers, timetables) in the background before they expire, so answers come in seconds. Only in the first few minutes after a new deploy can a question about one of those files take a minute or two. One known gap: Parliament's site refuses the deputies file to Cloudflare's network, so parliament_deputies only works on a local install (search and votes work on both). For heavy use, run your own copy with uvx as below, or docker build -t portugal-mcp . && docker run -p 8000:8000 portugal-mcp. The hosted copy is non-commercial and stays that way: its live incidents come from Fogos.pt, whose API terms rule out commercial use.

Usage counts, and nothing more. To know whether anyone uses it, the hosted endpoint counts requests anonymously: per day, the MCP method, the tool name, the kind of client (Claude, ChatGPT, Cursor...), the country Cloudflare already knows and whether the call worked. It never stores IP addresses, tool arguments (they can hold a postal code or coordinates), session ids or cookies, and keeps the counts for 400 days. The totals are public at mcp.thiagolannes.com/stats; the code is in deploy/cloudflare/src/usage-core.ts. A local install sends nothing anywhere. Full details, including logs and what the public sources see: PRIVACY.md.

Install locally

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

Variable

Default

What it does

PORTUGAL_MCP_FEATURES

all

Comma list of features to load (clima,geo,ine) or to drop (-contratos,-parlamento).

PORTUGAL_MCP_CACHE_DIR

OS cache dir

Where downloaded files are cached.

PORTUGAL_MCP_LOG_LEVEL

INFO

Log level; logs go to stderr.

PORTUGAL_MCP_MAX_PARALLEL

8

--hosted only: how many tool calls run at once (the large files are still loaded one at a time).

PORTUGAL_MCP_KEEP_WARM_HOURS

0 (off)

--hosted only: download and parse the large files in the background at start and every N hours, one at a time, rebuilding any that would expire before the next pass.

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?"

  • "Próximo metro na Trindade?" / "Autocarros de Coimbra para a Figueira da Foz hoje" / "Onde estão agora os autocarros da linha 500 no Porto?"

  • "Vai haver corte de luz no 2795-082 nas próximas semanas?"

  • "Este alojamento local, 12345/AL, está registado?" / "Praias com bandeira azul em Cascais" / "Spots de surf perto de Peniche"

  • "O que há para fazer em Lisboa este sábado, de graça?" / "Há obras na minha rua em Arroios?" / "Onde fica o oleão mais perto?"

  • "FlixBus de Lisboa para Madrid amanhã"

  • "Quanta área ardeu este ano no Algarve?"

  • "O metro está a funcionar normalmente?" / "Há ruas cortadas perto do 4000-457 hoje?" / "Como está a qualidade do ar no Porto agora?"

  • "Quanta eletricidade Portugal gastou ontem, e quanto foi eólica?" / "Quantas vezes faltou a luz em Sintra no ano passado?"

  • "Quem ganhou a câmara de Sintra nas autárquicas?" / "Como votou Arroios nas legislativas de 2025?"

  • "Como estão as barragens do Algarve?" / "O que saiu hoje no Diário da República sobre IRS?"

  • "Como está a Escola Secundária Pedro Nunes em retenções?" / "Há fibra no 4000-457?" / "Qual a estação dos CTT mais perto e até que horas abre?"

  • "Este terreno em 38.48, -8.98 fica num parque natural?" / "Que árvores classificadas há em Sintra?"

  • "Amanhã é feriado em Braga?" / "Feriados de 2027 no Funchal"

  • "O que dizia o site da Câmara do Porto em 2005?" / "O que o Público escreveu sobre o Orçamento em 2010?"

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.

  • Hosted endpoint: CI builds the container image and checks the Worker on every pull request; deploys are manual (Deploy hosted endpoint workflow).

  • 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.

Available Tools

42 tools
bpstat_seriesAInspect

Observations of Banco de Portugal series (ids from bpstat_search).

Args: series_ids: one or more series ids (max 10), e.g. [12559924]. last_n: latest observations per series (1-500). Ignored when since is given. since: "YYYY-MM-DD" — return every observation from this date. lang: "PT" or "EN".

Inputs: series_ids (required), lang, since, last_n. Returns: object

bus_find_stopsAInspect

Find Carris Metropolitana bus stops by name and/or near a coordinate.

Use this first whenever the user names a place, street, station or gives a location, to get the stop_id needed by bus_next_arrivals. Results include the lines serving each stop.

Args: query: Text to match in the stop name (accent/case-insensitive, all words must match), e.g. "Gare do Oriente", "Cacilhas terminal". A 6-digit stop id also works. lat, lon: A coordinate (WGS84). Results are sorted by straight-line distance from it. Note: buses inside Lisbon city are mostly run by Carris (a different company, not covered here); Carris Metropolitana serves the wider region. radius_m: Only stops within this many metres of lat/lon. Default 500 when no query is given; unlimited when a query is given. limit: Max stops to return (default 10, max 50).

Inputs: lat, lon, limit, query, +1 more. Returns: object

bus_line_infoAInspect

Details of a Carris Metropolitana line: name, route ends, directions, municipalities.

Use for "where does line 4715 go?", "which bus goes from Cacilhas to Almada?", or to check whether a line passes a stop (include_stops=True). If line is not an exact line number it is treated as text (e.g. "Oriente Setubal") and the matching lines are listed instead. trips_today = 0 means the line does not run today (some lines are seasonal or weekday-only). Departure times past midnight are written "24:30", "25:10" (same service day).

Args: line: 4-digit line number ("4715") or free text matched against line names. include_stops: Also list every stop (id + name) in order for each direction.

Inputs: line (required), include_stops. Returns: object

bus_next_arrivalsAInspect

Upcoming buses at a Carris Metropolitana stop, real-time where available.

Use for "when is the next bus at X?" (get stop_id from bus_find_stops first). Each arrival says whether it is "realtime" (live GPS estimate) or "scheduled" (timetable only: the bus may not have started its trip yet). minutes_from_now uses the real-time estimate when present. Times are Europe/Lisbon. Only today's operational day is covered, so late at night the list may be short or empty.

Args: stop_id: 6-digit stop id, e.g. "060361". line_id: Optional 4-digit line number to keep only that line, e.g. "2794". limit: Max arrivals to return (default 10, max 50).

Inputs: stop_id (required), limit, line_id. Returns: object

bus_service_alertsAInspect

Service alerts (detours, works, strikes, stops not served) for Carris Metropolitana.

Use before recommending a trip, or when the user asks "is line X disrupted?". Filter by line and/or stop; with no filter, returns all current alerts (there are often ~100). Alerts are mostly published in Portuguese only.

Args: line_id: 4-digit line number, e.g. "4407". stop_id: 6-digit stop id, e.g. "160584". include_upcoming: Also return alerts that start in the future (default True). language: Preferred language ("pt" or "en"); falls back to what exists. limit: Max alerts to return (default 20, max 100).

Inputs: limit, line_id, stop_id, language, +1 more. Returns: object

bus_vehicle_positionsAInspect

Live GPS positions of the buses currently running on a Carris Metropolitana line.

Use for "where is the 3508 right now?" or to see how many buses are out on a line. Each vehicle includes its position, heading, speed, the stop it is at / heading to, and how many seconds old the fix is.

Args: line_id: 4-digit line number, e.g. "3508".

Inputs: line_id (required). Returns: object

earthquakesAInspect

Recent earthquakes recorded by IPMA.

Args: region: "mainland" (mainland Portugal and Madeira) or "azores". days: look back this many days (max 30). min_magnitude: only quakes at or above this magnitude. limit: max rows (newest first).

Inputs: days, limit, region, min_magnitude. Returns: object

ev_charger_detailAInspect

Everything about one MOBI.E charging site: all its points with live status, power, connectors and price, plus operator contact, opening hours and accepted authentication (app, RFID card, credit card...).

Use after ev_chargers. Accepts a site_id (e.g. "EZC-AMD-00051"), a point_id (e.g. "AMD-00051-1") or an EVSE id (e.g. "PTEZCEAMD00051*1").

Inputs: site_or_point_id (required). Returns: object

ev_chargersAInspect

Public EV charging sites near a point in Portugal (MOBI.E network), nearest first, with live status and the price the network publishes for each charging point.

Use for "where can I charge near X?", "fast chargers near me", "is there a free CCS charger nearby?". Needs coordinates; if the user gives a place name, use known coordinates for it. Covers mainland Portugal, Azores and Madeira.

Args: lat, lon: Point to search around (WGS84). radius_km: Search radius (default 5, max 100). min_power_kw: Only points that can deliver at least this power, e.g. 50 for fast DC. connector: "CCS" (CCS2), "Type 2", "CHAdeMO", "CEE", or "DC" / "AC". available_only: Only points whose live status is "available" right now. limit: Max sites to return (default 10, max 50).

Each site: operator, address, distance_km, opening hours and its matching points, each with status (available, in use, out of order...), max power, connectors and price (per_kwh / per_minute / per_session in EUR, from the feed). IMPORTANT: these are the charging operator's published fees and may not be the whole bill: see price_note and tell the user. data_freshness says how old the inventory and live status are. The first call of the day downloads ~220 MB from MOBI.E and can take 1-3 minutes.

Inputs: lat (required), lon (required), limit, connector, +3 more. Returns: object

find_medicine_nearAInspect

One-shot answer to "I need medicine X in city Y — what do I do?" in Portugal.

Runs medicine_availability(medicine) and pharmacies(city or lat/lon), and returns: the shortage status (compact), the pharmacies on duty today and the ones open now (nearest first when lat/lon are given), the help lines (Linha 1400, SNS 24, 112) and next steps. It never says a pharmacy has the medicine: stock is not public.

Args: medicine: Brand name or active substance, e.g. "quetiapina", "Brufen 400". city: Municipality or town, e.g. "Lisboa". Or give lat/lon instead. lat, lon: Optional user position (sorts pharmacies by distance). limit: Max pharmacies returned (default 8).

Inputs: medicine (required), lat, lon, city, +1 more. Returns: object

fire_riskAInspect

Wildfire danger (RCM, risco de incêndio rural) for a municipality, today or tomorrow.

Args: municipality: concelho name, e.g. "Sintra", "Monchique". day: 0 = today, 1 = tomorrow. Scale: 1 reduzido, 2 moderado, 3 elevado, 4 muito elevado, 5 máximo.

Inputs: municipality (required), day. Returns: object

fuel_pricesAInspect

Cheapest fuel stations in Portugal for one fuel type, cheapest first (official DGEG prices).

Use for "where is diesel/petrol/LPG cheapest in Lisboa / near me / in Braga?". Give an area as a district, a municipality, or a point (lat + lon, with radius_km); with no area it searches all of Portugal. Names are case- and accent-insensitive ("evora" works).

Args: fuel_type: A DGEG fuel name or id, e.g. "Gasóleo simples" (regular diesel, 2101), "Gasolina simples 95" (regular 95 petrol, 3201), "Gasolina 98", "GPL Auto" (LPG), or plain words: "diesel", "petrol", "95", "98", "lpg", "cng". See fuel_types() for the full list. district: Portuguese district, e.g. "Lisboa", "Porto", "Faro". municipality: Municipality (concelho), e.g. "Sintra", "Vila Nova de Gaia". Overrides district. lat, lon: A point (WGS84). Results get distance_km and are limited to radius_km. radius_km: Search radius around lat/lon (default 10). brand: Only this brand (substring match), e.g. "Galp", "Prio", "Intermarché". limit: How many stations to return (default 10, max 50).

Each station: price_eur (per litre, or per kg/m3 for gas), brand, name, address, municipality, distance_km (with lat/lon), coordinates and last_update (the station's last price update). Also returns how many stations matched and the min/median/max price. Always mention the source (DGEG) and the last_update when quoting prices.

Inputs: fuel_type (required), lat, lon, brand, +4 more. Returns: object

fuel_station_detailAInspect

Full details of one fuel station: every fuel it sells with price and last update, opening hours, services (car wash, shop, tyre air...) and payment methods.

Use after fuel_prices, with a station id from its results.

Inputs: station_id (required). Returns: object

fuel_typesAInspect

List DGEG fuel types (id, name, unit) and the districts accepted by fuel_prices.

Only needed when unsure which fuel name to pass; fuel_prices also understands "diesel", "petrol", "95", "98", "lpg".

Inputs: no named parameters. Returns: object

ine_indicatorAInspect

Values of an INE indicator, latest periods first.

Args: varcd: 7-digit indicator code from ine_search, e.g. "0008074". place: geography name to keep, e.g. "Portugal", "Lisboa", "Norte", "Porto". Default: "Portugal" when present, otherwise all geographies. periods: how many of the latest reference periods to return (1-24). category: keep only rows whose category labels contain this text (e.g. "Total", "Mulheres"). lang: "PT" or "EN". limit: max rows.

Inputs: varcd (required), lang, limit, place, +2 more. Returns: object

medicine_availabilityAInspect

Is a medicine in shortage in Portugal? Checks Infarmed's published availability information.

Use when someone can't find a medicine, or asks whether X is in shortage ("rutura", "esgotado", "falta"). Searches by brand or active substance (Portuguese names work best, e.g. "quetiapina", "Ozempic", "ácido acetilsalicílico"; dose and form narrow it, e.g. "quetiapina 300 mg libertação prolongada").

Checks, all from www.infarmed.pt (latest versions are found automatically):

  • shortages Infarmed is actively monitoring (with its circulars and advice);

  • the monthly list of medicines whose export is temporarily suspended because of shortage / supply risk in Portugal;

  • the quarterly prior-notification list (LNP) of medicines with availability concerns.

status is one or more of: monitored_shortage, export_suspended, prior_notification, no_issue_in_published_lists. "No issue" does not prove the medicine is available: Infarmed's full shortage search is not queried (see not_checked).

Args: medicine: Brand name or active substance, optionally with strength/form. limit: Max rows returned per list (default 15).

Inputs: medicine (required), limit. Returns: object

medicine_helpAInspect

Verified help lines in Portugal for medicine problems: 112, SNS 24, Linha 1400, Infarmed.

Use when someone can't find a medicine, needs urgent advice, or asks who to call. Each line has its number, what it is for, hours where published, and the page it was checked on.

Inputs: no named parameters. Returns: object

municipalityCInspect

A municipality (concelho): district, INE code, area, parishes, 2021 census, town-hall contacts.

Inputs: name (required). Returns: object

open_data_datasetAInspect

Details and downloadable files of one dados.gov.pt dataset (id or slug from open_data_search).

Inputs: dataset (required). Returns: object

open_data_previewAInspect

First rows of a CSV or JSON file hosted on dados.gov.pt (reads at most 512 KB).

Args: url: a resource url from open_data_dataset (must be on dados.gov.pt). rows: how many rows to return (1-100).

Inputs: url (required), rows. Returns: object

parliament_deputiesBInspect

Members of Parliament (deputados): party, constituency (círculo), status. Seats per party included.

Args: name: part of the parliamentary or full name. party: group acronym, e.g. "PSD", "PS", "CH". constituency: e.g. "Lisboa", "Porto", "Açores", "Europa". include_inactive: also list deputies who left or were replaced. Default false.

Inputs: name, limit, party, legislature, +2 more. Returns: object

parliament_initiativeAInspect

Full record of one initiative: every phase with dates, every vote with each group's position, text link.

Args: initiative_id: the id from parliament_search (e.g. "356403"), or a reference like "Proposta de Lei 3".

Inputs: initiative_id (required), legislature. Returns: object

parliament_votesBInspect

Recent plenary votes, with how each parliamentary group voted.

Args: party: show this group's position on each vote (e.g. "PS", "CH"); only votes where it is recorded. query: words in the initiative title. since: "YYYY-MM-DD". result: "aprovado" or "rejeitado". limit: max votes, newest first.

Inputs: limit, party, query, since, +2 more. Returns: object

pharmaciesAInspect

Pharmacies in a Portuguese municipality, with which ones are on duty today and open now.

Use for "farmácia de serviço em X", "pharmacy open now near me", or to list pharmacies to call. Each pharmacy has name, address, phone, coordinates, today's hours, open_now, on_duty (official duty roster for the duty day 09:00-09:00) and the duty type (e.g. "Permanente - Aberta 24h"). Results are sorted: on duty first, then open now, then distance (when lat/lon are given). Stock is not public: never say a pharmacy has a medicine.

Args: city: Municipality or town/parish, e.g. "Lisboa", "Porto", "Cascais", "Alvalade, Lisboa" (add ", " to disambiguate a town). lat, lon: Optional user position: adds distance_km and allows radius_km. With no city, the municipality is found from the coordinate. radius_km: Keep only pharmacies within this distance of lat/lon. on_duty_only: Only pharmacies on the duty roster today. open_now_only: Only pharmacies open right now. limit: Max pharmacies returned (default 20, max 100).

Inputs: lat, lon, city, limit, +3 more. Returns: object

postal_codeAInspect

Look up a Portuguese postal code (código postal, 'XXXX-XXX' or 'XXXX').

Returns district, municipality, locality and the streets the code covers, plus a central point.

Inputs: code (required). Returns: object

public_contractsAInspect

Search Portuguese public contracts (Portal BASE) for one year.

Args: query: words in the contract object, e.g. "software", "limpeza", "ambulâncias". buyer: public body name or 9-digit NIF, e.g. "Município de Lisboa", "SPMS". supplier: company name or NIF. procedure: e.g. "Ajuste Direto", "Concurso público", "Consulta Prévia". min_value, max_value: contract price range in euros. year: contract-file year (default: this year; 2012 onwards). sort: "value" (largest first) or "date" (newest first). limit: max rows.

Inputs: sort, year, buyer, limit, +5 more. Returns: object

public_contracts_summaryAInspect

Totals for one buyer or supplier in a year: number of contracts, total value, by procedure, top partners.

Args: entity: name or 9-digit NIF of a public body or a company. role: "buyer", "supplier" or "any". year: default this year. top: how many top counterparties to list.

Inputs: entity (required), top, role, year. Returns: object

public_holidaysAInspect

Portugal's national public holidays for a year (default: this year), with weekday.

Carnival is listed as optional: it is usually a day off by government decision, not by law. Municipal holidays (one per concelho, e.g. Lisbon 13 June, Porto 24 June) are not included.

Inputs: year, upcoming_only. Returns: object

sea_forecastAInspect

Coastal sea forecast: wave height and period, wave direction, sea temperature (IPMA).

Args: place: coastal spot, e.g. "Nazaré", "Peniche", "Faro", "Funchal". Or pass lat/lon for the nearest one. day: 0 = today, 1 = tomorrow, 2 = the day after.

Inputs: day, lat, lon, place. Returns: object

sns_consultation_wait_statsAInspect

Hospital outpatient consultations per month and the % of FIRST specialist consultations (referred by a family doctor via CTH/SIGA) held within the guaranteed maximum time (TMRG).

Use for "how long is the wait for a first hospital appointment at X?", "is hospital Y on time with first consultations?", "how many consultations did the Centro region do?". Official monthly statistics (latest month usually 2-3 months back, provisional); there is no breakdown by specialty in the open data.

Per period (latest first): consultations_in_month / _year_to_date (total, first, subsequent) and first_consultations_within_max_time_pct for the month and year-to-date.

Args: institution: Hospital or ULS name; mapped to its ULS. region: Norte | Centro | LVT (Lisboa) | Alentejo | Algarve. Ignored if institution is given. period: Latest month to include, "YYYY-MM" (default: newest available). months: How many months back (default 6, max 24).

Inputs: months, period, region, institution. Returns: object

sns_emergency_statsAInspect

Emergency-department (urgência) visits per month: by type and by Manchester triage colour.

Use for "how busy is the ER at X?", "how many emergency visits in the Algarve last month?", "what share of ER visits are green/blue (non-urgent)?". OFFICIAL MONTHLY STATISTICS ONLY — not the live queue (the latest month is usually 2-3 months back and provisional). For live waiting times send the user to https://tempos.min-saude.pt. Not medical advice: in an emergency call 112; SNS 24 (808 24 24 24) for advice.

Scope: one institution, one region, or (neither) all of mainland Portugal's SNS hospitals.

Per period (latest first): visits_in_month and visits_year_to_date by type (general, paediatric, obstetric, psychiatric, total), triage_in_month by colour (red = immediate, orange = very urgent, yellow = urgent, green = less urgent, blue = non-urgent, white = not clinical / other) and triage_share_in_month_pct.

Args: institution: Hospital or ULS name, accent-insensitive ("Santa Maria", "São João", "Hospital de Faro"). A hospital is mapped to its ULS; check scope. region: Norte | Centro | LVT (Lisboa) | Alentejo | Algarve. Ignored if institution is given. period: Latest month to include, "YYYY-MM" (default: newest available). months: How many months back to return (default 6, max 24).

Inputs: months, period, region, institution. Returns: object

sns_find_institutionsAInspect

Find SNS hospitals / local health units (ULS) by name, or the nearest ones to a coordinate.

Use this first when the user names a hospital or a place ("hospitals near Lisbon", "is there an emergency department near 38.72,-9.14?"), then pass stats_entity to sns_emergency_stats / sns_surgery_wait_stats / sns_consultation_wait_stats.

Each result: name, its parent ULS, coordinates, distance_km (when lat/lon given), whether it reports emergency / consultation / surgery data on tempos.min-saude.pt, and stats_entity — the name under which the official statistics report it (statistics are per ULS / hospital group, not per building). This list does NOT contain live waiting times; for live emergency waits send the user to https://tempos.min-saude.pt.

Args: query: Part of the name, accent-insensitive, e.g. "Santa Maria", "Faro", "ULS Algarve". lat, lon: Sort by distance from this point (WGS84), e.g. Lisbon 38.7223, -9.1393. Without query, umbrella ULS entries are skipped (they duplicate a hospital's location). emergency_only: Only places that report emergency-department data. limit: Max results (default 10, max 50).

Inputs: lat, lon, limit, query, +1 more. Returns: object

sns_query_datasetAInspect

Run an ODSQL query on any SNS Transparency portal dataset (Opendatasoft Explore API v2.1).

Use after sns_search_datasets for anything the curated tools don't cover. Clauses are ODSQL:

  • where: instituicao like "santa maria" and tempo >= date'2026-01-01' (like is a case- and accent-insensitive "contains"; dates use date'YYYY-MM-DD')

  • select: tempo, instituicao, total_urgencias or aggregates sum(total_urgencias) as total

  • group_by: regiao or tempo (combine with aggregates in select)

  • order_by: tempo desc Most hospital-activity datasets (field tempo, monthly) store YEAR-TO-DATE CUMULATIVE values: December is the annual total; a single month = this month minus the previous one. Many datasets have a regiao and an instituicao (or entidade) field. Official statistics, not live data.

Args: dataset_id: e.g. "ocupacao-do-internamento" (from sns_search_datasets). where, select, group_by, order_by: ODSQL clauses (optional). limit: Rows to return (default 20, max 100). offset: Skip rows, for paging.

Inputs: dataset_id (required), limit, where, offset, +3 more. Returns: object

sns_search_datasetsAInspect

Search the ~150 datasets of the SNS Transparency portal (titles and descriptions are in Portuguese).

Use when the curated tools don't cover the question — e.g. hospital bed occupancy ("ocupação"), births/caesareans ("partos"), INEM pre-hospital calls, SNS 24 calls, family doctor coverage ("médico de família", "inscritos"), medicines spending, staff ("trabalhadores"), cancer screening ("rastreios"). Then call sns_query_dataset with the dataset_id and the field names returned here. Portuguese keywords work best; matching is accent-insensitive.

Args: query: Keywords, e.g. "ocupação internamento", "partos", "urgência". Empty = list all (id + title). limit: Max results (default 10, max 50; ignored when listing all).

Inputs: limit, query. Returns: object

sns_surgery_wait_statsAInspect

Surgery access indicators per month: surgical waiting list, % within the guaranteed maximum time, mean days from admission to surgery, and surgeries performed.

Use for "how long is the wait for surgery at X?", "how many people are on the surgery list in the Norte region?", "how many operations did hospital Y do?". Official monthly statistics (latest month usually 2-3 months back, provisional). The open data has NO breakdown by specialty or procedure — say so if asked for one.

Per period (latest first):

  • waiting_list: patients on the surgical waiting list (LIC) at month end, how many are still within the legal maximum guaranteed response time (TMRG, 180 days for normal priority since 2018) and the % within it.

  • mean_days_before_surgery_in_month / _year_to_date: average days between hospital admission and the operation for scheduled inpatient surgery (this is NOT the time on the waiting list).

  • surgeries_in_month / surgeries_year_to_date: scheduled (= inpatient + day surgery) and urgent.

Args: institution: Hospital or ULS name ("Santa Maria", "Coimbra", "IPO Porto"); mapped to its ULS. region: Norte | Centro | LVT (Lisboa) | Alentejo | Algarve. Ignored if institution is given. period: Latest month to include, "YYYY-MM" (default: newest available). months: How many months back (default 6, max 24).

Inputs: months, period, region, institution. Returns: object

weather_forecastAInspect

5-day weather forecast for a place in Portugal (IPMA, official).

Args: place: district capital or island town, e.g. "Lisboa", "Porto", "Faro", "Funchal", "Ponta Delgada". lat, lon: use instead of place for anywhere else; the nearest IPMA forecast location is used. Returns daily min/max temperature, rain probability, weather type, wind, and today's UV index.

Inputs: lat, lon, place. Returns: object

weather_warningsAInspect

Active IPMA weather warnings (rain, wind, heat, cold, snow, fog, sea, thunderstorms).

Args: area: optional district or island group, e.g. "Lisboa", "Madeira", "Açores". Omit for the whole country. include_green: also list green (no-warning) entries. Default false.

Inputs: area, include_green. Returns: object

where_isAInspect

Which parish, municipality and district a coordinate is in, plus altitude, land use and hazard maps.

Inputs: lat (required), lon (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 42 tools

    Disambiguation4/5

    Most tools are partitioned by source/domain and action, such as search vs detail vs summary, and the descriptions make boundaries clear. The main overlaps are around medicines (medicine_help, medicine_availability, find_medicine_near, pharmacies) and the two dataset-search families, but they are still distinguishable.

    Naming Consistency4/5

    All names use snake_case and most follow consistent domain prefixes such as sns_, parliament_, public_contracts_, fuel_, ev_, and bus_. A few noun-only names (earthquakes, pharmacies, municipality) and singular/plural detail naming slightly break a strict verb_noun pattern, but the set remains predictable.

    Tool Count2/5

    At 42 tools, the surface is well above the 3-15 well-scoped range and crosses the 25+ threshold for being too many. The server spans many unrelated Portugal public-service domains, and while each cluster is individually coherent, the total tool count is heavy and some composite/one-shot tools add extra surface area.

    Completeness3/5

    Covered domains generally have search-to-detail or lifecycle coverage, such as INE/BPstat, parliament, public contracts, SNS statistics, fuel, EV charging, and buses. However, there are notable gaps: no general address/place geocoding despite many lat/lon-based tools, transport coverage is limited to Carris Metropolitana, and municipal holidays are explicitly excluded.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides access to Portuguese weather data from IPMA (Instituto Português do Mar e da Atmosfera), including weather forecasts, meteorological warnings, seismic data, UV index, and real-time observations from weather stations across Portugal.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables querying Portugal's national open data portal (dados.gov.pt) through natural language.
      70 npm
      MIT