hls_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., "@hls_mcpsearch for the biography of Alfred Escher"
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.
hls_mcp
HLS (Historisches Lexikon der Schweiz | Dizionario Storico della Svizzera |
Dictionnaire Historique de la Suisse) — MCP server using the MCP 2.0
MCPServer API with streamable HTTP transport.
Corpus
33,506 articles across four categories:
bio(biographies),fam(families),geo(places),tem(topics/institutions)24,277 bio articles with birth/death dates and family names
Full-text content in German, French, Italian
Related MCP server: ch-eli-mcp
Building the database
The hls.db is built from the HLS CSV export on first run (or on demand):
docker compose run --rm hls-mcp python build_db.pyOr outside Docker:
HLS_SRC_CSV=/path/to/hls_articles.csv HLS_OUT_DB=/path/to/hls.db python build_db.pyRunning
docker compose up -dThe endpoint is http://localhost:8004/mcp by default, and whatever --http-path
says otherwise — see Transport.
Connect Claude Code with — note the name and URL are positional, there is no --url
flag:
claude mcp add --transport http hls http://<server-ip>:8004/mcp -s user-s user makes the server available in every project; -s project writes it to
.mcp.json to share with a repository. In Claude Desktop, Cowork or claude.ai, use
Customize → Connectors → + → Add custom connector with the same URL; those
clients connect from Anthropic's cloud, so the server must be reachable over the public
internet. In a .mcp.json the entry is {"type": "http", "url": "…"} — a url
without a type is read as a stdio server and skipped.
Tools
Tool | Description |
| Corpus summary: article/person counts, text size, categories |
| FTS5 full-text search across title, text, lexical class |
| Full article record by HLS id (e.g. |
| Browse articles by type: bio, fam, geo, tem |
| Articles whose time-span overlaps a given year range |
| Paginated person authority list |
| Search persons by family name or forename |
| Person record by HLS person id (e.g. |
Transport
Streamable HTTP — one endpoint answering POST (requests), GET (the
server→client stream), and DELETE (session teardown).
This replaces the SSE transport this server used previously. SSE is deprecated, and
its handshake hands the client an absolute /messages/ path computed from the app's
own mount point — a path the client cannot reach when the server sits behind a
reverse-proxy sub-path. Clients pointed at /sse must be repointed.
Behind a reverse proxy
Set --http-path (or HLS_HTTP_PATH) to the public path, and give nginx a
location with the same string. Then nginx forwards the path unchanged:
location /mcp/hls/mcp {
proxy_pass http://127.0.0.1:8004; # no trailing slash
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_buffering off;
proxy_read_timeout 3600s;
chunked_transfer_encoding on;
}The app's path and the nginx location must agree exactly or every request 404s.
The startup line prints what is actually being served:
Starting HLS MCP server on 0.0.0.0:8004/mcp/hls/mcpEnvironment variables
Variable | Default | Description |
|
| Path to the SQLite database |
|
| Bind address |
|
| TCP port |
|
| Path the MCP endpoint is served at |
Query behaviour
Limits. Every limit is clamped to at most 500; a negative, zero, or non-numeric
value falls back to that tool's own default rather than returning the whole table.
Name search. SQL wildcards in a query are escaped, so searching for 100% finds a
literal "100%" rather than matching every record.
Full-text search. search_articles passes the query to FTS5, so operators work —
Bern OR Brugg, Zwing*, NEAR(...). An invalid FTS5 query falls back to quoted
phrases and then to a literal title search instead of raising.
Year ranges. list_articles_by_year reads the free-text time_span field, so the
overlap test runs in Python — over the candidate set before paging. It examines at
most YEAR_SCAN_CAP (5000) rows.
Result size. Claude.ai and Claude Desktop truncate a tool or resource result at roughly 150,000 characters; the 500-row ceiling keeps every tool under it.
Deployment
This server runs on tei.dh.unibe.ch at
https://tei.dh.unibe.ch/mcp/hls/mcp, alongside four sibling MCP servers:
Königsfelden, SSRQ, HBLS, EOS / HGB Basel.
What they share — the nginx routing, the landing pages, and the deploy sequence —
lives in tei_mcp_ops. Start there for
anything that spans the fleet; in particular, the app's --http-path and the nginx
location have to be the same string, which is the rule a sub-path deployment turns
on.
Tests
pip install pytest
pytest test_hls_mcp.pyUnit tests build their own throwaway database and need no setup. DB and server tests skip unless pointed at them:
HLS_DB=/data/hls.db HLS_SERVER=http://localhost:8004 pytest test_hls_mcp.pyRequires Python 3.10+ (X | None annotations); the container image is
python:3.12-slim.
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
- AlicenseAqualityAmaintenanceMCP server for searching Swiss court decisions from federal and cantonal courts via entscheidsuche.ch. Enables full-text search, law reference lookup, and filtering by canton, court level, and date without API keys.Last updated81MIT
- AlicenseAqualityAmaintenanceMCP server for Swiss federal legislation metadata via Fedlex, enabling search and retrieval of act details with ELI URIs, SR numbers, and multilingual support.Last updated2Apache 2.0
- AlicenseAqualityAmaintenanceMCP server for TERMDAT, the terminology database of the Swiss Federal Administration, giving AI agents officially validated designations of Swiss authorities, departments, and legal acts across DE/FR/IT/EN with source references and validation status.Last updated71MIT

entscheidsuche-mcpofficial
Alicense-qualityBmaintenanceMCP server for Swiss court decisions, enabling full-text search and retrieval of published decisions from all Swiss federal and cantonal courts in German, French, and Italian.Last updated3MIT
Related MCP Connectors
MCP server for Open Archives: Dutch genealogical records and historical page transcriptions.
Bible corpus MCP server: scripture, Greek/Hebrew interlinear data, cross-refs, semantic search.
opendata.swiss MCP — Switzerland's federal open-data portal (CKAN catalogue).
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/thodel/hls_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server