mcp-pt
[!重要] 这是一个非官方社区项目。与数据提供方(DGEG、IPMA、INE、GeoAPI.pt、AMA/dados.gov.pt)无关。请遵守各提供方的条款——特别是DGEG燃油数据仅限非商业用途。
功能
向您的AI助手提问,例如:
"里斯本区最便宜的柴油加油站是哪家?"
"明天波尔图会下雨吗?有空闲气象预警吗?"
"邮政编码1990-096对应哪个地点?"
"2021年人口普查中葡萄牙有多少居民?"
"在dados.gov.pt上搜索关于环境的数据集。"
……它将调用正确的工具,访问公共API,并用真实数据回答。
Related MCP server: mcp-servicos-pt
安装
用 npx 运行(无需安装)——只需将MCP主机指向它即可。
Claude Desktop
添加到 claude_desktop_config.json(macOS上为 ~/Library/Application Support/Claude/,Windows上为 %APPDATA%\Claude\):
{
"mcpServers": {
"pt": {
"command": "npx",
"args": ["-y", "mcp-pt"]
}
}
}Cursor
添加到 ~/.cursor/mcp.json(或项目的 .cursor/mcp.json):
{
"mcpServers": {
"pt": { "command": "npx", "args": ["-y", "mcp-pt"] }
}
}任意MCP主机
该服务器通过 stdio 协议进行MCP通信。启动 npx -y mcp-pt(或从克隆仓库中 node dist/index.js)作为服务器命令。
工具
工具 | 功能 | 数据来源 |
| 某区最便宜的加油站(汽油/柴油/液化石油气) | DGEG |
| 某地未来5天天气预报 | IPMA |
| 活跃的气象预警 | IPMA |
| 查询邮政编码 | GeoAPI.pt |
| 坐标 → 区/市/教区 | GeoAPI.pt |
| 市(concelho)详细信息 | GeoAPI.pt |
| 通过 | INE |
| 在dados.gov.pt上搜索数据集 | dados.gov.pt |
所有工具都调用免费的公共API,无需API密钥。
示例(原始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与SDK的关系
mcp-pt 是一系列独立的、多语言SDK的AI层,这些SDK针对相同的数据——precos-combustiveis-pt、
ipma-api、
geoapi-pt-sdk、
ine-pt 和
dados-gov-pt。该服务器是自包含的(直接调用API),因此不依赖这些包。
开发
npm install
npm test # vitest
npm run build # tsup → dist/index.js (executable)
node dist/index.js常见问题
不需要。每个工具都使用免费的葡萄牙公共API。
没有——这是一个独立的社区项目。请遵守各提供方的条款(DGEG燃油数据仅供非商业用途)。
任何通过stdio支持MCP的客户端——Claude Desktop、Cursor、Continue,以及使用MCP SDK的自定义客户端。
许可证
MIT © Marcelo Domingues
Available Tools
8 toolsfuel_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).
open_data_searchA
Search the Portuguese open-data portal dados.gov.pt for datasets by keyword (data: dados.gov.pt / uData).
Inputs: query (required), pageSize.
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
Scored across 8 tools
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.
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.
With 8 tools, the server provides a focused yet comprehensive coverage of Portuguese public data services, avoiding bloat or insufficiency for its intended scope.
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
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Real-world data for agents: air quality, geocoding, quakes, holidays, web search
660+ data tools for agents: TikTok, Douyin, Instagram, YouTube, X, weather, GitHub. Pay per call.
Public Data Ukraine Mcp connects AI agents to real public APIs via MCP. Tools include
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables 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.143MIT
- FlicenseAqualityCmaintenanceEnables querying Portuguese weather forecasts from IPMA, with tools to list localities and retrieve temperature and weather predictions.2-
- AlicenseNot gradedqualityBmaintenanceEnables 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
- AlicenseBqualityBmaintenanceEnables 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.1742254 PyPI2MIT