Skip to main content
Glama
beingdb-mcp

beingdb-mcp

by jptmoore

beingdb-mcp

一个轻量级的 Model Context Protocol (MCP) 服务器,将 BeingDB 的 HTTP API(包括其 find/where 查询 DSL)暴露给支持 MCP 的 LLM。它本身不将自然语言转换为查询:连接的 LLM 发现 BeingDB 的谓词,编写 DSL,然后 beingdb-mcp 通过 BeingDB 验证/执行该 DSL 并返回结果,并且始终包含其运行的确切查询以保证透明度。

快速开始

# 1. Compile your facts into ./pack_store using BeingDB's native CLI
#    (beingdb-compile --git ./git_store --pack ./pack_store)

# 2. Start everything: BeingDB, beingdb-mcp, and an nginx reverse proxy in front of both
docker compose up -d

就是这样——beingdb 和 mcp 都使用纯 HTTP 协议,并且只能通过 nginx(docker-compose.yml/nginx.conf)访问,在主机上以 :8090 端口发布:

  • BeingDB 的 REST API:http://<host>:8090/...(例如 /version、/predicates、/query)

  • MCP(可流式 HTTP):http://<host>:8090/mcp

将任何支持远程/HTTP 服务器的 MCP 客户端直接指向该 /mcp URL——无需本地进程生成、无需 SSH、客户端除了 URL 外无需任何配置。nginx.conf 添加了 10 req/s 的速率限制(与 BeingDB 自身推荐的配置一致)——将其放在您自己的 Apache(或其他)虚拟主机后面以实现 TLS/进一步的访问控制。beingdb 和 mcp 在设计上均无需身份验证(与 BeingDB 自身的 HTTP API 相同);如果您不希望端点完全公开,请在前面添加身份验证(Apache/nginx)。如果您的 BeingDB 代码库不在 ../beingdb,请在 docker-compose.yml 中调整 beingdb 服务的 build.context。

所有三个容器上的 restart: unless-stopped 意味着在无头主机(例如 Raspberry Pi)上,只需执行一次 docker compose up -d 即可完成整个部署——运行一次并保持运行(同时将 Docker 本身设置为开机自启)。

Related MCP server: NL-to-SQL MCP

尝试使用

探索 beingdb-mcp 最简单的方法是使用基于浏览器的 MCP 客户端。打开 MCP Playground Online 并连接到:

rewind.zedstar.org/mcp

每个 beingdb_query/beingdb_validate_query/beingdb_explain_query 结果都包含提交的确切 query,因此 LLM 生成的 DSL 及其结果始终可见。

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server enabling natural-language querying of SQLite databases via schema discovery, GraphRAG retrieval, and safely guarded read-only SQL execution.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Exposes internal databases, HTTP APIs, and files to LLM agents over MCP, with auto-generated schemas, access controls, rate limiting, redaction, and audit logging.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes remote, agent-facing MCP endpoints over Streamable HTTP for web search, webpage parsing, local knowledge-base retrieval and document creation, and delegation of tasks to configurable LLM providers. Also bundles an admin console with onboarding, provider/model configuration, API-key management, and call logging.
    MIT