Skip to content

protege-mcp v0.3.2

Choose a tag to compare

@github-actions github-actions released this 30 Jun 17:37

SPARQL support for the active ontology — author, validate, and run queries. 47 → 50 tools.

New tools

  • sparql_query — run a SPARQL 1.1 query (SELECT / ASK / CONSTRUCT / DESCRIBE) over the active ontology and its imports closure, using an embedded Apache Jena ARQ engine. Read-only: UPDATE and SERVICE are rejected, so a query never edits the model or reaches the network. The ontology's prefixes (plus rdf/rdfs/owl/xsd) are auto-prepended, and limit caps the rows/triples returned. By default it sees the asserted triples (like Protégé's SPARQL Query tab); set include_inferred=true to first materialise the active reasoner's inferences (run run_reasoner first).
  • sparql_schema — discover the queryable vocabulary for writing a query: the prefix map (plus a ready-to-paste PREFIX block), classes, object/data properties (with their domains and ranges), individuals and datatypes — each with a CURIE and full IRI — plus example queries built from the ontology's own terms. Use keyword to focus on a sub-topic.
  • sparql_validate — check a draft query before running it (parse-only, or dry_run for a small sample). Reports whether it parses, the query form and variables, whether sparql_query would accept it, and unknown_terms — IRIs used in the query (graph patterns, property paths, VALUES, the CONSTRUCT template, DESCRIBE targets) that are not declared in the ontology, i.e. likely typos or terms from another vocabulary.

New prompt

  • author_sparql_query — guided workflow that chains the above: discover the vocabulary → draft → validate → run → iterate.

Notes

  • Apache Jena ARQ is inlined into the bundle; sparql_query / sparql_validate snapshot the imports closure into a private throwaway ontology (never mutating the live model) and run off the EDT, so a query can neither edit the ontology nor reach the network.
  • Requires a Java 17+ JVM (unchanged).

Install: download protege-mcp-0.3.2.jar below, or use Protégé ▸ File ▸ Check for plugins.