xkg

mcp
Guvenlik Denetimi
Basarisiz
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 8 GitHub stars
Code Basarisiz
  • process.env — Environment variable access in cli/__tests__/config.test.ts
  • process.env — Environment variable access in cli/__tests__/hooks.test.ts
  • execSync — Synchronous shell command execution in cli/__tests__/kos.test.ts
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

A knowledge graph for your AI workers.

README.md

xkg

Humans are constantly exposed to useful knowledge, domain expertise, and external input. But there is no bridge between what humans know and what their AI workers know and do.

xkg is the knowledge graph for AI workers that bridges human knowledge into context they can use.

Table of Contents

How it works

You find useful stuff, you capture through the web app, then xkg connects it into a knowledge graph, and makes it available to the AI workers you already use.

xkg will continuously compound that knowledge over time — keeping AI workers' context up to date as human knowledge evolves.

[!IMPORTANT]
We are migrating from mnemos / Xmu to xkg. The app now lives at xkg.xmu.sh and the code at xmu-labs/xkg. The npm package is now @xmu-labs/xkg. Connectors set up with mnemos-capture.vercel.app and commands that run npx mnemos-capture@latest keep working: every release is published under both names. Sorry for the inconvenience.

Start here

You do not need a terminal to start.

1. Create your account

Open xkg.xmu.sh and sign in with GitHub.

xkg will:

  1. Create a private GitHub repo for your knowledge (you can opt to make it public)
  2. Ask for your LLM provider API key — Anthropic, OpenAI, or Google. Your key, your cost.
  3. Let you set a PIN (6+ characters) for quick unlock on this device
  4. Show your xkg API key once — save it if you want to connect an AI worker

That's the whole setup. No repo to clone. No database. No CLI required.

2. Capture something

In the app, paste a URL, a note, a doc excerpt, a transcript, or an idea, then hit Capture.

xkg extracts the core idea, key takeaways, where to apply it, and the capture type, then commits Markdown to your GitHub repo.

On a phone: open the app → Share → Add to Home Screen. It runs like a native app.

3. Connect a worker (optional)

Skip this if you only want the app today. When you're ready, pick your tool under Connect your AI workers. Capture now, connect later — the knowledge is already in your repo.

Connect your AI workers

xkg is LLM-agnostic. Any worker that speaks MCP can use the same knowledge.

Two primitives:

https://xkg.xmu.sh/api/mcp
npx -y @xmu-labs/xkg@latest serve-mcp --key YOUR_API_KEY

The CLI binary is xkg (also xmu and mnemos-capture). An MCP server already registered as xmu or mnemos, or set up with mnemos-capture@latest, keeps working.

On the web — paste the URL (no terminal). In the terminal — run the command. Finish xkg onboarding first, then ask: list my inbox or brief me.

On the web

Name the connector xkg, paste https://xkg.xmu.sh/api/mcp, sign in with GitHub when asked.

Claude

  1. Settings → Connectors → Add custom connector

ChatGPT

  1. Settings → Plugins → Browse plugins
  2. Name it xkg
  3. Paste https://xkg.xmu.sh/api/mcp
  4. Sign in with GitHub when asked

Grok

  1. Open grok.com/connectors → New Connector → Custom

In the terminal

The same command works in every CLI — Cursor, Codex, Gemini CLI, VS Code, Claude Code, or anything that can launch a local MCP server:

npx -y @xmu-labs/xkg@latest serve-mcp --key YOUR_API_KEY

Register that command in the tool you use.

Cursor

Add this to .cursor/mcp.json (project) or ~/.cursor/mcp.json (all projects):

{
  "mcpServers": {
    "xkg": {
      "command": "npx",
      "args": ["-y", "@xmu-labs/xkg@latest", "serve-mcp", "--key", "YOUR_API_KEY"]
    }
  }
}

Or Cursor Settings → MCP → Add new MCP server, same command.

VS Code

Add this to .vscode/mcp.json:

{
  "servers": {
    "xkg": {
      "command": "npx",
      "args": ["-y", "@xmu-labs/xkg@latest", "serve-mcp", "--key", "YOUR_API_KEY"]
    }
  }
}

GitHub Copilot Chat in VS Code uses the same file.

Codex

Codex CLI — add this to ~/.codex/config.toml:

[mcp_servers.xkg]
command = "npx"
args = ["-y", "@xmu-labs/xkg@latest", "serve-mcp", "--key", "YOUR_API_KEY"]

