Yarmoluk/ckg-mcp

🧠 Knowledge & Memory
0 Views
0 Installs

šŸ šŸ  - Compressed Knowledge Graphs (pre-structured dependency DAGs) as MCP context — agents traverse declared edges instead of inferring from text. Open CKG Benchmark (64 domains, 10,838 queries): 3.8Ɨ RAG's F1 at 11Ɨ fewer tokens, 42Ɨ RDS, 0 fabricated edges by construction. 97 domains, 4 tools, no DB/embeddings. pip install ckg-mcp

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "yarmoluk-ckg-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "yarmoluk-ckg-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Context Optimization for AI Agents

Agent traversal Ā· Agent team orchestration Ā· 97 domains Ā· MCP-native

Your agents retrieve. They should traverse.

PyPI version Downloads Python License: MIT Domains Free F1: 0.471 Ā· 4Ɨ RAG KRB v0.6.2 Built by Graphify.md

Read-only. The server can only return edges that exist in the data. It returns nothing rather than inferring a path that isn't there.

Get Pro → Ā· Benchmark → Ā· graphifymd.com →


Context Optimization — The Problem

Every agent that reasons about a domain — HIPAA, GPU inference, calculus, contract law — does one of three things:

ApproachWhat breaks
Long system promptNo structure. Drifts with every model update. Cannot traverse.
RAG retrievalProbabilistic. Accuracy degrades at each hop. Expensive per query.
Fine-tuning6-month cycle. Stale by delivery. Retrains when knowledge shifts.

All three share the same failure: the agent re-infers domain structure on every query instead of reading structure that was declared once.

In our open benchmark (KRB v0.6.2 — reproduce it yourself): RAG achieves 0.123 macro F1 on multi-hop domain queries. CKG achieves 0.471. At 5 hops, the gap widens: RAG 0.170, CKG 0.772.

The token cost compounds the accuracy problem: the average RAG query costs 2,982 tokens. The average CKG traversal costs 269 — measured across 19 benchmark domains.

These numbers are ours, on our benchmark. The dataset is public on HuggingFace. Run it yourself.


Agent Traversal — The Solution

A Compressed Knowledge Graph (CKG) is a domain structured for traversal, not retrieval.

Not a document. Not a vector index. A pre-compiled DAG of concepts, typed dependency relationships, and prerequisite chains — compressed to the minimum tokens that carry the maximum structure. Served over MCP. Traversed deterministically.

Agent asks:   "What does TensorRT-LLM require to run on Hopper?"

CKG returns:  TensorRT-LLM
              ā”œā”€ [REQUIRES] CUDA Toolkit
              │    ā”œā”€ [ENABLES] cuBLAS
              │    └─ [ENABLES] CUDA Driver API
              ā”œā”€ [REQUIRES] FP8/FP4 Quantization
              │    └─ [REQUIRES] Hopper SM90 Architecture
              └─ [ENABLES] Triton Inference Server
                   └─ [ENABLES] NIM Microservice Runtime

              269 tokens Ā· declared edges only Ā· no inference at query time

RAG would:    ~2,982 tokens Ā· probabilistic retrieval Ā· degrades at 3+ hops

You go from prompting the domain into existence to asking questions inside it.


One Use Case — Becoming Nemotron-Enabled

Perplexity is a model aggregator. Shortest route to Nemotron — click the dropdown, select the model, query. But it's their pipeline, their infrastructure. Your queries go through their system.

If you want to run Nemotron yourself — sovereign, private, on your own hardware — you need to navigate NVIDIA's stack: NGC API key, NIM container, Enterprise License, inference endpoint. The dependency chain is non-obvious. Most developers hit the wrong door first.

Without CKG: search the docs, hit the Enterprise License wall, spend two hours finding build.nvidia.com.

With CKG:

query_ckg("Nemotron Model", "nvidia-nim")
→ [REQUIRES] Model Weights
  → [REQUIRES] NGC Container Registry
    → [REQUIRES] NGC API Key        ← start here

query_ckg("NIM Docker Container", "nvidia-nim")
→ [REQUIRES] NGC API Key
→ [REQUIRES] NVIDIA AI Enterprise License   ← production path
→ [ENABLES]  NIM Microservice               ← what you're building toward

Two traversals. Correct path. No wrong doors. The graph knew — the model just told you.

Typed edges carry semantic meaning

Edge typeMeaningAgent use
REQUIRESHard prerequisite — must exist firstSequencing, gap detection
ENABLESUnlocks a downstream capabilityOptimization paths
RELATES_TOConceptual proximityDisambiguation
IMPLEMENTSConcrete realization of an abstractionArchitecture mapping
CONTRASTS_WITHMeaningful oppositionTradeoff reasoning

