logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-semantic-data-explorer

Interface for querying Ontotext GraphDB RDF stores using SPARQL. This tool facilitates data discovery and analytical operations via read-only access to the underlying graph structure.

Author

mcp-semantic-data-explorer logo

keonchennl

GNU General Public License v3.0

Quick Info

GitHub GitHub Stars 8
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

graphdbsparqlrdfgraphdb explorerdf graphsontotext graphdb

MseeP.ai Security Assessment Badge

GraphDB MCP Server

A Model Context Protocol server offering unidirectional (read-only) connectivity to an Ontotext GraphDB repository. This service empowers Large Language Models to traverse RDF graphs and execute structured query language (SPARQL) commands against the GraphDB deployment.

Operational Tools

Functions

  • submitSparql
  • Executes a specified SPARQL query against the linked GraphDB instance.
  • Parameters:
    • query (text): The SPARQL statement intended for execution.
    • graph (text, optional): The specific named graph URI target.
    • format (text, optional): Desired output serialization (e.g., json, xml, csv).
  • Note: All submissions enforce read-only constraints.

  • fetchGraphsList

  • Retrieves a catalog of all accessible graphs within the data store.
  • Requires zero input arguments.

Data Views

The server exposes several HTTP endpoints reflecting the repository's contents:

  • Schema Classes (graphdb://<host>/repository/<repo>/classes)
  • Enumerates all defined RDF classes alongside their triple counts.

  • Properties/Predicates (graphdb://<host>/repository/<repo>/predicates)

  • Lists all properties utilized, including frequency statistics.

  • Repository Metrics (graphdb://<host>/repository/<repo>/stats)

  • Delivers aggregate counts for subjects, predicates, objects, and total triples.

  • Data Snippet (graphdb://<host>/repository/<repo>/sample)

  • Displays a representative subset of the stored triples.

  • Specific Graph View (graphdb://<host>/repository/<repo>/graph/<graphUri>)

  • Provides sample triples and metadata for a chosen named graph.

Configuration Setup

Configuration can be established through environment variables defined in a .env file:

GRAPHDB_ENDPOINT=http://localhost:7200 GRAPHDB_REPOSITORY=myRepository GRAPHDB_USERNAME=username GRAPHDB_PASSWORD=password

Alternatively, parameters can be passed directly upon execution:

node dist/index.js http://localhost:7200 myRepository

Command-line arguments override values specified in environment variables.

Integration with Desktop Client

For utilization within the Claude Desktop environment, incorporate the following snippet into the mcpServers section of claude_desktop_config.json:

{ "mcpServers": { "graphdb": { "command": "node", "args": [ "/path/to/mcp-server-graphdb/dist/index.js" ], "env": { "GRAPHDB_ENDPOINT": "http://localhost:7200", "GRAPHDB_REPOSITORY": "myRepository", "GRAPHDB_USERNAME": "username", "GRAPHDB_PASSWORD": "password" } } } }

Customize the path and credentials to match your deployment.

Initial Setup Procedures

sh

Obtain the source code repository

git clone https://github.com/keonchennl/mcp-server-graphdb.git cd mcp-server-graphdb

Install necessary software packages

yarn install

Compile the application assets

yarn build

Illustrative SPARQL Inquiries

These examples demonstrate query patterns executable via this server:

  1. Ontology Class Enumeration: sparql PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# SELECT DISTINCT ?class ?label WHERE { { ?class a rdfs:Class } UNION { ?class a owl:Class } OPTIONAL { ?class rdfs:label ?label } } ORDER BY ?class

  2. Property Retrieval for a Designated Class: sparql PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# SELECT ?property ?label ?range WHERE { ?property rdfs:domain http://example.org/YourClass . OPTIONAL { ?property rdfs:label ?label } OPTIONAL { ?property rdfs:range ?range } } ORDER BY ?property

  3. Instance Tally Grouped by Class: sparql PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# SELECT ?class (COUNT(?instance) AS ?count) WHERE { ?instance a ?class } GROUP BY ?class ORDER BY DESC(?count)

Licensing Information

This MCP server software is distributed under the terms of the GPL-3.0 License. Users retain the freedom to utilize, revise, and disseminate the software, provided adherence to the stipulations outlined in the GNU GPL-3.0 License is maintained.

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`