TheStack-ai/waypath

🧠 Knowledge & Memory
0 Views
0 Installs

πŸ“‡ 🏠 - Local-first external brain CLI for coding agents. SQLite-backed context, graph-aware recall via FTS5 and RRF, and governed memory with explicit promote and review gates. Ships Codex and Claude Code host shims and a native MCP server.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "thestack-ai-waypath": {
      "command": "npx",
      "args": [
        "-y",
        "thestack-ai-waypath"
      ]
    }
  }
}
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

English Β· ν•œκ΅­μ–΄ Β· δΈ­ζ–‡

Waypath β€” local-first external brain for coding agents

Local-first external brain for coding agents.
A SQLite-backed CLI that gives Claude Code, Codex, and any MCP client persistent context, graph-aware recall, and governed memory β€” with zero cloud dependencies.

npm version License: MIT Node.js Tests npm downloads GitHub stars Listed on awesome-mcp-servers

[!TIP] New here? The Quick start gets you from npm install to your first persistent agent session in about 60 seconds.


What is Waypath?

Waypath is a local-first knowledge engine for coding agents and solo developers. It stores your project decisions, entity relationships, and session artifacts in a single SQLite file, then serves graph-aware, truth-first context to any agent host β€” Claude Code, Codex, or an MCP client β€” through a thin CLI.

Unlike cloud memory services, Waypath:

  • runs entirely on your machine,
  • owns a canonical truth schema instead of a vector blob,
  • treats every memory as first-class with explicit promotion + review gates,
  • ships a 77 kB npm package with no required runtime services.

Why Waypath?

ProblemWaypath's answer
Agents forget across sessionsPersistent SQLite truth kernel
RAG returns irrelevant chunksFTS5 + RRF hybrid ranking with graph expansion
Memory services hallucinate silentlyExplicit page β†’ promote β†’ review governance
Cloud lock-in, data exfiltrationEverything is one local .db file you own
Tool per host (Claude, Codex, Cursor)Single facade, thin host shims, native MCP server

Install

[!IMPORTANT] Requires Node.js β‰₯ 22. Node 22.5+ unlocks the native node:sqlite driver; earlier 22.x versions auto-fall back to better-sqlite3.

npm install -g waypath

Verify:

waypath --help
waypath source-status --json

Quick start

1. Bootstrap a session (Codex example):

waypath codex --json \
  --project my-project \
  --objective "ship v2 of the retrieval pipeline" \
  --task  "refactor hybrid ranker" \
  --store-path ~/.waypath/my-project.db

2. Recall relevant context:

waypath recall --query "hybrid ranker decisions" --json

3. Capture a distilled insight and promote it through review:

waypath page    --subject "hybrid ranker v2 design"
waypath promote --subject "hybrid ranker v2 design"
waypath review-queue --json

4. Run as an MCP server (for Claude Code, Cursor, any MCP client):

waypath mcp-server --store-path ~/.waypath/my-project.db

See it in action

$ waypath codex --json --project auth-service \
    --objective "migrate to passkeys" --task "design flow"
{
  "host": "codex",
  "session_id": "auth-service:passkey-flow",
  "context_pack": {
    "truth_highlights": {
      "decisions": [
        "Use WebAuthn level 2 with user verification required",
        "Argon2id for password fallback hashing"
      ],
      "entities": ["UserSession", "AuthGateway", "RefreshToken"],
      "contradictions": []
    },
    "recent_pages": [
      "Session storage design β€” promoted 2026-04-12"
    ]
  }
}

Command surface

AreaCommands
Session bootstrapcodex, claude-code, mcp-server
Recallrecall, explain, graph-query, history
Pages (distilled knowledge)page, promote, refresh-page, inspect-page
Review governancereview, review-queue, inspect-candidate, resolve-contradiction
Import / scanimport-seed, import-local, scan
Healthsource-status, health, db-stats, rebuild-fts
Maintenancebackup, benchmark, export

Full help: waypath --help.

Architecture

