Skip to main content
Glama
MatthiasVanDE

jena-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JENA_DATASETYesThe dataset name
JENA_ENDPOINTYesThe URL of the Apache Jena Fuseki server
JENA_PASSWORDNoPassword for authentication
JENA_USERNAMENoUsername for authentication
JENA_FILES_DIRNoThe only directory the file tools may touch; until set, the file tools refuse to run
JENA_READ_ONLYNoSet to true to hide the seven writing tools rather than refusing them on call

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
sparql_queryA

Run a read-only SPARQL query (SELECT, CONSTRUCT, ASK or DESCRIBE).

Forms: SELECT returns rows, CONSTRUCT and DESCRIBE return triples, ASK returns a boolean. WHERE is optional -- "SELECT ?s { ?s ?p ?o }" is valid SPARQL.

Property paths are the reason to reach for SPARQL over a REST API: a/b sequence ?s foaf:knows/foaf:name ?name a|b alternative ?s (rdfs:label|skos:prefLabel) ?label a* zero or more ?s skos:broader* ?ancestor a+ one or more ?s rdfs:subClassOf+ ?super a? zero or one ^a inverse ?child ^ex:hasParent ?parent !a negated ?s !rdf:type ?o

Named graphs: GRAPH { ?s ?p ?o }, or GRAPH ?g { ... } to range over all of them. Note that a query without a GRAPH clause reads the default graph, which on many datasets is empty unless the store is configured with a union default graph.

Results are capped. A SELECT without its own LIMIT gets one appended (see default_limit), because an unbounded exploration query over even a small dataset can return hundreds of thousands of characters. Pass limit: 0 to lift the cap deliberately, and out_file to send a large result to disk instead of through the conversation.

sparql_updateA

Run a SPARQL Update: INSERT, DELETE, LOAD, CLEAR, CREATE, DROP, COPY, MOVE or ADD.

To create a named graph, insert into it: INSERT DATA { GRAPH { "o" } }

CREATE GRAPH on its own is not enough on TDB2. It answers 200, but a graph with no triples does not exist as far as anything else is concerned -- list_graphs will not show it and the Graph Store Protocol answers 404 for it.

For replacing a whole graph from a file, write_graph and load_rdf_file are better: they do not put the RDF through this conversation.

describe_resourceB

Everything the store knows about one IRI, in both directions.

Returns the triples where the IRI is the subject and, unless you turn it off, those where it is the object -- which is usually where the interesting part is, because it shows what points at the thing.

Faster to reach for than writing the query by hand, and it names the graph each triple came from.

list_graphsA

List the named graphs in a dataset, with a triple count for each.

Only graphs holding at least one triple appear, and on TDB2 that is the whole story: an empty graph is indistinguishable from one that was never created. If a graph you just made is missing, it has no triples yet.

The default graph is reported separately, because a query without a GRAPH clause reads that one -- and on a store without a union default graph it is often empty while the named graphs are full.

read_graphA

Fetch one named graph whole, as Turtle.

One HTTP request, and it never touches the query parser -- the right way to read a graph you intend to inspect or copy. A CONSTRUCT returns the same triples but has to be parsed as a query first.

A 404 here means the graph holds no triples. That is not an error about the endpoint.

Graphs get large quickly; pass out_file for anything beyond a few hundred triples.

write_graphA

Replace or extend one named graph with RDF you supply.

mode "replace" (the default) makes the graph exactly what you send: whatever was in it is gone. mode "merge" adds to what is there.

Replacing per graph is how a versioned schema is kept in sync -- one graph per module, so that updating one cannot wipe another.

Give the RDF either inline (content) or from a file (file). Prefer the file for anything beyond a handful of triples: it goes straight to the server instead of through the conversation.

drop_graphA

Delete a named graph and everything in it. There is no undo.

Run backup_dataset first if the contents matter.

A 404 means the graph was already empty, which on TDB2 means it did not exist.

load_rdf_fileA

Load an RDF file from the sandbox into a dataset.

Accepts Turtle, N-Triples, TriG, N-Quads, JSON-LD and RDF/XML; the media type comes from the extension. TriG and N-Quads carry their own graph names, so do not pass a target graph with those -- the file decides.

This exists so that bulk RDF never has to pass through the conversation. A 44 kB ontology rewritten as INSERT DATA costs roughly 11 000 tokens; here it costs none.

list_datasetsA

List the datasets on this Fuseki server and the endpoints each offers.

Reach for this first when a call fails with 405. Fuseki answers 405 -- not 404 -- for a dataset name it does not know, which reads like "wrong method" when it actually means "no such dataset".

The endpoint names matter too. A dataset configured through an assembler file often exposes only "sparql", while Fuseki's stock configuration also accepts "query". This shows which one you have.

dataset_statsA

Size and shape of a dataset: triple counts, graphs, classes and properties.

A quick orientation for a store you have not seen before -- how much is in it, how it is divided over graphs, and which types and predicates dominate.

create_datasetA

Create a dataset on the server.

kind "tdb2" (the default) is persistent and survives a restart; "mem" is in-memory and is gone when the server stops -- useful for a scratch space, and a trap if you meant to keep the data.

Fuseki writes a configuration file for the new dataset, so it comes back after a restart. A dataset created this way has the stock endpoints: sparql, query, update, data and get.

delete_datasetA

Remove a dataset from the server and delete its files. Irreversible.

This is not "unmount": the data on disk goes too. Take a backup first if there is anything in it you would miss.

server_infoA

Version, uptime and per-dataset request statistics.

Worth a call at the start of a session to confirm you are talking to the server you think you are -- a wrong endpoint that happens to answer is otherwise hard to spot.

backup_datasetA

Start a server-side backup of a dataset.

The backup is written on the server, into Fuseki's backups directory, and runs in the background: this returns a task id to poll with task_status.

Do this before anything destructive. There is no undo for drop_graph or delete_dataset.

Listed as a read tool deliberately -- it copies data out, it does not change it, so it stays available when the server runs read-only.

compact_datasetA

Compact a TDB2 dataset, reclaiming space held by superseded data.

Runs in the background; poll with task_status. delete_old removes the pre-compaction copy once it succeeds, which frees the most space and cannot be undone.

Only meaningful for TDB2 datasets.

task_statusA

The state of a background task started by backup_dataset or compact_dataset.

A task that has finished reports a "finished" timestamp; one still running does not.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 16 tools

Disambiguation4/5

Most tools have clearly distinct purposes (e.g., load_rdf_file vs write_graph vs sparql_update), but read_graph and describe_resource overlap somewhat in retrieving graph data, and sparql_query could be used for many read operations. Descriptions help clarify boundaries, so ambiguity is minimal.

Naming Consistency4/5

Predominantly snake_case verb_noun pattern (e.g., load_rdf_file, create_dataset, drop_graph), but a few names like dataset_stats and task_status are noun-first rather than verb-first. Still, the convention is mostly consistent and readable.

Tool Count5/5

16 tools is well-scoped for a Jena/Fuseki MCP server covering dataset management, graph operations, querying, and background tasks. Each tool earns its place without redundancy.

Completeness4/5

Covers most lifecycle operations: create/delete datasets, load/write/read graphs, SPARQL query/update, backup, compact, and task status. Missing a direct tool to list all triples or export a dataset, but these can be achieved via SPARQL. Minor gaps exist but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues