mcp-ontology-layer
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., "@mcp-ontology-layercheck the ontology consistency using HermiT"
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.
Local MCP Semantic Agent with OWL, HermiT & Ollama
A fully local execution architecture on macOS for deterministic inspection, mutation, Description Logic (DL) reasoning, and SPARQL querying of banking ontologies (OWL/RDF) using LLM agents and the Model Context Protocol (MCP) over STDIO.
Core Capabilities
HermiT DL Reasoning: Integrated Description Logic reasoner (
sync_reasoner_hermit) to verify ontology consistency, compute inferred class hierarchies, and detect unsatisfiable classes.SPARQL Query Engine: Direct W3C SPARQL query execution over the RDF knowledge graph via RDFLib, allowing complex semantic queries, filtering, and aggregations.
Taxonomy & Instance Mutation (TBox/ABox): Dynamic insertion of OWL classes, subclass hierarchies, and named individual assertions.
Interactive Force-Directed Visualizations: Automatic export of the knowledge graph into interactive PyVis HTML networks.
Dual Execution Modes: Automated batch pipeline (
agente.py) and persistent conversational REPL (agent_interactive.py).
Related MCP server: OWL-MCP
Architecture
The system decouples model reasoning from graph execution across four core layers:
Agent Orchestrator:
agente.py: Automated pipeline executing batch agent goals end-to-end.agent_interactive.py: Multi-turn conversational REPL maintaining state and executing dynamic multi-step semantic workflows.
LLM Engine (
Ollama): Executes local models (e.g.,glm-5.2:cloud,qwen2.5-coder) to perform intent decomposition and parameter formatting without direct file access.MCP Server (
server.py): JSON-RPC 2.0 interface communicating over STDIO, translating model tool calls into deterministic semantic graph operations via Owlready2 and RDFLib.Semantic Layer (
core.owl): Persistent W3C RDF/XML ontology graph verified with the HermiT DL reasoner.
Repository Structure
core.owl: Base banking ontology file in RDF/XML format (W3C OWL Standard).server.py: Native JSON-RPC 2.0 MCP server providing TBox/ABox mutation, SPARQL execution, HermiT reasoning, and PyVis graph exports.agente.py: Automated batch execution agent connecting Ollama to the MCP server.agent_interactive.py: Interactive conversational REPL agent for real-time ontology management.requirements.txt: Python dependencies (owlready2,rdflib,pyvis).graph.html: Exported interactive HTML graph visualization (generated on demand).README.md: Project architecture, tool documentation, and setup instructions.
Prerequisites
OS: macOS (Apple Silicon or Intel)
Python: 3.10 or higher
Ollama: Installed and running locally
Java: OpenJDK / JRE (required by Owlready2 for the HermiT reasoner)
Installation & Environment Setup
Clone the repository and navigate to the project directory:
git clone [https://github.com/jairorodriguezarias/mcp-ontology-layer.git](https://github.com/jairorodriguezarias/mcp-ontology-layer.git)
cd mcp-ontology-layerCreate and activate a virtual environment:
python3 -m venv venv
source venv/bin/activateInstall required dependencies:
pip install -r requirements.txt4 . Download the model in Ollama:
ollama pull glm-5.2:cloudRun the agent demo:
python3 agente.py6 .
python3 agent_interactive.pyVisualizing the Knowledge Graph
open graph.htmlAvailable MCP Tools
list_classes
Parameters: None
Description: Loads
core.owland returns all registered ontology classes.add_subclass
Parameters:
new_class(string, required),parent_class(string, required)Description: Inserts a new class under an existing parent class and saves the updated RDF/XML graph to disk.
create_individual
Parameters:
class_name(string, required),individual_id(string, required)Description: Instantiates a concrete ABox individual belonging to a specific class.
check_consistency
Parameters: None
Description: Runs the HermiT Description Logic (DL) reasoner to verify logical consistency and detect unsatisfiable classes.
execute_sparql
Parameters:
query(string, required)Description: Executes a standard W3C SPARQL query against the RDF knowledge graph.
export_graph
Parameters:
output_html(string, optional; default:graph.html)Description: Generates an interactive force-directed HTML graph visualization of the ontology using PyVis.
This server cannot be installed
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 Servers
- 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
- FlicenseNot gradedqualityCmaintenanceA Model-Context-Protocol server that enables AI assistants to create, edit, and manage Web Ontology Language (OWL) ontologies through function calls using OWL functional syntax.18
- AlicenseAqualityDmaintenanceAn MCP server that enables AI-powered exploration of RDF data and SPARQL querying via RDF4J. It provides tools for executing queries, searching knowledge graph resources, and retrieving schema summaries.131MIT
- AlicenseAqualityAmaintenanceAI-native ontology engineering MCP server for OWL/RDF/SPARQL. Validate, query, diff, lint, version, and govern knowledge graphs via Oxigraph triple store.42455MIT
Related MCP Connectors
Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
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/jairorodriguezarias/mcp-ontology-layer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server