Waypath is built from four independent kernels behind a thin facade:

flowchart TD
    subgraph HOST[" Host Shims "]
        direction LR
        CX["codex"]
        CC["claude-code"]
        MC["mcp-server"]
    end

    Facade["<b>Facade</b><br/><code>createFacade()</code>"]

    TK["<b>Truth Kernel</b><br/>decisions Β· entities Β· preferences<br/>temporal validity Β· supersede"]
    AK["<b>Archive Kernel</b><br/>evidence Β· content-hash dedup<br/>FTS5 index"]
    ON["<b>Ontology</b><br/>graph traversal<br/>pattern expansion"]
    PR["<b>Promotion Engine</b><br/>candidate review<br/>contradiction detection"]

    HOST --> Facade
    Facade --> TK
    Facade --> AK
    Facade --> ON
    Facade --> PR

    classDef kernel fill:#21262d,color:#c9d1d9,stroke:#30363d,stroke-width:1px
    classDef facade fill:#1f6feb,color:#ffffff,stroke:#58a6ff,stroke-width:2px
    classDef host fill:#161b22,color:#c9d1d9,stroke:#30363d,stroke-width:1px
    class TK,AK,ON,PR kernel
    class Facade facade
    class CX,CC,MC host
  • Truth kernel β€” canonical decisions, entities, preferences, temporal validity (schema v3 with supersede + history).
  • Archive kernel β€” raw evidence store with content-hash dedup and FTS5 full-text index.
  • Ontology layer β€” graph traversal for entity/decision context expansion (patterns: project_context, person_context, system_reasoning, contradiction_lookup).
  • Promotion engine β€” candidate review, contradiction detection, supersede flows.

A single createFacade() exposes 14 verbs. Host shims adapt it to each agent's bootstrap protocol.

Configuration

Waypath is zero-config by default. To tune retrieval weights, adapter toggles, or review thresholds, drop a config.toml in your working directory (or point WAYPATH_CONFIG_PATH at one):

[source_adapters]
jarvis-memory-db = true
jarvis-brain-db  = false

[retrieval.source_system_weights]
truth-kernel = 1.2

[retrieval.source_kind_weights]
decision = 0.9
memory   = 0.5

[review_queue]
limit = 12

Override anything via env vars:

export WAYPATH_RECALL_WEIGHT_SOURCE_SYSTEM_TRUTH_KERNEL=1.8
export WAYPATH_REVIEW_QUEUE_LIMIT=8

Priority: env override > config.toml > built-in defaults.

MCP server

Waypath ships a native MCP (Model Context Protocol) server as a second binary:

waypath-mcp-server

Or via the main CLI:

waypath mcp-server --store-path ~/.waypath/project.db

Tools exposed via MCP: recall, page, promote, review, graph-query, source-status.

Requirements

  • Node.js β‰₯ 22.0 (required)
  • Node.js β‰₯ 22.5 recommended β€” unlocks native node:sqlite
  • better-sqlite3 is an optional fallback auto-used on 22.0–22.4 or where native sqlite is unavailable

Status

  • Version: 0.1.0 β€” first public release
  • Tests: 131 passing (unit + integration + benchmark)
  • Stable surface: CLI (26 commands), MCP server, facade API
  • Deferred: hosted deployment, multi-user sync, adaptive ranking feedback

Compared to alternatives

WaypathCloud memory (mem0, zep)Vector-only RAG
Local-firstβœ“βœ—depends
Canonical truth schemaβœ“βœ—βœ—
Graph-aware recallβœ“partialβœ—
Explicit review gateβœ“βœ—βœ—
MCP server built-inβœ“βœ—βœ—
One-file installβœ“needs servicevaries

Contributing

Waypath welcomes host shims, source adapters, and bug fixes. Good first issues are labeled accordingly.

Read CONTRIBUTING.md for dev setup, code style, and PR flow.

Before submitting a PR:

npm run build
npm test

License

MIT Β© TheStack.ai β€” see LICENSE.

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.