Every domain is a declared DAG

ConceptID, ConceptLabel,      Dependencies,      TaxonomyID
1,         Taylor Series,     "",                Analysis
2,         Power Series,      "",                Analysis
3,         Convergence,       "2:REQUIRES",      Analysis
4,         Higher-Order Der., "5:REQUIRES",      Calculus
5,         Derivative,        "6:REQUIRES",      Calculus
6,         Continuity,        "7:REQUIRES",      Calculus

No embeddings. No probabilistic retrieval. Built once, reviewed once, traversed forever. Graph data is authored and versioned by Graphify.md — served remotely, not shipped in the package.

ckg-mcp — Every edge is a decision: REQUIRES Ā· ENABLES Ā· RELATES_TO Ā· IMPLEMENTS

Agent Team Orchestration — The Scale Story

Single-agent traversal is the efficiency gain. Multi-agent orchestration is where it compounds.

Liu et al. (arXiv:2606.30986) measure Context Transaction Cost (CTC): the tax paid every time context crosses an agent boundary. Their finding: context efficiency collapses from 18.2 in Q1 to 1.6 by Q4 across pipeline stages — 91% degradation with no model change.

CKG addresses all three root causes they identify:

CTC componentWhat it isCKG's response
Token Latency BurdenCompute cost of transmitting context269 tokens instead of 2,982
Handoff CostSerialization loss at agent boundariesget_prerequisites() replaces re-retrieval
Compression LossInformation destroyed when context is summarizedThe graph is the compressed form — done once, offline

When agent A hands off to agent B, neither re-retrieves the domain. They both traverse the same declared graph. Structured context doesn't consume your context window — it opens it.

ckg-mcp — 11Ɨ fewer tokens: 269 vs 2,982 per query

Quickstart

uvx ckg-mcp          # no install — runs immediately
# or
pip install ckg-mcp  # Python ≄ 3.10

How it works: The package is a thin MCP shell. Graph data lives on Graphify.md's servers — no domain CSVs are bundled in the wheel. Every traversal calls ckg-mcp.onrender.com, so a network connection is required. Free tier: 10 calls/hour per IP, resets automatically. Pro tier: unlimited with CKG_API_KEY.

Claude Desktop

{
  "mcpServers": {
    "ckg": { "command": "uvx", "args": ["ckg-mcp"] }
  }
}

Claude Code

claude mcp add ckg -- uvx ckg-mcp

Cursor / Cline / Windsurf / any MCP client

{ "mcpServers": { "ckg": { "command": "uvx", "args": ["ckg-mcp"] } } }

System prompt snippet

You have access to the ckg MCP server — a typed dependency graph catalog
of 97 domains (mathematics, GPU inference, healthcare, law, robotics,
regulatory, AI tooling, and more). When answering questions about any of
these domains, call query_ckg() or get_prerequisites() before responding.
Do not infer dependency chains — traverse the graph instead.

Try it immediately

list_domains()
→ see all 68 free domains

query_ckg("Taylor Series", "calculus", 3)
→ prerequisite chain: Function → Limit → Continuity → Derivative →
  Higher-Order Derivatives → Convergence → Power Series → Taylor Series

route_query("Taylor Series", "calculus")
→ model_tier: haiku  Ā· reasoning: direct
→ why: 2-hop, 1 branch — shallow lookup
→ subgraph: [Taylor Series → Power Series → Convergence] (31 tokens)

get_prerequisites("Business Associate Agreement", "hipaa-compliance")
→ Covered Entity → PHI Definition → Minimum Necessary Standard →
  Access Controls → Breach Notification Rule → BAA

query_ckg("FlashAttention-3", "nvidia-gpu-inference", 3)
→ SRAM Tiling Ā· On-Chip Memory Budget Ā· Transformer Attention Ā·
  Softmax Stability → FlashAttention-3 → Multi-Head Attention → KV Cache

Source provenance — verifiable to the byte

Every node carries a source_url and a source_hash (SHA-256 of source bytes at extraction time) where available. The full audit chain: edge answer → graph commit hash → source_content_hash → knowledge_source_ref.

# For domains with per-node hashes:
curl -s <source_url> | sha256sum
# compare to source_hash — mismatch = stale edge or silent upstream edit

Via MCP — verify_source(concept, domain) returns source URL, hash, and verification command. Run scripts/refresh_hashes.py to recompute.

Reference implementation from GuardrailDecisionV1.


Benchmark

These are our numbers on our open benchmark. The dataset is on HuggingFace. Run it yourself before citing them.

