MCP Server for Apache Jena
A Model Context Protocol server that connects AI agents to Apache Jena, enabling them to execute SPARQL queries and updates against RDF data stored in Jena Fuseki.
ramuzes
README
MCP Server for Apache Jena
A Model Context Protocol (MCP) server that connects AI agents to Apache Jena for SPARQL query capabilities.
Overview
This project implements an MCP server that allows AI agents (such as Cursor, Claude for Cline, or Claude Desktop) to access and query RDF data stored in Apache Jena. The server provides tools for executing SPARQL queries and updates against a Jena Fuseki server.
Features
- Execute SPARQL queries against a Jena Fuseki server
- Execute SPARQL updates to modify RDF data
- List available named graphs in the dataset
- HTTP Basic authentication support for Jena Fuseki
- Compatible with the Model Context Protocol
Prerequisites
- Node.js (v16 or later)
- Apache Jena Fuseki server running with your RDF data loaded
- An AI agent that supports the Model Context Protocol (e.g., Cursor, Claude for Cline)
Installation
-
Clone this repository:
git clone https://github.com/ramuzes/mcp-jena.git cd mcp-jena
-
Install dependencies:
npm install
-
Build the TypeScript code:
npm run build
Usage
Run the server with default settings (localhost:3030 for Jena, 'ds' for dataset):
npm start
Or specify custom Jena endpoint, dataset, and authentication credentials:
npm start -- --endpoint http://your-jena-server:3030 --dataset your_dataset --username your_username --password your_password
You can also use short flags:
npm start -- -e http://your-jena-server:3030 -d your_dataset -u your_username -p your_password
For development mode with automatic transpilation:
npm run dev:transpile -- -e http://your-jena-server:3030 -d your_dataset -u your_username -p your_password
Available Tools
This MCP server provides the following tools:
execute_sparql_query
- Execute a SPARQL query against the Jena datasetexecute_sparql_update
- Execute a SPARQL update query to modify the datasetlist_graphs
- List all available named graphs in the dataset
Environment Variables
You can also configure the server using environment variables:
JENA_FUSEKI_URL
: URL of your Jena Fuseki server (default: http://localhost:3030)DEFAULT_DATASET
: Default dataset name (default: ds)JENA_USERNAME
: Username for HTTP Basic authentication to Jena FusekiJENA_PASSWORD
: Password for HTTP Basic authentication to Jena FusekiPORT
: Port for the MCP server (for HTTP transport, default: 8080)API_KEY
: API key for MCP server authentication
Example SPARQL Queries
Basic SELECT query:
SELECT ?subject ?predicate ?object
WHERE {
?subject ?predicate ?object
}
LIMIT 10
Insert data with UPDATE:
PREFIX ex: <http://example.org/>
INSERT DATA {
ex:subject1 ex:predicate1 "object1" .
ex:subject2 ex:predicate2 42 .
}
Query a specific named graph:
SELECT ?subject ?predicate ?object
FROM NAMED <http://example.org/graph1>
WHERE {
GRAPH <http://example.org/graph1> {
?subject ?predicate ?object
}
}
LIMIT 10
Resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.