GraphDB MCP Server

Integrations
  • 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.

GraphDB MCP-Server

Ein Model Context Protocol-Server, der schreibgeschützten Zugriff auf Ontotext GraphDB bietet. Dieser Server ermöglicht LLMs die Untersuchung von RDF-Graphen und die Ausführung von SPARQL-Abfragen an eine GraphDB-Instanz.

Komponenten

Werkzeuge

  • sparqlQuery
    • Führen Sie SPARQL-Abfragen für das verbundene GraphDB-Repository aus
    • Eingang:
      • query (Zeichenfolge): Die auszuführende SPARQL-Abfrage
      • graph (Zeichenfolge, optional): Spezifischer Graph-IRI zum Ziel
      • format (Zeichenfolge, optional): Antwortformat (JSON, XML, CSV)
    • Alle Abfragen werden im Nur-Lese-Modus ausgeführt
  • listGraphs
    • Listet alle im Repository verfügbaren Graphen auf
    • Keine Eingabeparameter erforderlich

Ressourcen

Der Server bietet mehrere Ansichten der Repository-Daten:

  • Klassenliste ( graphdb://<host>/repository/<repo>/classes )
    • Listet alle im Repository gefundenen RDF-Klassen mit Anzahl auf
  • Prädikate ( graphdb://<host>/repository/<repo>/predicates )
    • Listet alle Prädikate (Eigenschaften) mit Nutzungszählungen auf
  • Statistiken ( graphdb://<host>/repository/<repo>/stats )
    • Bietet Zählungen von Subjekten, Prädikaten, Objekten und Tripeln
  • Beispieldaten ( graphdb://<host>/repository/<repo>/sample )
    • Zeigt eine Auswahl von Tripeln aus dem Repository
  • Graph-Inhalt ( graphdb://<host>/repository/<repo>/graph/<graphUri> )
    • Bietet Beispieldaten aus bestimmten Diagrammen zusammen mit Metadaten

Konfiguration

Sie können den Server mithilfe von Umgebungsvariablen konfigurieren, indem Sie eine .env Datei erstellen:

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

Alternativ können Sie den Endpunkt und das Repository als Befehlszeilenargumente angeben:

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

Die Befehlszeilenargumente haben Vorrang vor Umgebungsvariablen.

Verwendung mit Claude Desktop

Um diesen Server mit der Claude Desktop-App zu verwenden, fügen Sie dem Abschnitt „mcpServers“ Ihrer claude_desktop_config.json die folgende Konfiguration hinzu:

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

Ersetzen Sie die Werte durch Ihre spezifische GraphDB-Konfiguration.

Installation

# Clone the repository git clone https://github.com/yourname/mcp-server-graphdb.git cd mcp-server-graphdb # Install dependencies yarn install # Build the project yarn build

Beispiele für SPARQL-Abfragen

Hier sind einige Beispiele für SPARQL-Abfragen, die Sie mit diesem Server ausführen können:

  1. Listen Sie alle Klassen in der Ontologie auf:
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
  1. Alle Eigenschaften für eine bestimmte Klasse auflisten:
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
  1. Instanzen nach Klasse zählen:
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)

Lizenz

Dieser MCP-Server ist unter der GPL-3.0-Lizenz lizenziert. Das bedeutet, dass Sie die Software unter den Bedingungen der GNU GPL-3.0-Lizenz frei verwenden, ändern und verbreiten können.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Ein Model Context Protocol-Server, der schreibgeschützten Zugriff auf Ontotext GraphDB bietet und es LLMs ermöglicht, RDF-Graphen zu untersuchen und SPARQL-Abfragen auszuführen.

  1. Komponenten
    1. Werkzeuge
    2. Ressourcen
  2. Konfiguration
    1. Verwendung mit Claude Desktop
      1. Installation
        1. Beispiele für SPARQL-Abfragen
          1. Lizenz

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server implementation that enables LLMs to interact with NebulaGraph database for graph exploration, supporting schema understanding, queries, and graph algorithms.
              Last updated -
              16
              Python
              Apache 2.0
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
              Last updated -
              536
              1
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.
              Last updated -
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
              Last updated -
              9
              TypeScript
              • Apple
              • Linux

            View all related MCP servers

            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-graphdb'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server