Bakom Mcp

io.github.malkreide由 GitHub 账号 malkreide 发布v3.0.2更新于 Oct 27, 2026

BAKOM telecommunications and media open data

概览

AI 生成的概览

用于瑞士 BAKOM 开放数据的只读 MCP 服务器,让助手按位置查询宽带、光纤、移动覆盖、天线与媒体统计数据。

可以做什么
  • 查询指定坐标的固网宽带覆盖与 FTTB/FTTH 光纤可用性,并一次比较最多 20 个地点的连接情况
  • 查询 5G/4G/3G 室外移动覆盖、附近移动天线以及广播/电视发射站点
  • 在 opendata.swiss 上检索 BAKOM 广播与电视数据集、媒体结构报告及最近更新的数据集
  • 获取电信市场统计与媒体统计数据集,列出宽带地图目录图层,并对各数据源做健康检查
适用场景
需要瑞士电信与媒体事实时适用:地址或学校建筑的连接性核查、移动与光纤覆盖对比、天线位置查询,或 BAKOM 数据集与统计查询,且无需任何 API 密钥。
运行要求
本地 Python 3.11+ 运行环境,配合 uv 或 pip;通过 uvx 运行或从 PyPI 安装。需要联网访问公开的 geo.admin.ch、opendata.swiss 与 lindas.admin.ch 接口。无需账号、API 密钥或令牌。可选的 HTTP 模式通过 BAKOM_MCP_HOST、BAKOM_MCP_PORT 和 BAKOM_MCP_CORS_ORIGINS 配置。
安装前请注意
只读,无写入工具、不访问本地文件系统,也不索取凭据。查询会发往第三方公共接口(geo.admin.ch、opendata.swiss、lindas.admin.ch),须遵守其服务条款;数据为开放许可,但可能需要署名。若启用 HTTP 模式,将 BAKOM_MCP_HOST 设为 0.0.0.0 或开放 CORS 会使服务器暴露在 localhost 之外。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Bakom Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🇨🇭 Part of the Swiss Public Data MCP Portfolio

📡 bakom-mcp

[Version] [License: MIT] [Python 3.11+] [MCP] [Auth] [CI]

MCP server for BAKOM open data – broadband, mobile coverage, media and Swiss telecom statistics.

🇩🇪 Deutsche Version

[Demo: Claude queries fibre and 5G coverage via MCP tool call]


Overview

bakom-mcp connects AI assistants like Claude to the Swiss Federal Office of Communications (BAKOM) open data infrastructure. It enables natural-language queries about broadband availability, 5G/4G coverage, mobile antenna locations, BAKOM datasets on radio and television, and telecommunications statistics — all without API keys.

All data is published as Open Government Data (OGD) on opendata.swiss / geo.admin.ch under CC BY 4.0 — see the Data Licence section below for attribution requirements.

Anchor demo query: "Which school buildings in district 7 do not yet have fibre optic connectivity?"

bakom_multi_standort_konnektivitaet delivers the comparison table automatically.

→ More use cases by audience →


Scope

What this server does

✓ Read-only queries against three public BAKOM/Confederation APIs:

  • api3.geo.admin.ch / wms.geo.admin.ch (broadband, mobile coverage, antennas)
  • ckan.opendata.swiss (telecom statistics, dataset metadata)

✓ Returns aggregated, anonymous data — no personal data, no household-level identification.

✓ Bound to Swiss WGS84 coordinates (lat 45.8–47.9, lon 5.9–10.6) via Pydantic input validation.

✓ Egress is locked to a code-layer allow-list of the six known data-source hosts.

What this server does not

✗ Send data anywhere (read-only, no write tools).

✗ Access the local filesystem (no path-traversal surface).

✗ Use authentication tokens (none required — all sources are public OGD).

✗ Cache or persist user inputs across calls.

✗ Execute shell commands or arbitrary code (no subprocess/os.system/eval).


Features

  • 📶 Broadband availability – Fixed-line coverage at 30/100/300/500/1000 Mbit/s (250×250m grid)
  • 🔌 Fibre status – FTTB/FTTH availability per location
  • 📍 Multi-location comparison – Connectivity check for up to 20 locations simultaneously
  • 📱 Mobile coverage – 5G/4G/3G outdoor coverage (100×100m grid)
  • 📡 Antenna search – Mobile and broadcast transmitters within a configurable radius
  • 📺 Radio & TV datasets – Full-text search across BAKOM's radio and television datasets on opendata.swiss
  • 🗞️ Media landscape – BAKOM media structure reports and datasets
  • 📊 Telecom statistics – Fixed-line, mobile, broadband market data via opendata.swiss
  • 🗂️ Broadband Atlas catalogue – All BAKOM dataset layers with direct API links
  • 🔓 No authentication required – All data is Open Government Data (OGD)

Prerequisites

  • Python 3.11+
  • uv or pip for installation
  • Internet connection (live APIs: geo.admin.ch, opendata.swiss)

Installation

bash
# Recommended: uvx (no permanent installation required)uvx bakom-mcp
# Or install with pippip install bakom-mcp
# Development installgit clone https://github.com/malkreide/bakom-mcpcd bakom-mcppip install -e ".[dev]"

