EM

emekaokoye/mcp-rdf-explorer

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

56 stars 11 forks Качество 80 Тренд 14MIT

emekaokoye/mcp-rdf-explorer - кандидат на сервер MCP, импортированный из https://github.com/emekaokoye/mcp-rdf-explorer.

Обзор

emekaokoye/mcp-rdf-explorer - кандидат на сервер MCP, импортированный из https://github.com/emekaokoye/mcp-rdf-explorer.

Обзор (машинный перевод)

Обзор

Сервер Model Context Protocol (MCP), который обеспечивает диалоговый интерфейс для исследования и анализа RDF (Черепаха) на основе графа знаний в режиме локального файла или SPARQL Endpoint. Этот сервер облегчает связь между приложениями ИИ (хосты / клиенты) и данными RDF, делая исследование графов и анализ данных графов через запросы SPARQL. Идеальный инструмент для исследования графов знаний и подготовки данных ИИ.

Компоненты

Инструменты

Сервер реализует запросы SPARQL и функции поиска:

  • [[Т0]] Выполнить запрос SPARQL непосредственно на внешней конечной точке

  • Ввод:

  • endpoint (str): URL конечной точки SPARQL для запроса. query (str): Запрос SPARQL для выполнения. ctx (Контекст): Объект контекста FastMCP. Возврат: Результаты запроса как новая строка или сообщение об ошибке.

  • [[Т4]] Выполнить запрос SPARQL на текущем графике или активной внешней конечной точке

  • Ввод: query (str): Запрос SPARQL для выполнения. ctx (Контекст): Объект контекста FastMCP. use_service (bool): Использовать ли пункт СЕРВИС для федеративных запросов в локальном режиме (по умолчанию: True).

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

RDF Explorer v1.0.0

Overview

A Model Context Protocol (MCP) server that provides conversational interface for the exploration and analysis of RDF (Turtle) based Knowledge Graph in Local File mode or SPARQL Endpoint mode. This server facilitates communication between AI applications (hosts/clients) and RDF data, making graph exploration and analyzing graph data through SPARQL queries. A perfect tool for knowledge graph research and AI data preparation.

Components

Tools

The server implements SPARQL queries and search functionality:

  • execute_on_endpoint

    • Execute a SPARQL query directly on an external endpoint
    • Input:
      • endpoint (str): The SPARQL endpoint URL to query.
      • query (str): The SPARQL query to execute.
      • ctx (Context): The FastMCP context object.
    • Returns: Query results as a newline-separated string, or an error message.
  • sparql_query

    • Execute a SPARQL query on the current graph or active external endpoint
    • Input:
      • query (str): The SPARQL query to execute.
      • ctx (Context): The FastMCP context object.
      • use_service (bool): Whether to use a SERVICE clause for federated queries in local mode (default: True).
    • Returns: Query results as a newline-separated string, or an error message.
  • graph_stats

    • Calculate and return statistics about the graph in JSON format
    • Input:
      • ctx (Context): The FastMCP context object.
    • Returns: JSON string containing graph statistics (e.g., triple count, unique subjects).
  • count_triples

    • Count triples in the graph. Disabled in SPARQL Endpoint Mode; use a custom prompt instead.
    • Input:
      • ctx (Context): The FastMCP context object.
    • Returns: Number of triples as a string, or an error message.
  • full_text_search

    • Perform a full-text search on the graph or endpoint, avoiding proprietary syntax.
    • Input:
      • search_term (str): The term to search for.
      • ctx (Context): The FastMCP context object.
    • Returns: Search results as a newline-separated string, or an error message.
  • health_check

    • Check the health of the triplestore connection.
    • Input:
      • ctx (Context): The FastMCP context object.
    • Returns: ‘Healthy’ if the connection is good, 'Unhealthy: ’ otherwise.
  • get_mode

    • Get the current mode of RDF Explorer. Useful for knowledge graph and semantic tech users to verify data source.
    • Input:
      • ctx (Context): The FastMCP context object.
    • Returns: A message indicating the mode and dataset or endpoint.

Resources

The server exposes the following resources:

  • schema://all: Retrieve schema information (classes and properties) from the graph.

    • Returns: A newline-separated string of schema elements (classes and properties).
  • queries://{template_name}: Retrieve a predefined SPARQL query template by name.

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "rdf_explorer": { "command": "C:\\path\\to\\venv\\Scripts\\python.exe", "args": ["C:\\path\\to\\server.py", "--triple-file", "your_file.ttl"] } } }