MCP Graphdb MCP Server

MCP server for interacting with Ontotext GraphDB via SPARQL

Local serverstdio

What is the MCP Graphdb MCP server?

MCP server for interacting with Ontotext GraphDB via SPARQL. That is what the mcp graphdb mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A Model Context Protocol server that provides read-only access to Ontotext GraphDB. This server enables LLMs to explore RDF graphs and execute SPARQL queries against a GraphDB instance.

The tools it exposes

The server publishes 5 tools. What each one is for:

  • sparqlQuery — Execute SPARQL queries against the connected GraphDB repository
  • Input — - query (string): The SPARQL query to execute
  • listGraphs — Lists all graphs available in the repository
  • Tools — The Tools tool exposed by this server
  • Resources — The Resources tool exposed by this server

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

What it needs from you

Configuration is passed through the environment: GRAPHDB_ENDPOINT, GRAPHDB_REPOSITORY, GRAPHDB_USERNAME, GRAPHDB_PASSWORD. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP Graphdb's toolset — sparqlQuery, Input, listGraphs and 2 more — is a fair guide to whether it matches your workflow. It is maintained by keonchennl; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
sparqlQueryExecute SPARQL queries against the connected GraphDB repository
Input- query (string): The SPARQL query to execute
listGraphsLists all graphs available in the repository
ToolsThe Tools tool exposed by this server.
ResourcesThe Resources tool exposed by this server.

How to install the MCP Graphdb MCP server

{
  "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"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GRAPHDB_ENDPOINTConfiguration value read at startup.Optional
GRAPHDB_REPOSITORYConfiguration value read at startup.Optional
GRAPHDB_USERNAMEConfiguration value read at startup.Optional
GRAPHDB_PASSWORDConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Graphdb to sparqlQuery.
  • Use MCP Graphdb to Input.
  • Use MCP Graphdb to listGraphs.

Frequently asked questions

It connects MCP Graphdb to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (sparqlQuery, Input, listGraphs, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Graphdb directly.