Quickstart

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "bakom": {      "command": "uvx",      "args": ["bakom-mcp"]    }  }}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cloud / HTTP Transport

bash
python -m bakom_mcp.server --http# Server running at http://localhost:8050/mcp

Configuration via environment variables (see .env.example):

VariableDefaultPurpose
BAKOM_MCP_HOST127.0.0.1Bind address. Set to 0.0.0.0 only on trusted networks (warning logged).
BAKOM_MCP_PORT8050TCP port.
BAKOM_MCP_CORS_ORIGINS(empty)Comma-separated allowed origins for browser clients. Empty = CORS disabled.

Docker

A hardened container image is provided. Suitable for cloud deployments behind a reverse proxy (Caddy, Traefik, nginx).

bash
# Build & run via compose (recommended)docker compose up --build
# Or via docker rundocker build -t bakom-mcp:latest .docker run --rm \  --read-only \  --cap-drop=ALL \  --security-opt=no-new-privileges \  --tmpfs /tmp:rw,size=16M \  -p 127.0.0.1:8050:8050 \  bakom-mcp:latest

The image runs as non-root (UID 10001), uses a read-only filesystem, drops all Linux capabilities and refuses privilege escalation. Resource limits are configured in docker-compose.yml (256 MB memory, 0.5 CPU, 64 PIDs). The default port mapping binds to 127.0.0.1 only — for public exposure, terminate TLS and CORS at a reverse proxy.

Cursor / VS Code / LibreChat

json
{  "bakom": {    "command": "uvx",    "args": ["bakom-mcp"],    "transport": "stdio"  }}

💡 "stdio for the developer laptop, HTTP/SSE for the browser."


Available Tools (12)

Broadband & Connectivity

ToolDescription
bakom_broadband_coverageFixed-line coverage at a coordinate (30–1000 Mbit/s)
bakom_glasfaser_verfuegbarkeitFTTB/FTTH fibre availability
bakom_multi_standort_konnektivitaetConnectivity comparison for up to 20 locations

Mobile & Transmitters

ToolDescription
bakom_mobilfunk_abdeckung5G/4G/3G outdoor coverage
bakom_sendeanlagen_sucheMobile antennas within a configurable radius
bakom_frequenzdatenRadio/TV transmitter sites near a location

Media & RTV

ToolDescription
bakom_rtv_sucheSearch BAKOM radio/TV datasets on opendata.swiss
bakom_medienstruktur_infoSwiss media landscape datasets
bakom_aktuellRecently updated BAKOM datasets on a topic (catalogue, not press releases)
bakom_medien_statistikMarket shares, reach and programme structure from the BAKOM cubes on LINDAS

Statistics & Catalogue

ToolDescription
bakom_telekomstatistik_uebersichtTelecom statistics from opendata.swiss
bakom_breitbandatlas_datensaetzeFull catalogue of Broadband Atlas layers
bakom_check_api_status🔍 Health check for all configured data sources

Example Prompts

What is the broadband situation at Schulhaus Leutschenbach (47.4148, 8.5654)?
Compare 5G and fibre coverage for these three school buildings: [coordinates]
Which radio stations are licensed in canton Zurich?
Show me the current BAKOM position on 5G frequency allocation.
List all Broadband Atlas datasets available via geo.admin.ch.

Safety & Limits

AspectDetails
AccessRead-only (readOnlyHint: true) — the server cannot modify or delete any data
Personal dataNo personal data — all sources are aggregated, public open data
Rate limitsBuilt-in per-query caps (max 50 antennas, max 20 locations, max 50 RTV results)
Timeout20 seconds per API call
AuthenticationNo API keys required — all 3 APIs are publicly accessible
LicencesAll data under CC0 / open licences (Open Government Data)
Terms of ServiceSubject to ToS of the respective data sources: geo.admin.ch, opendata.swiss

Data Sources

SourceDataAuthentication
geo.admin.chBroadband Atlas, mobile coverage, antenna locationsNone
opendata.swissBAKOM datasets, telecom statisticsNone
lindas.admin.chBAKOM media statistics cubes (SPARQL)None

All data is published under open licences (CC0 / OGD).

Architecture decision — media statistics

bakom_medien_statistik uses Architecture A (live API only), verified live on 2026-08-13:

  • The SPARQL endpoint is https://lindas.admin.ch/query; the /sparql path documented elsewhere returns 404.
  • The OFCOM cubes live in the named graph https://lindas.admin.ch/ofcom/cube. Without an explicit FROM, a query hits the default graph and sees 2010 cubes from every federal office instead of 540.
  • A bulk download exists for only 137 of 540 cubes, so a dump-first architecture would cover a quarter of the data.
  • An unknown graph answers HTTP 200 with zero rows — a silent empty, not an error. Requests carry retry with exponential backoff; egress-policy violations are not retried.

