bakom-mcp

bakom-mcp

MCP server for Swiss BAKOM open data, enabling natural-language queries about broadband availability, 5G/4G coverage, mobile antennas, licensed broadcasters, and telecom statistics.

Category
Visit Server

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

<p align="center"> <img src="assets/demo.svg" alt="Demo: Claude queries fibre and 5G coverage via MCP tool call" width="720"> </p>


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, licensed broadcasters (RTV database), 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)
  • rtvdb.ofcomnet.ch (licensed radio/TV broadcasters)

โœ“ 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
  • ๐Ÿ“บ RTV database โ€“ Search licensed radio and TV broadcasters by name, type, canton
  • ๐Ÿ—ž๏ธ 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, rtvdb.ofcomnet.ch)

Installation

# Recommended: uvx (no permanent installation required)
uvx bakom-mcp

# Or install with pip
pip install bakom-mcp

# Development install
git clone https://github.com/malkreide/bakom-mcp
cd bakom-mcp
pip install -e ".[dev]"

Quickstart

Claude Desktop

Add to claude_desktop_config.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

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

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

Variable Default Purpose
BAKOM_MCP_HOST 127.0.0.1 Bind address. Set to 0.0.0.0 only on trusted networks (warning logged).
BAKOM_MCP_PORT 8050 TCP 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).

# Build & run via compose (recommended)
docker compose up --build

# Or via docker run
docker 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

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

๐Ÿ’ก "stdio for the developer laptop, HTTP/SSE for the browser."


Available Tools (12)

Broadband & Connectivity

Tool Description
bakom_broadband_coverage Fixed-line coverage at a coordinate (30โ€“1000 Mbit/s)
bakom_glasfaser_verfuegbarkeit FTTB/FTTH fibre availability
bakom_multi_standort_konnektivitaet Connectivity comparison for up to 20 locations

Mobile & Transmitters

Tool Description
bakom_mobilfunk_abdeckung 5G/4G/3G outdoor coverage
bakom_sendeanlagen_suche Mobile antennas within a configurable radius
bakom_frequenzdaten Radio/TV transmitter sites near a location

Media & RTV

Tool Description
bakom_rtv_suche Search licensed broadcasters (RTV database)
bakom_medienstruktur_info Swiss media landscape datasets
bakom_aktuell Current BAKOM topics (5G, media, AI, postal)

Statistics & Catalogue

Tool Description
bakom_telekomstatistik_uebersicht Telecom statistics from opendata.swiss
bakom_breitbandatlas_datensaetze Full 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

Aspect Details
Access Read-only (readOnlyHint: true) โ€” the server cannot modify or delete any data
Personal data No personal data โ€” all sources are aggregated, public open data
Rate limits Built-in per-query caps (max 50 antennas, max 20 locations, max 50 RTV results)
Timeout 20 seconds per API call
Authentication No API keys required โ€” all 3 APIs are publicly accessible
Licences All data under CC0 / open licences (Open Government Data)
Terms of Service Subject to ToS of the respective data sources: geo.admin.ch, opendata.swiss, rtvdb.ofcomnet.ch

Data Sources

Source Data Authentication
geo.admin.ch Broadband Atlas, mobile coverage, antenna locations None
opendata.swiss BAKOM datasets, telecom statistics None
rtvdb.ofcomnet.ch Licensed radio/TV broadcasters None

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


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

Testing

# 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.

<!-- mcp-name: io.github.malkreide/bakom-mcp -->

<!-- BEGIN GENERATED: install -->

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):

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

<!-- END GENERATED: install -->

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured