hbls_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., "@hbls_mcpSearch for 'Wilhelm Tell' and get the article"
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.
hbls_mcp
Model Context Protocol (MCP) server for the Historisches Biographisches Lexikon der Schweiz (HBLS), offering full-text search and structured access to the 8-volume encyclopedia published 1921–1934.
Corpus
18,244 articles (3,718 biographies), 19,707 persons
8 volumes covering Swiss history, families, geography, and topics
Source PDF: digibern.ch
Predecessor to the Historisches Lexikon der Schweiz (HLS)
Related MCP server: HGB Basel MCP Server
Quick start
# Requires hbls.db at /data/hbls.db
docker compose up --build -dThe server listens on port 8003 with streamable HTTP transport. The endpoint is
http://localhost:8003/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 hbls http://<server-ip>:8003/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/member counts, text size, volumes |
| FTS5 full-text search across headwords + article text |
| Full article by headword + volume |
| Article at a given volume + page |
| Paginated list of all articles in a volume |
| All persons listed under a family article |
| Search persons by forename or family name |
| Search biographies only (bio category) |
| Direct PDF URL for headword/volume/page |
| List articles by category (fam/bio/geo/tem) |
| Article counts per category |
Resources
hbls://stats— static corpus statistics snapshothbls://volume/{n}— article index for volume n:{volume, total, returned, truncated, articles: [...]}, capped at 1000 rows and flagged when truncatedhbls://article/{headword}/{volume}— single article
Database
The server expects the SQLite database at /data/hbls.db inside the container.
Mount the host directory containing hbls.db to /data. db.SCHEMA_SQL holds the
schema the server expects — the contract between the build pipeline and this server,
and what the tests build their fixtures from.
Transport
Streamable HTTP — one endpoint answering POST (requests), GET (the
server→client stream), and DELETE (session teardown). A /health endpoint returns
{"status":"ok"}.
The endpoint path was previously hard-coded to /messages/, which belongs to the SSE
transport and made the endpoint impossible to guess from any client configuration. It
is now --http-path (default /mcp).
Behind a reverse proxy
Set --http-path (or HBLS_HTTP_PATH) to the public path, and give nginx a
location with the same string. Then nginx forwards the path unchanged:
location /mcp/hbls/mcp {
proxy_pass http://127.0.0.1:8003; # 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 HBLS MCP server on 0.0.0.0:8003/mcp/hbls/mcpEnvironment variables
Variable | Default | Description |
|
| Path to SQLite DB |
|
| Listen address |
|
| Listen 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. The previous min(limit, 200) guard let
every negative through, and SQLite reads LIMIT -1 as unbounded.
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 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 headword search instead of raising.
Result size. Claude.ai and Claude Desktop truncate a tool or resource result at
roughly 150,000 characters. Search results therefore carry a snippet rather than the
full article_text — 20 full articles ran well past that limit. Use get_article for
the text of one article.
Deployment
This server runs on tei.dh.unibe.ch at
https://tei.dh.unibe.ch/mcp/hbls/mcp, alongside four sibling MCP servers:
Königsfelden, SSRQ, HLS, 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_hbls_mcp.pyUnit tests build their own throwaway database and need no setup. DB and server tests skip unless pointed at them:
HBLS_DB=/data/hbls.db HBLS_SERVER=http://localhost:8003 pytest test_hbls_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.81MIT
- Flicense-qualityBmaintenanceEnables querying the Historisches Grundbuch Basel corpus, including full-text search, person lookups, and property dossier retrieval, through MCP-compatible clients like Claude.
- AlicenseAqualityAmaintenanceMCP server for Swiss federal legislation metadata via Fedlex, enabling search and retrieval of act details with ELI URIs, SR numbers, and multilingual support.2Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for searching and retrieving full-text pages from the Library of Congress, including newspapers, books, and manuscripts, via the loc.gov API.3Apache 2.0
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/hbls_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server