Scope, stated in the tool description because the README does not reach the model: the cubes cover the programmes that were surveyed, not the full inventory. LINDAS's own count cube reports 199+39+17 radio programmes for 2020, while the Programm dimension across all cubes exposes 128 labels — some of which are the same station spelled differently (Energy BE / Energy Bern), plus Durchschnitt, which is an aggregate rather than a station. This tool is a statistics source, not a broadcaster register; licensed broadcasters are listed in the RTV database, which offers no machine-readable interface.


Synergies with the MCP Portfolio

bakom-mcp can be combined with other servers in the portfolio for multi-dimensional queries:

zurich-opendata-mcp  →  school building addresses         +    bakom-mcp         →  fibre and 5G status         ="Digital equity" dashboard for all school districts

Further combinations:

  • srgssr-mcp + bakom-mcp → Media coverage and broadcast network
  • swiss-statistics-mcp + bakom-mcp → Telecom market development
  • fedlex-mcp + bakom-mcp → Regulatory context (RTVG, FMG)

Project Structure

bakom-mcp/├── src/bakom_mcp/│   ├── __init__.py          # Package│   ├── server.py            # MCP server (12 tools, 2 resources)│   └── py.typed             # PEP 561 type marker├── tests/│   └── test_integration.py  # Integration tests (live APIs)├── assets/│   └── demo.svg             # Demo flow diagram├── .github/workflows/│   ├── ci.yml               # CI: lint, syntax, import, tests│   └── publish.yml          # PyPI publish on release├── .gitignore├── pyproject.toml           # Build config (hatchling)├── CHANGELOG.md├── CONTRIBUTING.md          # Contribution guide (English)├── CONTRIBUTING.de.md       # Contribution guide (German)├── SECURITY.md              # Security policy (English)├── SECURITY.de.md           # Security policy (German)├── LICENSE                  # MIT License├── README.md                # This file (English)└── README.de.md             # German version

MCP Protocol Version

This server speaks two protocol eras over the same endpoint. The client's first request on a connection decides which one applies; a later claim from the other era is refused.

EraRevisionWho reaches it
initialize handshake2024-11-05 … 2025-11-25What today's clients speak. The server answers with the revision asked for, or with the 2025-11-25 ceiling when the request asks for something newer.
Per-request envelope2026-07-28A request carrying the 2026-07-28 _meta envelope opens a modern connection.

Both revisions are pinned in tests/test_protocol_version.py and asserted against the installed SDK, so a Dependabot bump of mcp cannot move either one silently. The handshake ceiling is measured against a live initialize through the assembled ASGI stack, not read off a constant name.

Note that the SDK's LATEST_PROTOCOL_VERSION is an alias for the modern era, not for the handshake era — pinning against it alone would leave the era that current clients actually negotiate free to drift.

Native in the envelope era. The server uses nothing the 2026-07-28 spec deprecates (SEP-2577: logging, sampling, roots). The status text of bakom_multi_standort_konnektivitaet travels in the progress notification instead of ctx.info() — in the modern era logging is delivered only when the request opts in with a log level in _meta, and without that opt-in the line was silently dropped. serverInfo carries the package version on initialize and on server/discover alike. A tool call needs neither a handshake nor an Mcp-Session-Id. tests/test_modern_era.py checks this over real connections in both eras, and the suite treats every MCPDeprecationWarning as an error.

What the server announces. No change notifications: tools, resources and prompts are fixed at import, so the server reports listChanged and resources.subscribe as false in both eras and rejects subscriptions/listen. No outputSchema: tools return text (Markdown or a JSON string) in content. Both are checked by tests/test_capabilities.py.

Update policy. When the gate fails, do not edit the constant blindly: read the spec changelog between the two revisions, verify the server still behaves, then move the constant, this section, README.de.md and CHANGELOG.md together.


Testing

bash
# Unit tests (no network required)PYTHONPATH=src pytest tests/ -m "not live"
# Integration tests (live APIs, internet required)PYTHONPATH=src pytest tests/ -m "live"

Changelog

See CHANGELOG.md


Contributing

Contributions are welcome! See CONTRIBUTING.md (🇩🇪 Deutsch) for guidelines on reporting bugs, suggesting features, and submitting pull requests.


Security

To report a vulnerability, see the Security Policy (🇩🇪 Deutsch). Please report security issues privately via GitHub Security Advisories rather than public issues.


Software Licence

MIT License — see LICENSE.

Data Licence

The BAKOM open data delivered through this server is published under CC BY 4.0. When using or redistributing tool outputs, attribute the source as:

Source: Federal Office of Communications (BAKOM) via opendata.swiss / geo.admin.ch · Licence: CC BY 4.0

Tool outputs already include this footer automatically. The Markdown response format ends with the attribution line; downstream applications that consume the JSON format should propagate the source/licence metadata to their end users.


Author

Hayal Oezkan · github.com/malkreide


Credits & Related Projects


Part of the Swiss Open Data MCP portfolio — public data deserves public interfaces.

Installation

Run via uv's uvx — no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):

json
{  "mcpServers": {    "bakom-mcp": {      "command": "uvx",      "args": [        "bakom-mcp"      ]    }  }}

来源:README.md,提交 ba266a2

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v3.0.2最新Sep 27, 2026
  2. v3.0.1Sep 27, 2026
  3. v3.0.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分