Codex App: Settings → MCP → add the same npx command.

Gemini CLI

gemini mcp add xkg npx -y @xmu-labs/xkg@latest serve-mcp --key YOUR_API_KEY

Claude Code

claude mcp add xkg -- npx -y @xmu-labs/xkg@latest serve-mcp --key YOUR_API_KEY

Or the URL, no API key:

claude mcp add --transport http xkg https://xkg.xmu.sh/api/mcp

Optional session hooks (MCP works without them):

npx -y @xmu-labs/xkg@latest setup-hooks --key YOUR_API_KEY --briefing --vault

Hooks are local files — they run in the CLI and editor extensions, not in the browser.

Claude Desktop

Settings → Developer → Edit Config. Add the same npx block to claude_desktop_config.json, then fully restart:

{
  "mcpServers": {
    "xkg": {
      "command": "npx",
      "args": ["-y", "@xmu-labs/xkg@latest", "serve-mcp", "--key", "YOUR_API_KEY"]
    }
  }
}

Anything MCP

If the tool can launch a local process, register the same npx command. If it has custom connectors instead, paste the URL (that's the web path).

{
  "mcpServers": {
    "xkg": {
      "command": "npx",
      "args": ["-y", "@xmu-labs/xkg@latest", "serve-mcp", "--key", "YOUR_API_KEY"]
    }
  }
}

No MCP support yet? Capture in the xkg app and connect later.

Workflow

Docs and notes → Capture → GitHub Markdown → Brief → Plan → Execute → Mark applied

  1. Capture — Paste anything text-based: papers, docs, posts, GitHub repos, notes, decisions, ideas, transcripts. xkg detects a URL, a short note, or longer text. No manual tagging.

    From a connected worker:

    capture "The Mom Test: don't ask if your idea is good. Ask about the person's real behavior, current workflow, and past spending."
    
  2. Brief — At the start of a work session, ask your worker for a briefing. xkg uses your project name, branch, and recent commit messages to rank captures that could help now: why it matters, what applying it could achieve, where it could land. Local agent instruction files are not read or uploaded by the CLI hooks. You decide what to apply.

  3. Plan — Select the captures you want and ask your worker to call generate_plan. Each plan is Markdown: codebase mapping, implementation steps with effort tiers (simple, complex, architectural), and a verification checklist.

  4. Execute — Hand the plan to your worker in the current session, or run it in an isolated git worktree:

    npx -y @xmu-labs/xkg@latest config set agent "claude -p"
    npx -y @xmu-labs/xkg@latest kos --key YOUR_API_KEY
    

    kos creates a worktree, loads the plan as the contract, launches the assistant you configured, and prints the verification checklist when it finishes.

    npx -y @xmu-labs/xkg@latest config set agent "codex exec"
    

Example capture

The Mom Test: don't ask if your idea is good. Ask about the person's real behavior, current workflow, and past spending.
---
date: 2026-06-05
source: The Mom Test note
type: note
tags: customer-discovery, product, research
status: inbox
---

# The Mom Test

## Core idea

Do not ask people to judge your idea. Ask about their real life,
recent behavior, current workaround, and what they have already
tried or paid for.

## Key takeaways

- Avoid compliments and future promises
- Ask about specific past behavior
- Look for existing pain, workarounds, and spending

## Where to apply

Discovery interview scripts, landing page tests, and product
validation prompts.

Plain Markdown in a repo you own. Readable, editable, versioned, portable.

What's inside

You don't have to memorize these. Ask in plain language: "save this", "what do I have on payments?", "brief me for this repo".

Tool What it does
capture Save new knowledge from pasted text or a URL
list_inbox List captures waiting for review
search_captures Keyword search across your captures
read_capture Read a capture in full
recall Find relevant context from a description of your task
briefing Get project-specific recommendations
generate_plan Turn selected captures into an implementation plan
list_plans List or read saved plans
apply_capture Mark a capture as applied
archive_capture Archive a capture
delete_capture Delete a capture
apply_to_context Get file-level suggestions for the current task
synthesize Combine related captures into reusable rules
get_rules Retrieve those rules
curate Review and clean up captures
vault_scan Find relevant context for what you're about to edit

CLI

No global install required. The binary is xkg (also xmu and mnemos-capture). Via npx:

npx -y @xmu-labs/xkg@latest <command>
Command What it does
npx -y @xmu-labs/xkg@latest Open the hosted app
serve-mcp --key YOUR_API_KEY Run the local MCP proxy
setup-hooks --key YOUR_API_KEY [--briefing] [--vault] Install Claude Code hooks
config set agent "claude -p" Set which assistant kos should drive
kos --key YOUR_API_KEY Implement the latest plan in an isolated worktree
inbox-check --key YOUR_API_KEY [--briefing] Debug the session hook
vault-check --key YOUR_API_KEY Debug the vault hook
help Show help

What changed in each version: GitHub Releases.

Your context stays in GitHub

Captures live as structured Markdown in your GitHub repository. Private by default.

  • No lock-in — clone it, move it, delete xkg, keep the files
  • No proprietary format — every capture is a readable .md file
  • No training on your data — captures are sent only to the LLM provider you chose, with the key you supplied, to extract the insight you asked for
  • Any tool can read it — anything that reads Git or speaks MCP
  • BYOK — your provider, your key, your cost
  • Never commit your xkg API key to source control

What xkg stores, and where

The whole point of this repo being public is that you can check these claims rather than trust them.

Your captures are never stored by xkg. They are written straight to your own GitHub repo as Markdown (src/lib/github.ts). There is no captures table. Delete the app and your knowledge is untouched.

The database holds only account plumbing (src/lib/db.ts):

Stored What it is
github_id, github_username who you are
github_token encrypted (src/lib/crypto.ts)
github_repo the name of your hub, not its contents
pin_hash salted scrypt (src/lib/pin.ts)
api_key hashed — not recoverable
llm_provider, llm_api_key encrypted
display_name, avatar_data optional in-app name and photo; never written back to GitHub
token_version bumped to revoke everything
login attempts, OAuth clients/codes, refresh-token ids auth plumbing

When you capture, the server talks to exactly three kinds of destination:

  1. GitHub — to write the capture into your repo
  2. Your LLM provider, with your key — Anthropic, OpenAI, or Google
  3. The page you captured — if you paste a bare URL, so the model reads real content. Only http/https, never an internal address

No analytics, no telemetry, no third-party tracking.

How your credentials are stored

Secret How it's stored
GitHub token Encrypted at rest (AES-256-GCM). Uses the repo scope, required to read and write a private knowledge hub
Your LLM API key Encrypted at rest (AES-256-GCM)
Your MCP API key Hashed — never recoverable, not even by xkg
Your PIN Salted scrypt hash

Your MCP key is shown exactly once. If you lose it, generate a new one.

PIN unlock is device-bound. It only works on a device that has already signed in with GitHub. A PIN on its own is not enough to reach your account.

Revoking access. Generating a new MCP key invalidates the old key, every other signed-in session, and every connected MCP client. Sessions also expire after 30 days.

Deleting your account. Settings → Delete account removes your account row and every record keyed to it, and asks GitHub to revoke xkg's access (src/lib/account.ts). Your captures stay in your repo.

The hosted service's Privacy Policy and Terms of Service say the same in legal form.

Cost

xkg is BYOK. You bring your own API key. xkg never charges you for inference.

Extraction runs on a fast, low-cost model (Claude Haiku 4.5 by default):

Usage Estimated monthly cost
50 captures/month ~$0.15
100 captures/month ~$0.30
200 captures/month ~$0.60

Briefing, planning, and synthesis only run when you ask for them.

Roadmap

  • Learning Graph — Applied work feeds the next brief. The graph compounds.
  • Knowledge Graph for Teams — One graph the team and their AI workers share and compound.
  • Chrome extension — Capture from the page you are on, without leaving the browser.
  • Voice memo — Speak it. xkg turns it into a capture.

Working on the code? See CONTRIBUTING.md.

License

MIT License. Contributions are welcome under the same licence; see
CONTRIBUTING.md and the Code of Conduct.

Trademarks. The MIT licence covers the code, not names or logos: the xkg name and logo are not
licensed for use as your own brand. Claude, ChatGPT, Codex, Gemini, Grok, Cursor and VS Code are
trademarks of their respective owners, named here only to say which tools xkg works with; no
endorsement is implied.

If you use xkg in published work:

@misc{2026xkg,
  title        = {xkg: A Knowledge Graph for AI workers},
  author       = {Sofia Padron Valdez},
  year         = 2026,
  journal      = {GitHub repository},
  publisher    = {GitHub},
  howpublished = {\url{https://github.com/xmu-labs/xkg}}
}

Yorumlar (0)

Sonuc bulunamadi