Skip to content

MCP with Claude Code

Install

Install the runtime first:

Terminal window
npx ontoskills install mcp

This gives you the managed runtime binary:

~/.ontoskills/bin/ontomcp

Register the server

Fastest bootstrap:

Terminal window
npx ontoskills install mcp --claude

Manual equivalent:

Terminal window
claude mcp add --scope user ontomcp -- \
~/.ontoskills/bin/ontomcp

Project-local instead:

Terminal window
npx ontoskills install mcp --claude --project

If you want to force a specific ontology root manually:

Terminal window
claude mcp add --scope user ontomcp -- \
~/.ontoskills/bin/ontomcp --ontology-root ~/.ontoskills/ontologies

Verify

Terminal window
claude mcp get ontomcp
claude mcp list

Expected state:

Status: ✓ Connected

What Claude Code can use

Once connected, Claude Code can call:

  • search_skills
  • get_skill_context
  • evaluate_execution_plan
  • query_epistemic_rules

Troubleshooting

Connection fails

Check:

  • ~/.ontoskills/bin/ontomcp exists
  • ~/.ontoskills/ontologies/ exists
  • index.enabled.ttl or compiled .ttl files exist

Ontology not found

Run with an explicit root:

Terminal window
~/.ontoskills/bin/ontomcp --ontology-root ~/.ontoskills/ontologies

Rebuilt binary but Claude still behaves strangely

Remove and re-add the MCP server, or restart Claude Code. A stale background process can keep the old binary alive.