Connects to Apache Jena Fuseki server to execute SPARQL queries and updates against RDF data, allowing access to and modification of graph databases.
Manages environment variables for configuring the MCP server, including API keys, server URLs, and dataset specifications.
Hosts the repository for the MCP server code, allowing for version control and distribution of the server implementation.
Serves as the runtime environment for the MCP server, enabling execution of JavaScript/TypeScript code for handling SPARQL queries and RDF data operations.
Powers the implementation of the MCP server, providing type safety and modern language features for robust SPARQL query handling.
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:
- Install dependencies:
- Build the TypeScript code:
Usage
Run the server with default settings (localhost:3030 for Jena, 'ds' for dataset):
Or specify custom Jena endpoint, dataset, and authentication credentials:
You can also use short flags:
For development mode with automatic transpilation:
Docker
You can run the MCP Jena server using Docker:
Building the Docker image
Running with Docker
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:
Insert data with UPDATE:
Query a specific named graph:
Resources
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
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.
Related MCP Servers
- -securityFlicense-qualityA server implementation that allows AI models to interact with Jira through the Model Context Protocol, enabling tasks like JQL searches and retrieving issue details.Last updated -Python
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to interact with local Logseq knowledge graphs, supporting operations like creating/editing pages and blocks, searching content, and managing journal entries.Last updated -137PythonMIT License
CodeAlive MCPofficial
-securityAlicense-qualityA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.Last updated -40PythonMIT License- -securityFlicense-qualityModel Context Protocol server that allows AI assistants to interact with Jira, supporting operations like creating tickets and fetching project information directly from the cursor.Last updated -Python