MCP Server for Apache Jena
Apache Jena 的 MCP 服务器
模型上下文协议 (MCP) 服务器将 AI 代理连接到 Apache Jena 以实现 SPARQL 查询功能。
概述
该项目实现了一个 MCP 服务器,允许 AI 代理(例如 Cursor、Claude for Cline 或 Claude Desktop)访问和查询存储在 Apache Jena 中的 RDF 数据。该服务器提供了针对 Jena Fuseki 服务器执行 SPARQL 查询和更新的工具。
Related MCP server: RDF Explorer
特征
针对 Jena Fuseki 服务器执行 SPARQL 查询
执行 SPARQL 更新以修改 RDF 数据
列出数据集中可用的命名图
Jena Fuseki 的 HTTP Basic 身份验证支持
与模型上下文协议兼容
先决条件
Node.js(v16 或更高版本)
Apache Jena Fuseki 服务器正在运行,并加载了您的 RDF 数据
支持模型上下文协议的AI代理(例如Cursor,Claude for Cline)
安装
克隆此存储库:
git clone https://github.com/ramuzes/mcp-jena.git cd mcp-jena安装依赖项:
npm install构建 TypeScript 代码:
npm run build
用法
使用默认设置运行服务器(Jena 为 localhost:3030,数据集为“ds”):
npm start或者指定自定义 Jena 端点、数据集和身份验证凭据:
npm start -- --endpoint http://your-jena-server:3030 --dataset your_dataset --username your_username --password your_password您还可以使用短标志:
npm start -- -e http://your-jena-server:3030 -d your_dataset -u your_username -p your_password对于具有自动转译的开发模式:
npm run dev:transpile -- -e http://your-jena-server:3030 -d your_dataset -u your_username -p your_passwordDocker
您可以使用 Docker 运行 MCP Jena 服务器:
构建 Docker 镜像
docker build -t mcp-jena .使用 Docker 运行
docker run -e JENA_FUSEKI_URL=http://your-jena-server:3030 -e DEFAULT_DATASET=your_dataset mcp-jena可用工具
该 MCP 服务器提供以下工具:
execute_sparql_query- 对 Jena 数据集执行 SPARQL 查询execute_sparql_update- 执行 SPARQL 更新查询来修改数据集list_graphs- 列出数据集中所有可用的命名图
环境变量
您还可以使用环境变量配置服务器:
JENA_FUSEKI_URL:Jena Fuseki 服务器的 URL(默认值: http://localhost:3030 )DEFAULT_DATASET:默认数据集名称(默认值:ds)JENA_USERNAME:用于 Jena Fuseki HTTP Basic 身份验证的用户名JENA_PASSWORD:用于 Jena Fuseki 的 HTTP Basic 身份验证的密码PORT:MCP 服务器的端口(用于 HTTP 传输,默认值:8080)API_KEY:MCP 服务器身份验证的 API 密钥
SPARQL 查询示例
基本 SELECT 查询:
SELECT ?subject ?predicate ?object
WHERE {
?subject ?predicate ?object
}
LIMIT 10使用 UPDATE 插入数据:
PREFIX ex: <http://example.org/>
INSERT DATA {
ex:subject1 ex:predicate1 "object1" .
ex:subject2 ex:predicate2 42 .
}查询特定命名的图:
SELECT ?subject ?predicate ?object
FROM NAMED <http://example.org/graph1>
WHERE {
GRAPH <http://example.org/graph1> {
?subject ?predicate ?object
}
}
LIMIT 10资源
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
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides read-only access to Ontotext GraphDB, enabling LLMs to explore RDF graphs and execute SPARQL queries.21116GPL 3.0
- AlicenseNot gradedqualityFmaintenanceThe Model Context Protocol (MCP) server provides a conversational interface for the exploration and analysis of RDF Turtle Knowledge Graph in Local File mode or SPARQL Endpoint.54MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that connects GraphDB's SPARQL endpoints and Ollama models to Claude, enabling Claude to query and manipulate ontology data while leveraging various AI models.283MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that provides tools for querying SPARQL endpoints, with specialized support for Proto-OKN knowledge graphs hosted on the FRINK platform.8BSD 3-Clause
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP server for AI dialogue using various LLM models via AceDataCloud
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/ramuzes/mcp-jena'
If you have feedback or need assistance with the MCP directory API, please join our Discord server