MetaOntology OS MCP Server Plugin
OpenCrab
MetaOntology OS MCP Server Plugin
Carcinization is the evolutionary tendency for crustaceans to converge on a crab-like body plan. OpenCrab applies the same principle to agent environments: all sufficiently advanced AI systems eventually evolve toward ontology-structured forms.
OpenCrab is an MCP (Model Context Protocol) server that exposes the MetaOntology OS grammar to any OpenClaw-compatible agent environment — Claude Code, n8n, LangGraph, and beyond.
Architecture
┌─────────────────────────────────────────────┐
│ OpenCrab MCP Server │
│ (stdio JSON-RPC) │
└──────────────────┬──────────────────────────┘
│
┌────────────────────────────┼────────────────────────────┐
│ │ │
┌───────▼──────┐ ┌────────▼───────┐ ┌────────▼───────┐
│ grammar/ │ │ ontology/ │ │ stores/ │
│ manifest.py │ │ builder.py │ │ │
│ validator.py│ │ rebac.py │ │ neo4j_store │
│ glossary.py │ │ impact.py │ │ chroma_store │
└──────────────┘ │ query.py │ │ mongo_store │
└────────────────┘ │ sql_store │
└───────┬────────┘
│
┌──────────────────────────────────────┤
│ Data Layer │
┌───────────────┼───────────────┬──────────────────────┤
│ │ │ │
┌───────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐ ┌────────────▼───┐
│ Neo4j │ │ ChromaDB │ │ MongoDB │ │ PostgreSQL │
│ (graph) │ │ (vectors) │ │ (documents)│ │ (registry + │
│ Cypher │ │ semantic │ │ audit log │ │ ReBAC policy)│
│ traversal │ │ search │ │ │ │ │
└──────────────┘ └─────────────┘ └────────────┘ └────────────────┘
MetaOntology OS — 9 Spaces
| Space | Node Types | Role |
|---|---|---|
| subject | User, Team, Org, Agent | Actors with identity and agency |
| resource | Project, Document, File, Dataset, Tool, API | Artifacts that subjects act upon |
| evidence | TextUnit, LogEntry, Evidence | Raw empirical observations |
| concept | Entity, Concept, Topic, Class | Abstract knowledge |
| claim | Claim, Covariate | Derived assertions |
| community | Community, CommunityReport | Concept clusters |
| outcome | Outcome, KPI, Risk | Measurable results |
| lever | Lever | Tunable control variables |
| policy | Policy, Sensitivity, ApprovalRule | Governance rules |
MetaEdge Relationship Grammar
subject ──[owns, manages, can_view, can_edit, can_execute, can_approve]──► resource
resource ──[contains, derived_from, logged_as]──────────────────────────► evidence
evidence ──[mentions, describes, exemplifies]────────────────────────────► concept
evidence ──[supports, contradicts, timestamps]───────────────────────────► claim
concept ──[related_to, subclass_of, part_of, influences, depends_on]────► concept
concept ──[contributes_to, constrains, predicts, degrades]──────────────► outcome
lever ──[raises, lowers, stabilizes, optimizes]───────────────────────► outcome
lever ──[affects]─────────────────────────────────────────────────────► concept
community ──[clusters, summarizes]────────────────────────────────────────► concept
policy ──[protects, classifies, restricts]─────────────────────────────► resource
policy ──[permits, denies, requires_approval]──────────────────────────► subject
Quick Start
1. Start the data services
docker-compose up -d
This starts Neo4j, MongoDB, PostgreSQL, and ChromaDB.
2. Install OpenCrab
pip install -e ".[dev]"
3. Configure environment
opencrab init # creates .env from template
# Edit .env if your credentials differ from defaults
4. Seed example data
python scripts/seed_ontol
Tools (3)
query_ontologyPerform hybrid searches and traverse entity relationships within the MetaOntology OS.manage_entityCreate, update, or delete entities and relationships within the ontological framework.impact_analysisConduct impact analysis to determine how changes to levers or policies affect outcomes.Environment Variables
NEO4J_URIrequiredConnection string for the Neo4j graph databaseCHROMA_DB_PATHrequiredPath or connection string for ChromaDB vector storageMONGO_URIrequiredConnection string for MongoDB document storageConfiguration
{"mcpServers": {"opencrab": {"command": "python", "args": ["path/to/opencrab/main.py"]}}}