git clone https://github.com/Yarmoluk/ckg-benchmark && cd ckg-benchmark
pip install -r evaluation/requirements.txt
python evaluation/ckg_harness.py --domain calculus
python evaluation/analyze_results.py
SystemMacro F1Tokens / queryCost / 1K queriesF1 at 5 hops
CKG (this package)0.471269$7.810.772
RAG (text-embedding-3-small)0.1232,982$76.230.170
GraphRAG (MS global, v1.1)0.1203,450+——

What this means:

  • 4Ɨ F1 — in our benchmark, on our dataset. Open and reproducible.
  • 11Ɨ fewer tokens — the 269 and 2,982 figures are averages across 19 benchmark domains.
  • F1 rises with depth — CKG 0.37 at 1 hop → 0.77 at 5 hops. RAG is flat. Graph traversal does not degrade at depth; retrieval does.
  • GraphRAG — not a meaningful improvement over RAG at higher token cost. The word "graph" is not the win. A pre-compiled, declared graph is.

One derived metric we use internally: Retrieval Density Score (F1 Ć· tokens per query). CKG scores roughly 42Ɨ higher than RAG on this ratio. It is not a standard benchmark metric — we use it to reason about accuracy-per-token efficiency.

Full benchmark paper →


Domain Library

68 free Ā· no API key required

Mathematics calculus Ā· pre-calc Ā· algebra-1 Ā· linear-algebra Ā· geometry-course Ā· statistics-course Ā· functions Ā· fft-benchmarking

Engineering & Computer Science circuits Ā· digital-electronics Ā· computer-science Ā· quantum-computing Ā· signal-processing Ā· intro-to-graph

Life Sciences biology Ā· bioinformatics Ā· genetics Ā· ecology Ā· chemistry

Clinical & Health (free) glp1-obesity Ā· glp1-muscle-loss Ā· dementia

Regulatory & Government fda-drug-approval-chain Ā· fda-adverse-event-chain Ā· federal-procurement-chain Ā· gao-oversight-chain

AI, ML & Data machine-learning-textbook Ā· data-science-course Ā· conversational-ai Ā· langchain-core Ā· dbt-core Ā· apache-iceberg

AI Tools (provider graphs) claude-anthropic Ā· claude-skills Ā· cursor Ā· deepseek Ā· gemini-api Ā· grok-xai Ā· kimi-moonshot Ā· midjourney Ā· openai-platform Ā· qwen Ā· vercel-ai-sdk

Robotics & Physical AI ros2-architecture Ā· robot-motion-planning

Learning & Pedagogy prompt-class Ā· tracking-ai-course Ā· automating-instructional-design Ā· microsims Ā· infographics Ā· it-management-graph

Business & Society economics-course Ā· personal-finance Ā· ethics-course Ā· theory-of-knowledge Ā· systems-thinking Ā· digital-citizenship Ā· blockchain Ā· unicorns

Reference & Culture art-of-war Ā· laudato-si Ā· learning-linux Ā· us-geography Ā· asl-book Ā· reading-for-kindergarten Ā· moss


Free vs Pro

Free — MITPro — $99/mo
Domains6897
Healthcare & clinical—HIPAA Ā· CPT coding Ā· ICD-10 Ā· payer formulary Ā· drug interactions Ā· clinical decision chain Ā· medical billing
Enterprise data stack—Databricks Unity Ā· Snowflake Horizon Ā· PostgreSQL Ā· AWS Data Catalog Ā· Azure Purview Ā· GCP Dataplex Ā· OpenLineage
AI infrastructure—NVIDIA GPU inference Ā· context-as-a-service Ā· agent reliability Ā· AI governance Ā· token cost crisis
Legal & compliance—Legal citation chain Ā· contract law elements Ā· AML/KYC chain Ā· investment risk chain
Agent blueprints22 + priority access
Domain updatesCommunityManaged
LicenseMITCommercial

Activate in 60 seconds:

export CKG_API_KEY=cs_live_your_key_here
# restart your MCP client — all 97 domains appear in list_domains()

Get Pro → graphifymd.com/pro


Agent Blueprints

Pre-built agent specs: which domains to load, step-by-step workflow, ready-to-paste system prompt, and a LangGraph orchestration hint. Skip writing the context layer from scratch.

list_agent_blueprints()
→ gpu-inference-optimizer      — trace GPU bottlenecks, surface optimization paths
  context-as-a-service-advisor — design CKG-based retrieval pipelines

get_agent_blueprint("gpu-inference-optimizer")
→ Required domains: nvidia-gpu-inference, context-as-a-service
  Workflow: diagnose → trace prerequisites → identify path → recommend
  Prompt template: [ready to paste]
  LangGraph hint: StateGraph Ā· 4 nodes

The Seven Tools

All read-only. No database. No embeddings. Requires network — graph data is served from ckg-mcp.onrender.com, not bundled locally.

