myKG CLI

myKG builds a confidence scored knowledge graph from mixed documents and serves it to an agent through MCP or a Claude Code skill.

  • 85 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Document contents go to the chosen model provider, and agent mode edits `CLAUDE.md` and copies a skill.
All reasons and checks

senolisci/mykg

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/mykg

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Document contents go to the chosen model provider, and agent mode edits `CLAUDE.md` and copies a skill.

This is third-party code. Review the repository files before installing.

What it does

myKG reads a folder of Markdown, TXT, PDF, Word, PowerPoint, Excel, HTML and image files and builds a knowledge graph grounded in an induced RDFS and OWL ontology. It works in two passes: first a shared schema is induced over the corpus, then typed entities and relationships are extracted from each file. Every record gets a confidence score. The `mykg init`, `mykg extract-graph`, `mykg query`, `mykg detect-schema-drift` and `mykg prune-schema` commands cover setup, extraction, graph questions and schema cleanup. `mykg mcp-serve` exposes the graph to an agent over MCP as read only. In Claude Code agent mode a skill dispatches tasks to subagents in parallel.

Who it is for. Researchers and developers with a large folder of documents who need an inspectable knowledge graph and questions to it from Claude Code or Claude Desktop.

Good fit when

  • Notes and reports in different formats must be merged into one graph.
  • An agent needs read only MCP access to the graph.
  • Extraction should run through a Claude Code subscription without a separate API key.
  • The graph schema grew and unused concepts must be removed.

Not a fit when

  • There are few documents and ordinary text search is enough.
  • Content cannot be sent to the chosen model provider.
  • You need a ready cloud knowledge base with no setup of your own.

Example request

Build a knowledge graph from the `my_notes/` folder, then answer from it which projects are connected to this customer.

Limitations

Extraction uses Anthropic, OpenAI, Gemini, Ollama or OpenRouter models, so file contents go to the chosen provider except with local Ollama. It needs Python 3.11 or newer, and the `mykg init` wizard asks for a provider, model and key. Claude Code agent mode copies a skill into `~/.claude/skills/mykg` and appends a managed section to `CLAUDE.md`. The `claude-cli` profile is serial. The graph is rebuilt on each run, and large corpora take plenty of time and tokens.

How to disable. Run `pip uninstall mykg`, delete `~/.claude/skills/mykg` and the managed section from `CLAUDE.md`, and remove `mykg` entries from `.mcp.json`. Delete the `mykg_sessions` folder separately.

FAQ

How do I serve the graph as an MCP server?

Run `mykg mcp-serve`. `--session` picks a session and `--transport streamable_http --port 3100` enables HTTP.

Is an API key needed?

Not in `agent-claude-code` mode: subagents run tasks on your Claude plan. Other profiles take a key in `mykg init`.

How do I view the result?

Open `knowledge_graph.html` from `mykg_sessions/<timestamp>/output/` in a browser.

What does `mykg prune-schema` do?

Removes unused schema concepts and properties. `--preview` shows the plan and `--plan` applies an edited one.

Can it run locally?

Yes, pick the `ollama-local` profile in `mykg init`: the model runs on your machine.

Discussion

No questions or reviews yet.

CLI tools

A knowledge graph with an MCP server: the agent searches concepts by meaning and sees how well each is supported.

MCP serverExtended access131Repository stars

KGLite keeps a knowledge graph in one file, and its bundled MCP server gives agents Cypher queries with no separate database.

MCP serverExtended access77Repository stars
Official

A CLI and MCP server that extracts structured knowledge from documents: graphs, hypergraphs, and fact search with sources

CLIExtended access4.2KRepository stars
Official

The official Graphlit MCP server: an agent collects material from Slack, GitHub, mail and websites into a knowledge base and searches it

MCP serverBroad access379Repository stars

MCP server for the Flexible GraphRAG platform: ingest from 14 data sources, hybrid search and AI answers over a knowledge graph

MCP serverBroad access200Repository stars

A local MCP server that turns a folder of documents into a knowledge base with hybrid search for Claude Code and Cursor

MCP serverExtended access305Repository stars

README in short

A two pass knowledge graph extraction pipeline with an ontology and confidence scores. The result is readable in a browser, in the terminal, over MCP and in Claude Code.

README badge

Report a problem