mcp-ontology-layer
Local MCP Semantic Agent with OWL, HermiT & Ollama
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.txt4 . Ollama에서 모델을 다운로드합니다:
ollama pull glm-5.2:cloud에이전트 데모를 실행합니다:
python3 agente.py6 .
python3 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