GraphDB MCP 服务器
提供对 Ontotext GraphDB 的只读访问的模型上下文协议 (MCP) 服务器。该服务器使 LLM 能够探索 RDF 图并针对 GraphDB 实例执行 SPARQL 查询。
成分
工具
- sparql查询
- 针对连接的 GraphDB 存储库执行 SPARQL 查询
- 输入:
query
(字符串):要执行的 SPARQL 查询graph
(字符串,可选):要针对的特定图形 IRIformat
(字符串,可选):响应格式(json、xml、csv)
- 所有查询均以只读模式执行
- 列表图
- 列出存储库中所有可用的图表
- 无需输入参数
资源
服务器提供了存储库数据的多个视图:
- 类列表(
graphdb://<host>/repository/<repo>/classes
)- 列出存储库中找到的所有 RDF 类及其计数
- 谓词(
graphdb://<host>/repository/<repo>/predicates
)- 列出所有谓词(属性)及其使用次数
- 统计信息(
graphdb://<host>/repository/<repo>/stats
)- 提供主语、谓语、宾语和三元组的计数
- 示例数据(
graphdb://<host>/repository/<repo>/sample
)- 显示来自存储库的三元组示例
- 图表内容(
graphdb://<host>/repository/<repo>/graph/<graphUri>
)- 提供特定图表的样本数据以及元数据
配置
您可以通过创建.env
文件来使用环境变量配置服务器:
或者,您可以将端点和存储库作为命令行参数提供:
命令行参数优先于环境变量。
与 Claude Desktop 一起使用
要将此服务器与 Claude Desktop 应用程序一起使用,请将以下配置添加到claude_desktop_config.json
的“mcpServers”部分:
用您的特定 GraphDB 配置替换这些值。
安装
SPARQL 查询示例
以下是您可以使用该服务器运行的一些 SPARQL 查询示例:
- 列出本体中的所有类:
- 列出特定类的所有属性:
- 按类别计数实例:
执照
此 MCP 服务器采用 GPL-3.0 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 GNU GPL-3.0 许可证的条款和条件。
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器提供对 Ontotext GraphDB 的只读访问,使 LLM 能够探索 RDF 图并执行 SPARQL 查询。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server implementation that enables LLMs to interact with NebulaGraph database for graph exploration, supporting schema understanding, queries, and graph algorithms.Last updated -16PythonApache 2.0
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -7331MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.Last updated -TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -9TypeScript