mcp-rdf-explorer
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.
claude mcp add --transport stdio emekaokoye-mcp-rdf-explorer python path/to/server.py --triple-file your_file.ttl
How to use
RDF Explorer is an MCP server that provides a conversational interface for exploring and analyzing RDF (Turtle) graphs. It supports two modes: local file mode, where you point the server at a Turtle file, and SPARQL endpoint mode, where queries are executed against a remote SPARQL endpoint. The server exposes a set of tools for querying and inspecting the graph, including executing SPARQL against an endpoint, running queries against the current graph or endpoint, obtaining graph statistics, counting triples (where supported), and performing full-text searches. It also offers prompts to analyze graph structure and generate SPARQL queries for common relationships. Use the built-in resources to retrieve schema information, predefined query templates, and exploratory query results, which can be returned in JSON or as Markdown reports. This makes RDF Explorer a practical assistant for knowledge graph research and AI data preparation. To use it, run the server in your preferred mode (local file or endpoint) and interact through the MCP host interface, sending natural language prompts and receiving structured results or query strings. Tools available include: execute_on_endpoint, sparql_query, graph_stats, count_triples, full_text_search, health_check, get_mode. Resources include schema://all, queries://{template_name}, explore://{query_name}, and explore://report. Prompts such as analyze_graph_structure, find_relationships, and text_to_sparql help generate targeted SPARQL queries and analyses.
How to install
Prerequisites:\n- Python 3.8+ (recommended latest Python 3.x)\n- pip (comes with Python)\n- Git\n\nSteps:\n1) Clone the repository:\nbash\ngit clone https://github.com/emekaokoye/mcp-rdf-explorer.git\ncd mcp-rdf-explorer\n\n2) Set up a virtual environment and activate it:\nbash\n# Unix/macOS\npython -m venv venv\nsource venv/bin/activate\n\n# Windows\npython -m venv venv\nvenv\Scripts\activate\n\n3) Install dependencies:\nbash\npip install -r requirements.txt\n\n4) Run tests (optional during development):\nbash\npytest test_rdf_explorer.py -v\n\n5) Start the server in your preferred mode (local file or SPARQL endpoint) as documented in the README. For example, in local file mode (replace paths as needed):\nbash\npython path/to/server.py --triple-file /path/to/your_file.ttl\n\nOr in SPARQL endpoint mode:\nbash\npython path/to/server.py --sparql-endpoint https://example.com/sparql\n
Additional notes
Helpful tips and common considerations:\n- In local file mode, ensure the Turtle file is accessible from the server process and is well-formed Turtle syntax.\n- In SPARQL endpoint mode, verify that the endpoint is reachable, supports the necessary query forms, and that the endpoint URL is correct.\n- Environment variables or CLI flags may be added to customize logging, endpoint timeouts, or dataset-specific options; consult the repository for any additional flags.\n- The server exposes a range of tools (execute_on_endpoint, sparql_query, graph_stats, count_triples, full_text_search) and health checks to help you monitor connectivity and data integrity.\n- Use the resources endpoints to retrieve schema (schema://all), predefined templates (queries://{template_name}), or exploratory results (explore://{query_name} and explore://report).\n- If count_triples is disabled in endpoint mode, rely on sparql_query or graph_stats for graph insights.\n- For Claude Desktop users, you can wire up the provided JSON examples to configure your local or remote RDF Explorer instance.\n- If you encounter authentication or access errors on endpoints, check network access, CORS restrictions, or required credentials in your endpoint settings.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP