GraphDB MCP Server
The GraphDB MCP Server provides read-only access to an Ontotext GraphDB instance, enabling exploration of RDF graphs and execution of SPARQL queries.
Execute SPARQL queries: Run read-only SPARQL queries against the repository with optional graph targeting and response format selection.
List available graphs: Retrieve a list of all graphs in the repository.
View repository data: Access structured views including class lists, predicates, statistics, sample data, and specific graph content.
Custom configuration: Configure server parameters via environment variables or command-line arguments for flexible deployment.
Integration with Claude Desktop: Use with Claude Desktop app for enhanced functionality.
Supports configuration through environment variables in a .env file for GraphDB connection details including endpoint, repository, username, and password.
Allows installation of the MCP server through git clone from a repository.
Supports XML as one of the available response formats for SPARQL query results.
Used for package management, installing dependencies, and building the project.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GraphDB MCP Serverlist all classes in the repository with their instance counts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GraphDB MCP Server
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.
Components
Tools
sparqlQuery
Execute SPARQL queries against the connected GraphDB repository
Input:
query(string): The SPARQL query to executegraph(string, optional): Specific graph IRI to targetformat(string, optional): Response format (json, xml, csv)
All queries are executed in read-only mode
listGraphs
Lists all graphs available in the repository
No input parameters required
Resources
The server provides multiple views of the repository data:
Class List (
graphdb://<host>/repository/<repo>/classes)Lists all RDF classes found in the repository with counts
Predicates (
graphdb://<host>/repository/<repo>/predicates)Lists all predicates (properties) with usage counts
Statistics (
graphdb://<host>/repository/<repo>/stats)Provides counts of subjects, predicates, objects, and triples
Sample Data (
graphdb://<host>/repository/<repo>/sample)Shows a sample of triples from the repository
Graph Content (
graphdb://<host>/repository/<repo>/graph/<graphUri>)Provides sample data from specific graphs along with metadata
Related MCP server: RDF Explorer
Configuration
You can configure the server using environment variables by creating a .env file:
GRAPHDB_ENDPOINT=http://localhost:7200
GRAPHDB_REPOSITORY=myRepository
GRAPHDB_USERNAME=username
GRAPHDB_PASSWORD=passwordAlternatively, you can provide the endpoint and repository as command-line arguments:
node dist/index.js http://localhost:7200 myRepositoryThe command-line arguments take precedence over environment variables.
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your 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"
}
}
}
}Replace the values with your specific GraphDB configuration.
Installation
# Clone the repository
git clone https://github.com/keonchennl/mcp-server-graphdb.git
cd mcp-server-graphdb
# Install dependencies
yarn install
# Build the project
yarn buildExample SPARQL Queries
Here are some example SPARQL queries you can run with this server:
List all classes in the ontology:
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 ?classList all properties for a specific class:
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 ?propertyCount instances by class:
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)License
This MCP server is licensed under the GPL-3.0 License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the GNU GPL-3.0 License.
Available Tools
2 toolslistGraphsB
List all graphs in the repository
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists graphs but doesn't describe how it behaves—e.g., whether it's read-only, safe, requires authentication, has rate limits, or what the output format might be. This leaves significant gaps in understanding the tool's operational traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It is front-loaded with the core action and resource, making it highly efficient and easy to understand at a glance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema), the description is minimal but incomplete. It lacks behavioral context, usage guidelines, and output details, which are important even for simple tools. Without annotations or an output schema, the description should do more to inform the agent about what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't need to add parameter details, as there are none to explain. It efficiently states the tool's purpose without unnecessary parameter information, meeting the baseline for tools with no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and the resource ('all graphs in the repository'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from the sibling tool 'sparqlQuery', which might also involve graph operations, so it doesn't reach the highest score of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling 'sparqlQuery' or any alternatives. It lacks context about use cases, prerequisites, or exclusions, offering only a basic statement of purpose without operational guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sparqlQueryA
Execute a read-only SPARQL query against the GraphDB repository
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Optional: Response format (json, xml, csv) | json |
| graph | No | Optional: Specific graph IRI to query | |
| query | Yes | The SPARQL query to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the 'read-only' behavioral trait, which is crucial for safety, but lacks details on other aspects like authentication needs, rate limits, error handling, or response structure. This is a minimal but adequate disclosure given the simple query nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with zero waste—it directly states the tool's purpose and key constraint ('read-only'). Every word earns its place, making it highly efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (executing queries with parameters) and no annotations or output schema, the description is minimally complete. It covers the core purpose and safety ('read-only') but lacks guidance on result handling or advanced usage, leaving gaps for the agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all three parameters. The description doesn't add any meaning beyond what the schema provides (e.g., no extra details on query syntax or format implications). Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Execute'), resource ('SPARQL query'), and target ('GraphDB repository'), and distinguishes from the sibling tool 'listGraphs' by specifying query execution rather than listing. It's precise and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states 'read-only', which provides clear context for when to use this tool (for queries that don't modify data). However, it doesn't mention when not to use it or explicitly compare it to the sibling tool 'listGraphs' beyond the implied difference in purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- First observed
listGraphs - First observed
sparqlQuery
TDQS
The two tools have clearly distinct purposes: one lists available graphs, while the other executes queries against them. There is no overlap in functionality, making it impossible to confuse their intended use.
Both tools use camelCase naming, which is consistent, but they follow different patterns: 'listGraphs' uses a verb-noun structure, while 'sparqlQuery' uses a noun-verb structure. This minor deviation prevents a perfect score.
With only two tools, the server feels thin for a GraphDB domain, lacking essential operations like creating, updating, or deleting graphs or data. This minimal set is insufficient for typical database workflows.
The server covers listing and querying but misses critical CRUD operations for a GraphDB system, such as creating graphs, inserting data, or modifying content. This creates significant gaps that will hinder agent tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
A Model Context Protocol server for Wix AI tools
Read-only MCP server exposing a user ORANO library to their own AI agent.
1Token-free MCP server for structured RevoGrid Core, Pro, and Enterprise knowledge retrieval.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA 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.8MIT
- AlicenseNot gradedqualityFmaintenanceThe Model Context Protocol (MCP) server provides a conversational interface for the exploration and analysis of RDF Turtle Knowledge Graph in Local File mode or SPARQL Endpoint.54MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that connects GraphDB's SPARQL endpoints and Ollama models to Claude, enabling Claude to query and manipulate ontology data while leveraging various AI models.283MIT

Memgraph MCP Serverofficial
-licenseCqualityNot gradedmaintenanceA lightweight server implementation of the Model Context Protocol that connects Memgraph database with LLMs, allowing users to interact with graph databases through natural language.125-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/keonchennl/mcp-server-graphdb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server