GraphDB
About
Provides read-only access to Ontotext GraphDB repositories, enabling exploration of RDF graphs through SPARQL queries and structured views of repository data including class lists, predicates, statistics, and sample data.
Details
- Author
- keonchennl
- Repository
- keonchennl/mcp-server-graphdb
- GitHub stars
- 4
- Downloads
- 383
- License
- GNU General Public License v3.0
- Categories
- Database, AI, Design, Developer Tools, Search, Infrastructure, Other
- Tags
- #visualization, #analytics
Jump to
- Read-only SPARQL query execution
- List all graphs in the repository
- View RDF classes with instance counts
- List predicates with usage counts
- Access repository statistics (subjects, triples)
- Retrieve sample triples from graphs
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GraphDBCommand (node, npx, python, etc.)nodeArguments-
Argument 1
/path/to/mcp-server-graphdb/dist/index.js
Environment-
GRAPHDB_ENDPOINT
http://localhost:7200 -
GRAPHDB_PASSWORD
password -
GRAPHDB_USERNAME
username -
GRAPHDB_REPOSITORY
myRepository
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:
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.
yarn install
sparqlQuery
Execute SPARQL queries against the connected GraphDB repository. Input: query (string): The SPARQL query to execute, graph (string, optional): Specific graph IRI to target, format (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.
- sparqlQuery
- Execute SPARQL queries against the connected GraphDB repository
- Input:
- query (string): The SPARQL query to execute
- graph (string, optional): Specific graph IRI to target
- format (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
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"graphdb": {
"env": {
"GRAPHDB_ENDPOINT": "http://localhost:7200",
"GRAPHDB_PASSWORD": "password",
"GRAPHDB_USERNAME": "username",
"GRAPHDB_REPOSITORY": "myRepository"
},
"args": [
"/path/to/mcp-server-graphdb/dist/index.js"
],
"command": "node"
}
}
}
Linux
{
"env": {
"GRAPHDB_ENDPOINT": "http://localhost:7200",
"GRAPHDB_PASSWORD": "password",
"GRAPHDB_USERNAME": "username",
"GRAPHDB_REPOSITORY": "myRepository"
},
"args": [
"/path/to/mcp-server-graphdb/dist/index.js"
],
"command": "node"
}
Macos
{
"env": {
"GRAPHDB_ENDPOINT": "http://localhost:7200",
"GRAPHDB_PASSWORD": "password",
"GRAPHDB_USERNAME": "username",
"GRAPHDB_REPOSITORY": "myRepository"
},
"args": [
"/path/to/mcp-server-graphdb/dist/index.js"
],
"command": "node"
}
Windows
{
"env": {
"GRAPHDB_ENDPOINT": "http://localhost:7200",
"GRAPHDB_PASSWORD": "password",
"GRAPHDB_USERNAME": "username",
"GRAPHDB_REPOSITORY": "myRepository"
},
"args": [
"/path/to/mcp-server-graphdb/dist/index.js"
],
"command": "node"
}
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 execute
- graph (string, optional): Specific graph IRI to target
- format (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
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=password
Alternatively, you can provide the endpoint and repository as command-line arguments:
node dist/index.js http://localhost:7200 myRepository
The 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
```sh
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



