Weather, emergencies, fuel prices, companies, invoices, contracts, economic data — all available to your AI assistant in seconds.
Choose your AI tool and follow the steps. It takes less than a minute.
One command in your terminal:
claude mcp add ptdata --transport streamable-http https://api.ptdata.org/mcp
Done. Now just ask Claude anything about Portugal.
Open the config file:
# macOS ~/Library/Application Support/Claude/claude_desktop_config.json # Windows %APPDATA%\Claude\claude_desktop_config.json
Add this to the file (or create it if it doesn't exist):
{
"mcpServers": {
"ptdata": {
"type": "url",
"url": "https://api.ptdata.org/mcp"
}
}
}
Restart Claude Desktop. You'll see the tools icon appear in the chat — that means it's connected.
Most AI code editors support MCP. Look for "MCP servers" in settings and add:
URL: https://api.ptdata.org/mcp Transport: Streamable HTTP
No API key needed for public data. If you need authenticated features (invoice submission, accountant platform), register via the API to get a Bearer token.
Use ChatGPT with the API in two ways:
Custom GPT with Actions: Create a Custom GPT at chat.openai.com, go to "Configure" > "Actions", and import the OpenAPI spec from https://api.ptdata.org/openapi.yaml. ChatGPT will automatically create actions for all 52 endpoints.
Direct in chat: Just paste a curl command or API URL and ask ChatGPT to analyze the result. Example: "Fetch https://api.ptdata.org/v1/civil-protection/occurrences/active and tell me what's happening"
Google Gemini can call the API directly:
Gemini Extensions: Use the "Google Search" extension with a prompt like "search api.ptdata.org/v1/weather/warnings and summarize"
Vertex AI / AI Studio: Add the API as a function calling tool using the OpenAPI spec at https://api.ptdata.org/openapi.yaml
Even without MCP, any AI that can browse the web or fetch URLs can use the API. Just ask it:
# Works in any AI chat
"Fetch https://api.ptdata.org/v1/fuel/prices?fuel=gasolina+95&district=11&limit=5
and tell me the cheapest petrol in Lisbon"
Any application that speaks MCP (Model Context Protocol) can connect. The server uses Streamable HTTP transport — just POST JSON-RPC 2.0 to the endpoint:
# List all available tools curl -X POST https://api.ptdata.org/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/list","id":1}' # Call a tool curl -X POST https://api.ptdata.org/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_active_occurrences","arguments":{}},"id":2}'
27+ tools across 8 domains, all free:
20 districts, 308 municipalities, 3,092 parishes, NUTS regions, population data
Active emergencies, historical fire records (ICNF), fire risk index by municipality
IPMA forecasts for 35 cities, 221 station observations, meteorological warnings
Real-time prices from 3,000+ gas stations. Find the cheapest fuel near you.
EUR exchange rates (20 currencies), ECB interest rates, CPI/GDP/unemployment, housing prices
Look up any Portuguese company by NIF — name, address, business activity (CAE), VAT status, public contracts
80,000+ public procurement contracts from BASE/IMPIC with prices, entities, suppliers
Validate invoice data (NIF, VAT, totals), submit to AT, format for accountant
Full API documentation · Discovery endpoint · System status
Contact: hello@ptdata.org