ontology-mcp
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., "@ontology-mcpWhy can't leosmab.admin login? Get the diagnostic descriptor."
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.
Login Query Agent — Ontology MCP & Knowledge Graph
A production-ready POC that uses an OWL/SHACL/SKOS Knowledge Graph + MCP Semantic Descriptor Service to route login-diagnosis queries across SQL Server and MongoDB, with conditional New Relic escalation.
Architecture at a Glance
User prompt (VS Code Copilot)
│
▼
ontology-mcp ──► Fuseki KG (local) ──► SPARQL query
│
▼
JSON-LD descriptor
(WHERE to query, WHAT to validate, HOW to route)
│
▼
Agent executes queries
├── SQL Server (UM_Users, Um_Userpartnermapping, um_usermobileverificationstatus)
├── MongoDB (users collection)
└── New Relic (only if all SHACL shapes pass)Related MCP server: GrACE-MCP
Services Overview
Service | Type | Who starts it | Required for |
Apache Jena Fuseki | Local process | You (manual) | MCP to work |
MCP Server ( | stdio child process | VS Code auto-spawns | Agent tool calls |
SQL Server | Remote server | Already running | Data queries (Layer 7+) |
MongoDB | Remote server | Already running | Data queries (Layer 7+) |
New Relic | Cloud service | Always available | Escalation (Layer 7+) |
Only Fuseki requires a manual start. Everything else is either auto-spawned or remote.
Prerequisites
1. Java 11+
Required to run the Fuseki JAR.
java -version
# Expected: openjdk version "11.x.x" or higher2. Apache Jena Fuseki JAR (not committed — download manually)
The JAR is excluded from git due to its size (54 MB).
Download
apache-jena-fuseki-X.Y.Z.zipfrom https://jena.apache.org/download/Extract
fuseki-server.jarand place it at:infra/fuseki/fuseki-server.jar
3. Python (3.12+)
python --version
# Expected: Python 3.12.x or higher4. Python dependencies
cd c:\Ontology
python -m pip install -r requirements.txt5. VS Code Copilot (MCP support)
VS Code 1.99 or later
GitHub Copilot extension installed and signed in
Global MCP config at
C:\Users\<you>\AppData\Roaming\Code\User\mcp.json(see below)
Step-by-Step Local Startup
Step 1 — Start Fuseki (Knowledge Graph)
Open a terminal and run:
cd c:\Ontology
java -jar infra\fuseki\fuseki-server.jar --config infra\fuseki\config\login-kg.ttlKeep this terminal open — Fuseki runs as a foreground process.
Verify it is running:
# Open a second terminal and run:
python -c "import requests; r = requests.get('http://localhost:3030/$/ping'); print('Fuseki UP:', r.status_code)"
# Expected: Fuseki UP: 200Fuseki UI: http://localhost:3030
Step 2 — Load the Knowledge Graph
Required every time Fuseki starts fresh (first time, or after a restart where data was lost). Skip if Fuseki already has data from a previous session.
Open a second terminal:
cd c:\Ontology
$env:PYTHONIOENCODING = "utf-8"
# Load all 7 named graphs into Fuseki
python scripts/kg/load_kg.py --schema login --version 1.0.0
# Promote v1.0.0 as the active version
python scripts/kg/promote.py --schema login --version 1.0.0Expected output ends with:
✅ Promoted successfully. login current = v1.0.0Verify the KG is loaded:
python -c "
import requests, json
r = requests.post('http://localhost:3030/login-kg/sparql',
data={'query': 'SELECT (COUNT(*) AS ?n) WHERE { GRAPH <urn:kg:login:v1.0.0:ontology> { ?s ?p ?o } }'},
headers={'Accept': 'application/sparql-results+json'})
print('Triples in ontology graph:', r.json()['results']['bindings'][0]['n']['value'])
"
# Expected: Triples in ontology graph: 949Step 3 — VS Code MCP Registration (one-time setup)
This only needs to be done once. If already configured, skip.
Create or update the global MCP config file:
C:\Users\<your-username>\AppData\Roaming\Code\User\mcp.json
{
"servers": {
"ontology-mcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "mcp_server.server"],
"cwd": "c:\\Ontology",
"env": {
"PYTHONPATH": "c:\\Ontology\\src",
"PYTHONIOENCODING": "utf-8"
}
}
}
}Then reload VS Code (Ctrl+Shift+P → Developer: Reload Window).
The MCP server is not started manually. VS Code spawns it automatically as a child process when Copilot Agent mode makes a tool call.
Step 4 — Use in VS Code Copilot
Open Copilot Chat (
Ctrl+Alt+I)Switch to Agent mode (dropdown next to send button → Agent)
Ask a login-related question:
Why can't a user login? Use the ontology-mcp to get the diagnostic descriptor.or more specifically:
The user leosmab.admin cannot login.
First call resolve_intent with prompt "user cannot login" to get the descriptor,
then show me which tables to query and what to check.Tip: Pass the intent signal separately from the username. The MCP matches on pattern keywords (
login issue,user cannot login, etc.), not on the actual username value.
MCP Tools Reference
Tool | Input | Returns |
|
| JSON-LD descriptor — entities, shapes, rules |
|
| Full column/field mapping for one entity |
|
| All supported intent patterns |
Valid class names for get_entity_descriptor
User→ SQL ServerUM_UsersPartnerMapping→ SQL ServerUm_UserpartnermappingMobileVerificationStatus→ SQL Serverum_usermobileverificationstatusUserDocument→ MongoDBusers
Supported intent patterns (login schema)
"can't login"
"login failure"
"login issue"
"login not working"
"login problem"
"unable to login"
"user cannot login"
"user login failed"
"why can't {username} login"Troubleshooting
MCP returns sparql_failed
Fuseki is not running. Go back to Step 1 and start it.
MCP returns no_intent_match
The prompt doesn't contain any of the known patterns. Call list_intents first,
then rephrase using one of the listed patterns.
MCP returns schema_not_found
The schema name is wrong. Currently only login is registered in ontology/schemas/registry.yaml.
Fuseki starts but KG graphs are empty
Run Step 2 (load + promote). This happens after every fresh Fuseki start since
the TDB2 data directory (infra/fuseki/data/) was not persisted from a previous session.
UnicodeEncodeError on Windows
Add $env:PYTHONIOENCODING = "utf-8" before running any Python script in PowerShell.
Project Structure
c:\Ontology\
├── src/
│ └── mcp_server/ # MCP server package (PYTHONPATH=src)
│ ├── server.py # MCP stdio entrypoint
│ ├── kg/sparql_client.py # Fuseki SPARQL client
│ ├── registry/schema_registry.py # reads registry.yaml
│ └── tools/
│ ├── resolve_intent.py
│ ├── get_descriptor.py
│ └── list_intents.py
│
├── ontology/
│ ├── schemas/
│ │ ├── registry.yaml # schema manifest
│ │ └── login/v1.0.0/login.yaml # LinkML source of truth
│ └── sparql/
│ ├── resolve_intent.sparql
│ ├── get_entity_descriptor.sparql
│ ├── list_intents.sparql
│ └── get_decision_rules.sparql
│
├── artifacts/login/v1.0.0/
│ ├── owl/login.owl.ttl # OWL 2 DL (949 triples)
│ ├── shacl/login.shacl.ttl # SHACL shapes (332 triples)
│ ├── skos/login.skos.ttl # SKOS concept scheme (129 triples)
│ ├── rules/login.rules.ttl # Decision rules (58 triples)
│ ├── descriptors/login.descriptors.json
│ └── jsonld/login.context.jsonld
│
├── scripts/
│ ├── generate/ # artifact generation pipeline
│ └── kg/
│ ├── load_kg.py # load named graphs into Fuseki
│ └── promote.py # promote a version as current
│
├── infra/
│ └── fuseki/
│ ├── fuseki-server.jar # Apache Jena Fuseki 6.1.0
│ ├── config/login-kg.ttl # dataset config (TDB2)
│ └── data/ # TDB2 persistent storage (gitignored)
│
├── config/settings.yaml # non-secret runtime config
├── .env.example # secrets template — copy to .env
├── .env # local secrets — never committed
├── requirements.txt
└── README.md # this fileDaily Workflow
Every session:
1. Start Fuseki → java -jar infra\fuseki\fuseki-server.jar --config infra\fuseki\config\login-kg.ttl
2. Load KG (if needed) → python scripts/kg/load_kg.py --schema login --version 1.0.0
3. Promote (if needed) → python scripts/kg/promote.py --schema login --version 1.0.0
4. Open VS Code → Copilot Agent mode picks up ontology-mcp automatically
One-time setup:
- pip install -r requirements.txt
- Configure C:\Users\<you>\AppData\Roaming\Code\User\mcp.json (PYTHONPATH: c:\\Ontology\\src)
- Reload VS Code windowThis 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
- AlicenseAqualityCmaintenanceAn MCP server that enables LLMs to perform semantic and fulltext searches within Neo4j while executing complex, search-augmented Cypher queries for GraphRAG applications. It provides tools for database schema discovery and supports multi-provider embeddings to facilitate advanced graph traversals.Last updated52MIT
- Flicense-quality-maintenanceA knowledge graph MCP server that integrates Graphiti and the ACE framework for conversational management of Neo4j-based entities and relationships. It enables AI agents to perform semantic searches, manage data isolation, and utilize automatic learning strategies.Last updated2
- Flicense-qualityDmaintenanceMCP server allowing AI agents to query New Relic for debugging incidents.Last updated
- Alicense-qualityBmaintenanceAn MCP server that ingests semiconductor PDFs into a Neo4j knowledge graph, enabling AI agents to query domain knowledge, verify claims against source text, and record design reasoning.Last updatedMIT
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
GibsonAI MCP server: manage your databases with natural language
Hosted MCP server exposing US hospital procedure cost data to AI assistants
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/JiteAgar-Code/ontology-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server