BDL MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
BDL MCP Server
Serwer MCP (Model Context Protocol) dla API BDL (Bank Danych Lokalnych) - publicznego API GUS (Główny Urząd Statystyczny) udostępniającego dane statystyczne o Polsce.
Opis
Ten serwer MCP umożliwia dostęp do danych statystycznych GUS poprzez protokół MCP. Dzięki temu modele językowe (LLM) mogą bezpośrednio pobierać i analizować dane statystyczne o Polsce.
Related MCP server: stat-gov-mcp
Funkcjonalności
Serwer udostępnia następujące narzędzia (tools):
Poziomy agregacji (Aggregates)
get_aggregates- Lista poziomów agregacji (kraj, województwo, powiat, gmina)get_aggregate_by_id- Szczegóły poziomu agregacji
Atrybuty (Attributes)
get_attributes- Lista atrybutów danychget_attribute_by_id- Szczegóły atrybutu
Dane statystyczne (Data)
get_data_by_variable- Dane dla jednej zmiennejget_data_by_unit- Dane dla jednostki terytorialnejget_data_localities_by_unit- Dane dla miejscowości
Poziomy jednostek (Levels)
get_levels- Lista poziomów jednostek terytorialnychget_level_by_id- Szczegóły poziomu
Jednostki miary (Measures)
get_measures- Lista jednostek miaryget_measure_by_id- Szczegóły jednostki miary
Tematy (Subjects)
get_subjects- Lista tematów (kategorii danych)get_subject_by_id- Szczegóły tematu
Jednostki terytorialne (Units)
get_units- Lista jednostek terytorialnychget_unit_by_id- Szczegóły jednostkisearch_units- Wyszukiwanie jednostek po nazwieget_localities- Lista miejscowości statystycznych
Zmienne (Variables)
get_variables- Lista zmiennych (cech statystycznych)get_variable_by_id- Szczegóły zmiennejsearch_variables- Wyszukiwanie zmiennych
Lata (Years)
get_years- Lista lat z dostępnymi danymiget_year_by_id- Szczegóły roku
Instalacja
Wymagania
Python 3.10+
Instalacja zależności
pip install -r requirements.txtLub z wykorzystaniem pip:
pip install mcp httpxUruchomienie
Bezpośrednie uruchomienie
python server.pyKonfiguracja w Claude Desktop
Dodaj do pliku konfiguracyjnego Claude Desktop (claude_desktop_config.json):
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"bdl-api": {
"command": "python",
"args": ["/ścieżka/do/mcp-server/server.py"]
}
}
}Lub z wykorzystaniem uv:
{
"mcpServers": {
"bdl-api": {
"command": "uv",
"args": [
"--directory",
"/ścieżka/do/mcp-server",
"run",
"server.py"
]
}
}
}Przykłady użycia
Pobranie listy województw
Użyj narzędzia get_units z parametrami:
- level: 2
- page_size: 20Wyszukanie danych o ludności Warszawy
1. Użyj search_units z name: "Warszawa"
2. Użyj search_variables z name: "ludność"
3. Użyj get_data_by_unit z odpowiednimi IDPobranie danych demograficznych dla całego kraju
1. Użyj get_subjects aby znaleźć temat "Ludność"
2. Użyj get_variables z subject_id tematu
3. Użyj get_data_by_variable z var_id i unit_id: "000000000000" (Polska)Struktura odpowiedzi API
Odpowiedzi z API BDL zawierają typowo:
results- lista wynikówtotalRecords- całkowita liczba rekordówpage- numer stronypageSize- rozmiar stronylinks- linki do nawigacji (poprzednia/następna strona)
Języki
API obsługuje dwa języki:
pl- polski (domyślny)en- angielski
Parametr lang można przekazać do każdego narzędzia.
Limity API
API BDL ma limity zapytań (rate limiting). Informacje o limitach są zwracane w nagłówkach odpowiedzi:
X-Rate-Limit-Limit- limit zapytańX-Rate-Limit-Remaining- pozostałe zapytaniaX-Rate-Limit-Reset- czas resetu limitu
Dokumentacja API BDL
Pełna dokumentacja API BDL dostępna jest pod adresem: https://api.stat.gov.pl/Home/BdlApi
Licencja
GNU GENERAL PUBLIC LICENSE
Stworzono na podstawie specyfikacji OpenAPI BDL API.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Experimental MCP exploring Polish administrative units and BDL statistics.
Polish public statistics (GUS, NBP, Eurostat) with unit, period and source. Data tools only read.
Unofficial Eurostat MCP — wraps Eurostat Statistical Data API (no auth required)
Query official statistics through MCP, with periods, places and citable sources in every answer.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes the Eurostat Statistics API, enabling LLMs to discover, explore, and retrieve official EU statistical data through search, dimension inspection, and data retrieval tools.3-
- AlicenseAqualityCmaintenanceLocal MCP server for querying Polish socioeconomic statistics from the GUS Bank Danych Lokalnych (BDL), letting AI find variables and units and pull data.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables language models to search and query Statistics Netherlands open data, turning natural-language questions into traceable statistics by discovering tables, resolving codes, and retrieving filtered observations.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search, inspect, and retrieve Irish Central Statistics Office PxStat datasets through MCP tools. Supports catalog search, metadata discovery, full-table reads, and filtered JSON-stat queries.72 npmMIT