owl-mcp
Health Warn
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Fail
- process.env — Environment variable access in .github/workflows/release.yml
- fs module — File system access in .github/workflows/release.yml
- fs module — File system access in npm/bin/install.js
- child_process — Shell command execution capability in npm/bin/owl-mcp.js
- spawnSync — Synchronous process spawning in npm/bin/owl-mcp.js
- process.env — Environment variable access in npm/bin/owl-mcp.js
- fs module — File system access in npm/bin/owl-mcp.js
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
MCP server for modifying OWL files written in Rust
OWL MCP
A high-performance Model Context Protocol (MCP) server and CLI for OWL ontology management, written in Rust.
Built as a drop-in replacement for ai4curation/owl-mcp, designed to eliminate the crashes and timeouts inherent to the Python implementation. Axioms are expressed in OWL Functional Syntax.
Features
- 12 MCP tools — add, remove, search, and inspect axioms; manage prefixes, labels, and ontology IRIs; scan for modeling pitfalls; evaluate ontology quality; run SPARQL queries
- CLI mode — every tool is also available as a direct CLI subcommand (
owl-mcp find-axioms ...) - 2 transport modes —
stdio(default, for Cursor/Claude Desktop) andhttp(Streamable HTTP + SSE) - Live file watching — automatically reloads ontology files modified externally
- OFN and RDF/XML support — reads and writes both formats; format is auto-detected from file extension and content
- Never crashes — errors are returned as MCP tool failures, not panics
Installation
via npx (recommended)
npx owl-mcp serve
via npm (global install)
npm install -g owl-mcp
owl-mcp --help
Build from source
Requires Rust 1.75+.
git clone https://github.com/Minitour/owl-mcp
cd owl-mcp
cargo build --release
./target/release/owl-mcp --help
Usage
owl-mcp has two modes: serve (MCP server) and CLI (direct commands).
MCP server mode
owl-mcp serve [OPTIONS]
Options:
--transport <stdio|http> Transport to use [default: stdio]
--host <HOST> Host to bind (HTTP only) [default: 127.0.0.1]
--port <PORT> Port to bind (HTTP only) [default: 8080]
--sse-support Enable legacy SSE endpoint [default: true]
CLI mode
Every MCP tool is available as a subcommand:
owl-mcp add-axiom --file ontology.owl --axiom "SubClassOf(:Dog :Animal)"
owl-mcp find-axioms --file ontology.owl --pattern "Dog" --limit 50
owl-mcp get-all-axioms --file ontology.owl --include-labels
owl-mcp test-pitfalls --file ontology.owl
owl-mcp test-quality --file ontology.owl
owl-mcp sparql --file ontology.owl --query "SELECT ?c WHERE { ?c a owl:Class }"
owl-mcp sparql --file schema.owl --file data.owl --query "ASK { ?i a :Plan }"
Run owl-mcp --help for a full list of commands, or owl-mcp <command> --help for details on a specific command.
Cursor / Claude Desktop integration
Add the server to your MCP client configuration.
Cursor (~/.cursor/mcp.json or .cursor/mcp.json in your project):
{
"mcpServers": {
"owl-mcp": {
"command": "npx",
"args": ["-y", "owl-mcp", "serve"]
}
}
}
HTTP transport (useful for remote/shared setups):
{
"mcpServers": {
"owl-mcp": {
"url": "http://localhost:8080/mcp"
}
}
}
Start the server with:
owl-mcp serve --transport http --port 8080
Tools
All tools operate on OWL files by absolute path. The manager lazily loads files on first access and caches them for subsequent calls.
Axiom operations
| Tool | Description |
|---|---|
add_axiom |
Add a single axiom in OWL Functional Syntax |
add_axioms |
Add multiple axioms in one call |
remove_axiom |
Remove an axiom |
find_axioms |
Search axioms with a regex pattern |
get_all_axioms |
List all axioms (up to a limit) |
Metadata and labels
| Tool | Description |
|---|---|
add_prefix |
Add a prefix mapping (ex: → http://example.org/) |
ontology_metadata |
Return ontology-level annotation axioms |
get_labels_for_iri |
Look up rdfs:label (or custom property) values for an IRI |
set_ontology_iri |
Set or update the ontology IRI and version IRI |
Quality checks
| Tool | Description |
|---|---|
test_pitfalls |
Scan for 31 common modeling pitfalls (inspired by OOPS!) |
test_quality |
Evaluate ontology quality using the OQuaRE framework (ISO/IEC 25000 SQuaRE) |
find_axioms and get_all_axioms accept include_labels: true to annotate each axiom with human-readable labels appended as ## <IRI> # label comments.
test_quality uses the whelk OWL EL reasoner to compute inferred class hierarchy and returns a JSON report containing 19 raw and scaled metrics (ANOnto, AROnto, CBOOnto, CROnto, DITOnto, INROnto, LCOMOnto, NACOnto, NOCOnto, NOMOnto, RFCOnto, RROnto, TMOnto, WMCOnto, and variants), 22 subcharacteristics, 7 quality characteristics (Structural, Functional Adequacy, Maintainability, Operability, Reliability, Transferability, Compatibility), and an overall OQuaRE score on a 1–5 scale.
Querying
| Tool | Description |
|---|---|
sparql_query |
Run a SPARQL query over one or more OWL files |
sparql_query takes owl_file_paths (one or more absolute paths) and a query string. Each file is serialized to RDF and loaded together into an in-memory oxigraph store, so passing several paths merges a schema with its ABox or imports before the query runs. SELECT and ASK return the standard SPARQL 1.1 JSON results format; CONSTRUCT and DESCRIBE return a list of N-Triples. Queries run over asserted triples (no reasoning is applied).
Development
# Run tests
cargo test
# Check formatting and lints
cargo fmt --check
cargo clippy --all-targets -- -D warnings
# Build release binary
cargo build --release
License
MIT
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found