mcp-ontology-layer
OWL、HermiT、Ollama によるローカルMCPセマンティックエージェント
macOS上で完全にローカルに動作する実行アーキテクチャ。LLMエージェントとModel Context Protocol (MCP) over STDIOを使用して、銀行オントロジー(OWL/RDF)の決定的な検査、変更、Description Logic (DL)推論、SPARQLクエリを実行します。
主な機能
HermiT DL推論: 統合されたDescription Logic推論器(
sync_reasoner_hermit)により、オントロジーの整合性を検証し、推論されたクラス階層を計算し、充足不可能なクラスを検出します。SPARQLクエリエンジン: RDFLibを介してRDFナレッジグラフに対してW3C SPARQLクエリを直接実行し、複雑なセマンティッククエリ、フィルタリング、集計を可能にします。
タクソノミーとインスタンスの変更(TBox/ABox): OWLクラス、サブクラス階層、名前付き個体のアサーションを動的に挿入します。
インタラクティブなフォース指向ビジュアライゼーション: ナレッジグラフをインタラクティブなPyVis HTMLネットワークに自動エクスポートします。
デュアル実行モード: 自動バッチパイプライン(
agente.py)と永続的な対話型REPL(agent_interactive.py)。
Related MCP server: OWL-MCP
アーキテクチャ
このシステムは、モデル推論とグラフ実行を4つのコアレイヤーに分離します:
エージェントオーケストレータ:
agente.py: バッチエージェントの目標をエンドツーエンドで実行する自動パイプライン。agent_interactive.py: 状態を維持し、動的なマルチステップのセマンティックワークフローを実行するマルチターン対話型REPL。
LLMエンジン(
Ollama): ローカルモデル(例:glm-5.2:cloud、qwen2.5-coder)を実行し、ファイルへの直接アクセスなしで意図の分解とパラメータのフォーマットを実行します。MCPサーバー(
server.py): STDIOを介して通信するJSON-RPC 2.0インターフェース。モデルのツール呼び出しを、Owlready2とRDFLibを介した決定的なセマンティックグラフ操作に変換します。セマンティックレイヤー(
core.owl): HermiT DL推論器で検証された永続的なW3C RDF/XMLオントロジーグラフ。
リポジトリ構造
core.owl: RDF/XML形式の基本銀行オントロジーファイル(W3C OWL標準)。server.py: TBox/ABox変更、SPARQL実行、HermiT推論、PyVisグラフエクスポートを提供するネイティブJSON-RPC 2.0 MCPサーバー。agente.py: OllamaをMCPサーバーに接続する自動バッチ実行エージェント。agent_interactive.py: リアルタイムのオントロジー管理のためのインタラクティブな対話型REPLエージェント。requirements.txt: Python依存関係(owlready2、rdflib、pyvis)。graph.html: エクスポートされたインタラクティブなHTMLグラフビジュアライゼーション(オンデマンドで生成)。README.md: プロジェクトアーキテクチャ、ツールドキュメント、セットアップ手順。
前提条件
OS: macOS (Apple SiliconまたはIntel)
Python: 3.10以上
Ollama: インストールされ、ローカルで実行中
Java: OpenJDK / JRE (HermiT推論器のためにOwlready2が必要)
インストールと環境セットアップ
リポジトリをクローンし、プロジェクトディレクトリに移動します:
git clone [https://github.com/jairorodriguezarias/mcp-ontology-layer.git](https://github.com/jairorodriguezarias/mcp-ontology-layer.git)
cd mcp-ontology-layer仮想環境を作成してアクティベートします:
python3 -m venv venv
source venv/bin/activate必要な依存関係をインストールします:
pip install -r requirements.txtOllamaでモデルをダウンロードします:
ollama pull glm-5.2:cloudエージェントデモを実行します:
python3 agente.pypython3 agent_interactive.pyナレッジグラフの可視化
open graph.html利用可能なMCPツール
list_classes
パラメータ: なし
説明:
core.owlをロードし、登録されているすべてのオントロジークラスを返します。add_subclass
パラメータ:
new_class(文字列、必須)、parent_class(文字列、必須)説明: 既存の親クラスの下に新しいクラスを挿入し、更新されたRDF/XMLグラフをディスクに保存します。
create_individual
パラメータ:
class_name(文字列、必須)、individual_id(文字列、必須)説明: 特定のクラスに属する具体的なABox個体をインスタンス化します。
check_consistency
パラメータ: なし
説明: HermiT Description Logic (DL)推論器を実行して、論理的な整合性を検証し、充足不可能なクラスを検出します。
execute_sparql
パラメータ:
query(文字列、必須)説明: RDFナレッジグラフに対して標準のW3C SPARQLクエリを実行します。
export_graph
パラメータ:
output_html(文字列、オプション; デフォルト:graph.html)説明: PyVisを使用して、オントロジーのインタラクティブなフォース指向HTMLグラフビジュアライゼーションを生成します。
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