ToolWhat it does
list_domains()Every available domain. Start here.
query_ckg(concept, domain, depth)Prerequisites + dependents, up to N hops
get_prerequisites(concept, domain)Full upstream chain in dependency order
search_concepts(query, domain)Find concepts by keyword — use before query_ckg
route_query(question, domain)Returns subgraph + model tier (haiku/sonnet/opus) from graph depth — context and model routing in one call
list_agent_blueprints()Browse pre-built agent configs
get_agent_blueprint(use_case)Full spec: domains, workflow, prompt, LangGraph hint

Why Graphify.md

ckg-mcp is the core product of Graphify.md.

We build the context optimization layer that sits between agents and the domains they operate in. The same layer that powers this package runs inside enterprise deployments, sealed appliances, and custom vertical CKGs.

What we can say without overstating:

  • The benchmark is open and reproducible — not self-reported, verifiable
  • The graphs are human-authored and human-reviewed — not generated
  • The methodology is patent pending — not just a wrapper around an existing system
  • Plain CSV DAGs, MIT-licensed for free domains — no lock-in

Compatibility — model-agnostic:

LLMAgent frameworkMCP client
Claude (all tiers)LangChain / LangGraphClaude Desktop
GPT-4o / GPT-4AutoGenClaude Code
Gemini 2.0 / 2.5smolagentsCursor
Llama 3.xCrewAICline
Mistral / DeepSeekOpenAI Agents SDKAny MCP stdio client

No graph database. No vector store. Python ≄ 3.10. Single dependency (mcp). stdio transport.


Custom Domains & Enterprise

The free and Pro catalog covers breadth. Enterprise needs are specific: your regulatory environment, your internal taxonomy, your product domain, your data stack.

Graphify.md builds and maintains custom CKG domain graphs for enterprise teams — compressed, versioned, deployed over your MCP stack.

Sealed Appliance — a private CKG + query server in your environment. Air-gapped. Your data stays yours.

Typical entry: a pilot on your highest-value domain, delivered in one session, measured against your existing retrieval setup.


Corrections Welcome

Spotted a wrong edge? A RELATES_TO that should be REQUIRES? A missing concept?

Edge corrections are the highest-value contribution — the graph gets more useful with every fix. Open an issue or PR on GitHub.


Ecosystem

PackageWhat it does
ckg-mcpThis repo — 97 domains, context optimization layer
ckg-nvidia-ai20 NVIDIA AI domains, free, MCP-native
agentmem-mcpCross-session agent memory
KRB BenchmarkOpen benchmark — reproduce the F1 numbers
ckg-evalPath-Fidelity Score — reasoning path correctness

EVAL

benchmark: ckg-benchmark v0.6.2
dataset: huggingface.co/datasets/danyarm/ckg-benchmark
benchmarked: true
this_domain_f1: 0.471
queries_tested: 19
rag_baseline_f1: 0.123
graphrag_baseline_f1: 0.120
mean_tokens: 269
paper: github.com/Yarmoluk/ckg-benchmark/blob/main/paper/main.pdf

Citation

@misc{yarmoluk2026ckg,
  title  = {Benchmarking Knowledge Retrieval Architectures Across Educational
            and Commercial Domains: RAG, GraphRAG, and Compressed Knowledge Graphs},
  author = {Yarmoluk, Daniel and McCreary, Dan},
  year   = {2026},
  note   = {v0.6.2. https://github.com/Yarmoluk/ckg-benchmark}
}

graphifymd.com Ā· Pro Ā· Benchmark

Patent pending. Built by Daniel Yarmoluk / Graphify.md.

Related MCP Servers

modelcontextprotocol/server-memoryVerified

šŸ“‡ šŸ  - Knowledge graph-based persistent memory system for maintaining context

🧠 Knowledge & Memory2 views
0xshellming/mcp-summarizer

šŸ“• ā˜ļø - AI Summarization MCP Server, Support for multiple content types: Plain text, Web pages, PDF documents, EPUB books, HTML content

🧠 Knowledge & Memory0 views
20alexl/claude-engram

šŸ šŸ  - Persistent memory and session intelligence for Claude Code. Auto-tracks mistakes, decisions, and context via hooks. Mines session history for patterns and cross-session search. Loop detection, pre-edit warnings, context compaction survival. Runs locally with Ollama.

🧠 Knowledge & Memory0 views
a2cr/a2cr

šŸ ā˜ļø šŸ  šŸŽ 🪟 🐧 - MCP server for AI-agent handoffs. Saves client-encrypted WorkBaton checkpoints and WorkStash notes so Codex, Claude Code, Roo Code, and other MCP clients can resume work without passing full chat history.

🧠 Knowledge & Memory0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.