Skip to main content
Glama

llm-wiki-ops

Graph-level operations for Karpathy LLM Wiki knowledge bases.

Lets LLM agents (via MCP) and humans (via CLI) perform structured graph surgery on a wiki: node/edge CRUD, wikilink management, index rebuilding, and graph metrics — all as pure file operations with zero LLM, Tauri, or network dependencies.

Features

  • Node ops — add, update, rename, delete wiki pages with frontmatter and wikilink management

  • Edge ops — add/remove typed edges between pages, with cascading wikilink insert/removal

  • Metrics — topology (degree, hubs, connected components, fragmentation), source overlap / near-duplicate detection, cross-type edge matrix, type distribution

  • Index maintenance — rebuild index.md type sections while preserving custom content

  • Concurrency — wiki-level proper-lockfile write lock + optimistic mtime/size/sha256 checks

  • MCP server — expose all operations as MCP tools for LLM agent integration

  • CLIwiki-graph command for human/script use

Related MCP server: OpenCode LLM Wiki MCP Server

Install

npm install llm-wiki-ops

CLI

# Add a node
wiki-graph add-node ./my-wiki --slug "my-page" --title "My Page" --type concept

# Add an edge
wiki-graph add-edge ./my-wiki --from "my-page" --to "other-page" --type relates_to

# Graph metrics
wiki-graph metrics ./my-wiki --json

# Rebuild index
wiki-graph rebuild-index ./my-wiki

MCP Server

wiki-graph-mcp --wiki ./my-wiki

Configure in your MCP client:

{
  "mcpServers": {
    "llm-wiki": {
      "command": "wiki-graph-mcp",
      "args": ["--wiki", "/path/to/wiki"]
    }
  }
}

Library

import { WikiGraph } from "llm-wiki-ops"

const wiki = new WikiGraph("/path/to/wiki")
await wiki.validate()

// CRUD
await wiki.addNode({ slug: "my-page", title: "My Page", type: "concept" })
await wiki.addEdge({ from: "my-page", to: "other-page", type: "relates_to" })

// Metrics
const metrics = await wiki.getMetrics()
console.log(metrics.topology.hubs)
console.log(metrics.sourceOverlap.duplicateClusters)

await wiki.cleanup()

Wiki Structure

Operates on the standard LLM Wiki layout:

my-wiki/
├── wiki/
│   ├── index.md
│   ├── entities/
│   ├── concepts/
│   ├── sources/
│   ├── queries/
│   ├── comparisons/
│   ├── synthesis/
│   └── overview/
├── raw/
├── purpose.md
└── schema.md

Development

npm install
npm run typecheck
npm test
npm run build

License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    -
    quality
    -
    maintenance
    A Knowledge Graph MCP server optimized for LLM context efficiency through compact JSON and SQLite persistence. It enables full graph management including node/edge CRUD operations, full-text search, and subgraph traversal.
    Last updated
  • A
    license
    A
    quality
    B
    maintenance
    Exposes the mindgap knowledge graph as an MCP server over stdio, providing tools to add, link, query, and manage nodes and edges in a local org-roam-style graph.
    Last updated
    10
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Agent-first knowledge graph MCP server that provides 25 tools for managing a knowledge graph with nodes and edges, plus a human-readable dashboard for LLMs and AI agents.
    Last updated
    579
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.

  • End-to-end agent-managed company brain. Docs, diagrams, plans, Knowledge Graph. Lean & affordable.

  • User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.

View all MCP Connectors

Latest Blog Posts

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/jinnnyang/llm-wiki-ops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server