lindas-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lindas-mcpSearch for cubes about forest fire danger in Switzerland"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Part of the Swiss Public Data MCP Portfolio β a collection of open-source MCP servers connecting AI agents to Swiss public and open data. This is a private project. It is not affiliated with, endorsed by, or operated on behalf of any employer or public authority.
lindas-mcp
MCP server for LINDAS β the linked-data knowledge graph of the Swiss administration.
π©πͺ Deutsche Version
What LINDAS is
LINDAS (Linked Data Service) is the Swiss Confederation's SPARQL knowledge graph, run by the Federal Archives. Instead of tables, it publishes data as RDF triples: around 2000 statistical data cubes (cube.link) from federal offices, plus the geo-linked data that powers visualize.admin.ch.
Mnemonic: Β«I14Y is the library catalogue, LINDAS is the library itself.Β» i14y-mcp tells you a dataset exists. LINDAS holds the data and lets you query across all of it at once.
This server wraps LINDAS in guarded tools rather than exposing raw SPARQL, because the store rewards precise queries and times out on broad ones.
Related MCP server: Zurich Open Data MCP Server
π― Anchor Demo Query
Β«Which forest-fire danger level currently applies, who publishes it, and under which licence?Β»
search_cubes(query="waldbrand")
β Β«WaldbrandgefahrΒ» β BAFU, published
get_cube_structure(cube_uri=...)
β dimensions: Warnregion (key), Gefahrenstufe (measure)
β licence: fedlex.data.admin.ch/eli/cc/1984/... (a Fedlex URI!)
query_cube_observations(cube_uri=...)
β Warnregion: "Dorneck / Thierstein (SO)", Gefahrenstufe: "grosse Gefahr"The codes come back as labels β Β«grosse GefahrΒ», not 4. And the licence is a
Fedlex URI you can resolve with fedlex-mcp.
Demo
The two-phase access pattern
LINDAS cubes are self-describing but coded. Reading them well means two steps, which this server enforces:
Structure first β
get_cube_structurereads the cube's SHACL shape: its dimensions (filterable axes), its measures (the numbers), and which dimensions carry code lists.Data second β
query_cube_observationsreads the observations and resolves coded values to human labels using the structure from step 1.
Mnemonic: Β«LINDAS speaks in postcodes, not place names.Β» An observation says region
1805; the server turns that into Β«AlpennordhangΒ» for you.
Architecture
ββββββββββββββββββββββββββββββββ
β MCP Host (Claude) β
βββββββββββββββββ¬βββββββββββββββ
β stdio | streamable-http
βββββββββββββββββΌβββββββββββββββ
β lindas-mcp β
β ββββββββββββββββββββββββββ β
β β server.py (7 tools) β β talks only to cube.py
β ββββββββββββββββββββββββββ€ β
β β lindas/cube.py β β β vocabulary guardrail,
β β β β two-phase access,
β β β β codeβlabel resolution
β ββββββββββββββββββββββββββ€ β
β β lindas/queries.py β β SPARQL templates,
β β β β all anchored on a class
β ββββββββββββββββββββββββββ€ β
β β lindas/client.py β β raw SPARQL over HTTP,
β β β β knows nothing of cubes
β ββββββββββββββββββββββββββ β
βββββββββββββββββ¬βββββββββββββββ
β HTTPS, no auth
βββββββββββββββββΌβββββββββββββββ
β lindas.admin.ch/query β
β SPARQL 1.1 Β· ~2000 cubes β
ββββββββββββββββββββββββββββββββThe lindas/ package is deliberately layered so it can be lifted into other
LINDAS-backed servers unchanged. client.py knows only HTTP and SPARQL;
cube.py knows the cube.link vocabulary; the tools know only cube.py. Raw
SPARQL never reaches the agent except through the guarded run_sparql escape
hatch.
Architecture decision
Architecture A (live SPARQL only), with a strict vocabulary guardrail.
Verified live on 2026-07-21:
The endpoint is stable, needs no authentication, and returns a clean HTTP 400 with a diagnostic on malformed queries.
Blind scans (
SELECT *,COUNT(*)over the whole store) time out at 60β90 s; the same question anchored on?x a cube:Cubeanswers in ~2 s.
Consequences, baked into the tools:
Every query template is anchored on a known class. No unbounded scans.
Two-phase access is enforced; the agent never sees raw codes.
run_sparqlis capped at 500 rows and 30 s and marked as advanced.The client timeout sits at 45 s, in front of the store's own 60β90 s abort.
Full probe report: docs/probe-lindas.md.
Tools
Tool | Purpose |
| Find cubes by topic. Entry point. Deduplicates versions. |
| Phase 1: dimensions, measures, licence. |
| Phase 2: data points with codes resolved to labels. |
| Federal bodies publishing cubes, with counts. |
| Name β URI β BFS number β the portfolio join key. |
| Advanced escape hatch. Capped, guarded. |
| Reachability check with cube count. |
All tools are annotated readOnlyHint: true.
Installation
uvx lindas-mcpClaude Desktop
{
"mcpServers": {
"lindas": {
"command": "uvx",
"args": ["lindas-mcp"]
}
}
}Remote deployment
LINDAS_MCP_TRANSPORT=sse PORT=8000 lindas-mcpLINDAS_MCP_TRANSPORT accepts stdio (default), sse or streamable-http.
The SSE / streamable-http transport binds to HOST, default 127.0.0.1;
set HOST=0.0.0.0 explicitly to expose it (only behind a reverse proxy). For a
hosted HTTP deployment, set ALLOWED_ORIGINS to a comma-separated list of
browser origins (default *), and LOG_LEVEL to tune the JSON stderr logs.
Docker
docker compose up --build # binds 0.0.0.0 inside the container, publishes :8000The image runs as a non-root user, read-only, with resource limits and a
TCP health check (see Dockerfile and compose.yaml).
Join keys
LINDAS is a connector layer, and two of its identifiers make it composable with the rest of the portfolio:
Key | Where | Joins to |
BFS commune number |
| swiss-statistics-mcp, zurich-opendata-mcp |
Fedlex URI | cube |
The Fedlex link is the quiet surprise: many cubes declare their licence as a
legal-basis URI (fedlex.data.admin.ch/eli/cc/...), so you can go from a data
point straight to the law that governs it.
Known limitations
Verified live on 2026-07-21.
Broad SPARQL times out. The store aborts unanchored scans at 60β90 s. The guarded tools avoid this;
run_sparqlwarns about it and caps runtime.Observations are coded. Dimension values are URIs, not labels. The server resolves them via each dimension's code list, but resolution costs one extra query per coded dimension. Set
resolve_labels=Falseto skip it.No server-side observation filtering by arbitrary value. LINDAS has no cheap way to filter observations by a dimension value inside a cube, so
query_cube_observationsreads the first N observations. Analytical slicing belongs inrun_sparql.Licences vary per cube and are declared as
dcterms:license, frequently a Fedlex URI rather than a plain name. Always surface thelicencefield.Version handling is heuristic.
search_cubesdeduplicates by stripping the version suffix from the cube URI and keeping the highestschema:versionamong published cubes. Unusual URI shapes may not collapse cleanly; uselatest_only=Falseto inspect every version.
Testing
PYTHONPATH=src pytest tests/ -m "not live" # offline, used in CI
PYTHONPATH=src pytest tests/ -m "live" # hits the real endpoint
python -m ruff check src testsThe live tests earn their place: the observationSet indirection (a cube's
observations hang off cube:observationSet, never directly off the cube) is a
structural assumption that a mock cannot validate. It is covered by a live test.
Contributing
See CONTRIBUTING.md for the ground rules (read-only, one
egress host, anchored queries) and the local dev loop. Further reading:
EXAMPLES.md for use cases by audience with the tool-selection
table, docs/roadmap.md for the project phase, and
PUBLISHING.md for the PyPI / MCP Registry release process.
Security
See SECURITY.md for the security posture and how to report a
vulnerability.
License
MIT License β see LICENSE. The LINDAS data remains subject to the licence each publisher declares on the cube.
Author
Hayal Oezkan Β· github.com/malkreide
Credits & related projects
Data: LINDAS Linked Data Service, Swiss Federal Archives
Vocabulary: cube.link
Visualisation frontend on the same cubes: visualize.admin.ch
Source discovery inspired by rnckp/awesome-ogd-switzerland
Portfolio: swiss-public-data-mcp
Licence: MIT. The cube data remains subject to the licence each publisher declares.
MCP Registry
Ownership marker used by the MCP Registry to link this PyPI package to the GitHub namespace:
mcp-name: io.github.malkreide/lindas-mcpMCP protocol version
The negotiated MCP protocol version is managed by the pinned mcp SDK
(mcp>=1.28.1 in pyproject.toml), which Dependabot keeps current. SDK upgrades
are therefore a reviewed change: any protocol-affecting bump is called out in
CHANGELOG.md, and the tool contract is guarded independently by
tool-definitions.lock.json (SEC-022) so a change to the tool surface fails CI
until reviewed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server for discovering, downloading, querying, and analyzing datasets from Ontario's open data portals, allowing natural language questions and high-performance analytics via DuckDB.Last updated231MIT
- AlicenseBqualityAmaintenanceAn MCP server providing AI-powered access to Open Data from the City of Zurich, enabling queries to 900+ datasets, real-time environmental and mobility data, geodata, parliamentary proceedings, and more.Last updated268MIT
- AlicenseAqualityBmaintenanceMCP server exposing SPARQL query functionalities for LLMs, enabling query execution, validation, and graph exploration across SPARQL endpoints.Last updated7MIT
- FlicenseAqualityCmaintenanceEnables LLMs to query structured statistical data from the Swiss Federal Archives' Linked Data platform (LINDAS) by translating natural language questions into SPARQL queries against RDF data cubes.Last updated8
Related MCP Connectors
DBpedia MCP β SPARQL + Lookup over Wikipedia-derived structured data
opendata.swiss MCP β Switzerland's federal open-data portal (CKAN catalogue).
Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/lindas-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server