shebanq-mcp
Enables users to ask plain-language linguistic questions about the Hebrew Bible and receive the corresponding MQL query and results from the BHSA database, with the query always visible for verification and citation.
README
shebanq-mcp
Ask the Hebrew Bible a linguistic question in plain language and get back two things together: the MQL query and the results. An LLM drafts the query, a local Emdros engine runs it against the BHSA database (the same data behind SHEBANQ), and the server returns both. The query is always shown, so it stays the thing you read, verify, and cite.
This is an MCP server: it plugs into clients like Claude as a set of tools.
Status: early. The core server is built and unit-tested. The Emdros execution path is implemented but exercised only where a built BHSA database is present (those tests skip otherwise). The demo web app and deployment are not done yet. Feedback welcome, especially from people who teach or use MQL.
Why
Querying BHSA today means knowing MQL, the BHSA feature vocabulary, and the SHEBANQ interface. Generative AI can draft a query from a plain-language question, which raises a real worry for scholarship and teaching: if a machine writes the query, does the scholar still learn anything?
This tool takes a position on that question. The translation was never the whole of the work. The scholarly act is judging whether a query faithfully captures a form-to-function question, reading what a result does and does not show, and catching a query that quietly asks the wrong thing. So the design keeps the query visible and central rather than hiding it:
- The query is the product, not the answer. Every result carries the exact MQL that produced it. It is reproducible and pastes straight into SHEBANQ to save, share, and cite. Nothing comes back as a black box.
- Validation before execution. A query is checked against the BHSA feature
catalogue first, so a wrong code like
vs=niphal(the correct code isvs=nif) fails loudly instead of silently returning zero. - Honest empty results. Zero matches returns the query and a clear "0 results", so you can tell "the query is wrong" from "the phenomenon is not there".
AI as a way in, not a way around.
Tools
| Tool | Purpose |
|---|---|
search_bhsa(question) |
Plain-language question to generated MQL plus results |
run_mql(mql) |
Validate and run MQL you already have |
lookup_feature(name_or_term) |
A BHSA feature's gloss and valid values |
run_mql and lookup_feature need no LLM. search_bhsa drafts the query with
an LLM, with the feature catalogue injected into the prompt.
LLM provider
Translation is isolated behind a Translator interface, so the provider is
swappable. Select it with the LLM_PROVIDER environment variable:
anthropic(default) — drafts MQL with the Anthropic API. NeedsANTHROPIC_API_KEY.none— runs translation-free.search_bhsais disabled and returns an error pointing you atrun_mql. Use this inside an MCP client (Claude can draft the query itself and callrun_mql), so the server makes no external calls and needs no key.
Adding another provider (OpenAI, a local model) is a small adapter: a class with
a translate() method plus a branch in build_translator(). Query quality
varies by model, so use the featured-search regression set to measure any given
model's reliability.
How it works
question
-> LLM drafts MQL (guided by the feature catalogue)
-> validator (reject unknown features/values; reject unparseable MQL)
-> Emdros runner (execute on the local BHSA SQLite database)
-> formatter (verse references, Hebrew, glosses)
-> { mql, result_count, results }
Four small, independently testable units: a static feature reference, a
validator, an Emdros runner, and a formatter, wired together behind the MCP
tools. See docs/specs for the design and
docs/superpowers/plans for the implementation plan.
Setup
- Install Emdros (provides the
mqlCLI and theemdrosPython binding). - Build the database (see Data).
pip install -e ".[dev]"(Python 3.10+).- Choose an LLM provider (see LLM provider). For the default,
set
ANTHROPIC_API_KEY; or setLLM_PROVIDER=noneto run translation-free. - Run:
BHSA_SQLITE=data/bhsa.sqlite3 shebanq-mcp
Data
BHSA version: 2021 (pinned). Download the MQL dump from the
ETCBC/bhsa release assets to data/bhsa.mql,
then build the read-only SQLite database:
mql --backend sqlite3 -d data/bhsa.sqlite3 data/bhsa.mql
Data files are gitignored and never committed.
Tests
pytest -q # unit tests, no database needed
BHSA_SQLITE=data/bhsa.sqlite3 pytest -m emdros # database-backed tests
Emdros-backed tests skip cleanly when the binding or database is absent. After building the database, confirm the Emdros Python API and pin the featured-search counts:
python scripts/spike_emdros.py data/bhsa.sqlite3
then fill in the expected_count values in
tests/fixtures/featured_searches.json
from real runs. Those fixtures are the regression backbone and, later, the demo
gallery content.
Roadmap
- [x] Core MCP server: feature reference, validator, Emdros runner, formatter, three tools
- [ ] Pin featured-search counts against a built BHSA database
- [ ] Demo web app (static front-end with curated, validated searches)
- [ ] Deploy: Render Pro Web Service (Docker, Emdros-on-SQLite, data baked in)
- [ ] Full feature-catalogue generation from the ETCBC feature docs
Credits
Built on the work of the Eep Talstra Centre for Bible and Computer (ETCBC): the BHSA dataset, SHEBANQ, and the Emdros query engine. This project wraps that work; it does not replace it.
License
MIT. The BHSA data is licensed separately by the ETCBC and is not included in this repository.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。