Skip to main content
Glama

[!IMPORTANT] This is an unofficial community project. It is not affiliated with the data providers (DGEG, IPMA, INE, GeoAPI.pt, AMA/dados.gov.pt). Respect each provider's terms — in particular, DGEG fuel data is for non-commercial use.


What it does

Ask your AI assistant things like:

  • "What's the cheapest diesel station in the Lisbon district?"

  • "Will it rain tomorrow in Porto? Are there active weather warnings?"

  • "Which locality has the postal code 1990-096?"

  • "How many inhabitants did Portugal have in the 2021 Census?"

  • "Search dados.gov.pt for datasets about the environment."

…and it will call the right tool, hit the public API, and answer with real data.

Related MCP server: mcp-servicos-pt

Install

Run it with npx (no install needed) — just point your MCP host at it.

Claude Desktop

Add to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):

{
  "mcpServers": {
    "pt": {
      "command": "npx",
      "args": ["-y", "mcp-pt"]
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (or the project's .cursor/mcp.json):

{
  "mcpServers": {
    "pt": { "command": "npx", "args": ["-y", "mcp-pt"] }
  }
}

Any MCP host

The server speaks MCP over stdio. Launch npx -y mcp-pt (or node dist/index.js from a clone) as the server command.

Tools

Tool

What it does

Source

fuel_prices

Cheapest fuel stations in a district (petrol / diesel / LPG)

DGEG

weather_forecast

5-day forecast for a location

IPMA

weather_warnings

Active meteorological warnings

IPMA

postal_code

Look up a postal code

GeoAPI.pt

reverse_geocode

Coordinate → district / municipality / parish

GeoAPI.pt

municipality

Municipality details

GeoAPI.pt

ine_indicator

Fetch an INE statistics indicator by varcd

INE

open_data_search

Search datasets on dados.gov.pt

dados.gov.pt

All tools call free, public APIs and need no API keys.

Example (raw MCP)

# List the tools over stdio
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"x","version":"0"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' | npx -y mcp-pt

How it relates to the SDKs

mcp-pt is the AI-facing layer over a family of standalone, multi-language SDKs for the same data — precos-combustiveis-pt, ipma-api, geoapi-pt-sdk, ine-pt and dados-gov-pt. The server is self-contained (it calls the APIs directly), so it has no dependency on those packages.

Develop

npm install
npm test        # vitest
npm run build   # tsup → dist/index.js (executable)
node dist/index.js

FAQ

No. Every tool uses a free, public Portuguese API.

No — it's an independent community project. Please respect each provider's terms (DGEG fuel data is non-commercial).

Anything that speaks MCP over stdio — Claude Desktop, Cursor, Continue, and custom clients using the MCP SDK.

License

MIT © Marcelo Domingues

Available Tools

8 tools
fuel_pricesB

Find the cheapest fuel stations in a Portuguese district (data: DGEG). Use for questions about gasolina/gasóleo/GPL prices near a place.

Inputs: district (required), limit, fuelType.

ine_indicatorA

Fetch an INE (Instituto Nacional de Estatística) statistics indicator by its 7-digit code (varcd). Pass dimension selectors (Dim1 is the period; use 'T' for a dimension's total). Example: varcd '0011609', dims { Dim1: 'S7A2021', Dim2: 'PT', Dim3: 'T', Dim4: 'T' }.

Inputs: varcd (required), dims, lang.

municipalityC

Details of a Portuguese municipality (concelho): NIF, area, contacts, postal code (data: GeoAPI.pt).

Inputs: name (required).

postal_codeB

Look up a Portuguese postal code (código postal) — locality, municipality, district and streets (data: GeoAPI.pt).

Inputs: postalCode (required).

reverse_geocodeA

Reverse geocode a coordinate in Portugal → district, municipality and parish (freguesia) (data: GeoAPI.pt).

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

weather_forecastC

5-day weather forecast for a Portuguese location (data: IPMA). Give a city/locality name.

Inputs: location (required).

weather_warningsA

Active meteorological warnings for Portugal (data: IPMA). Returns only non-green (active) warnings.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool addresses a distinct domain (fuel prices, weather, postal codes, geocoding, municipalities, statistics, open data search) with no overlapping purposes, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with descriptive noun_phrase or verb_noun structures (e.g., postal_code, reverse_geocode, open_data_search), ensuring predictability.

    Tool Count5/5

    With 8 tools, the server provides a focused yet comprehensive coverage of Portuguese public data services, avoiding bloat or insufficiency for its intended scope.

    Completeness5/5

    The tool set covers major data categories for Portugal (energy, weather, geography, government, statistics, open data) with no critical gaps; common queries are well-served.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to query Brazilian public data from IBGE, Banco Central, INMET, and Câmara dos Deputados, including population, economic indicators, weather observations, and legislative information, without requiring API keys for most tools.
      14
      3
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      Enables querying Portuguese weather forecasts from IPMA, with tools to list localities and retrieve temperature and weather predictions.
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to query fuel prices at filling stations in mainland Portugal from DGEG data, finding the cheapest nearby stations by place, postal code, coordinates, concelho or district. Also supports station details, regional and national market statistics, and daily national price history.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants to answer questions about Portugal from official open-data sources — weather and warnings, postal codes, INE/BPstat statistics, parliamentary votes, public contracts, SNS health statistics, medicine shortages and duty pharmacies, fuel and EV charging prices, and Lisbon bus arrivals — all read-only with no API keys, citing the source and date of every answer.
      17
      42
      254 PyPI
      2
      MIT