Logo van SQLew

SQLew

Organisatie
sqlew-io

Extended Memory Layer of Coding AI

Uitgeversqlew-io
Repositorysqlew
TaalTypeScript
Forks
1
Sterren
4
Beschikbare tools
8
Transporttypestdio
Categorieën
LicentieApache-2.0
Links
  • Koppel tools aan AI-workflows

    SQLew biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 8 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    4 sterren en 1 forks in de gekoppelde repository.

sqlew

sqlew_logo

npm version License

Design intent on tap — stop agents from re-auditing the whole repo every turn

What is sqlew?

The Problem

Strong coding agents no longer "forget" the stack between sessions the way older models did. They treat the codebase as ground truth — and that is good for correctness.

The new failure mode is cost and thrash:

  • Specs, plans, and ADRs already say why a choice was made
  • The agent still re-opens large swaths of source "just to be sure"
  • Rejected alternatives and non-local constraints are expensive (or impossible) to re-derive from code alone
  • Every turn pays the same investigation tax; multi-agent and multi-day work multiplies it

Code answers what is implemented. It is a poor, high-token index for why we chose it, what we forbade, and what we already rejected.

The Solution

sqlew is an MCP server that stores architectural decisions and constraints in a SQL database — with rationale, tags, layers, and rejected alternatives. Agents query intent first (suggest, session context, targeted decision / constraint lookups) instead of re-deriving design context from a full-tree read every turn.

┌──────────────────────────────────────────────────────────────────────┐
│  Without sqlew                         │  With sqlew                 │
│────────────────────────────────────────│─────────────────────────────│
│  Plan/spec: "use Postgres, no Mongo"   │  Plan approved → ADR saved  │
│  Next turn: re-read half the repo      │  Next turn: suggest/query   │
│  "just to confirm the architecture"    │  → intent in milliseconds   │
│  Tokens burned; same audit next agent  │  Code read only for the diff│
└──────────────────────────────────────────────────────────────────────┘

sqlew does not replace reading code for implementation detail. It replaces ritual whole-repo archaeology for design intent with structured recall:

  1. Capture — Plan Mode + hooks record decisions/constraints when you approve a plan (zero extra ceremony with sqlew-plugin)
  2. Recall — Session start injects recent context (where the harness supports it); suggest finds related ADRs before the agent expands search
  3. Enforce — Constraints stay first-class rules; duplicate/similarity checks stop circular re-decisions

Built on the Model Context Protocol (MCP), so it works with any MCP-compatible AI coding tool.

This software does not send any data to external networks. We NEVER collect any data or usage statistics.

Quick Start

1. Install

bash
npm install -g sqlew

npm 12+ (bundled with Node 24.19+) blocks dependency install scripts by default. sqlew needs better-sqlite3 to download or compile its native addon, so allow that script:

bash
npm install -g --allow-scripts=better-sqlite3 sqlew

Without the flag, sqlew installs but exits on first run with Could not locate the bindings file. Re-run the command above to repair an existing install.

npm 11 and earlier still run install scripts by default; npm install -g sqlew is enough there.

2. Setup

Choose the setup that matches your environment. Each client has its own install and uninstall steps.

Claude Code (Plugin)

Install:

bash
claude plugin marketplace add sqlew-io/sqlew-plugin
claude plugin install sqlew

Configures MCP server, Skills (Plan Mode guidance), and Hooks (automatic decision capture).

Uninstall:

bash
claude plugin remove sqlew

Codex CLI (Plugin)

Install:

bash
codex plugin marketplace add sqlew-io/sqlew-plugin
codex plugin install sqlew --source sqlew-plugin

After install, open /hooks in Codex and trust the bundled sqlew hooks. Enable Plan Mode with collaboration_modes = true under [features] in your Codex config.

Do not duplicate skills in ~/.codex/skills/ or add [mcp_servers.sqlew] to config.toml when using the plugin. See Hooks Guide.

Uninstall:

bash
codex plugin remove sqlew

Grok Build (Plugin)

Install:

bash
grok plugin install sqlew-io/sqlew-plugin --trust
grok plugin update

Configures MCP server, Skills (plan mode guidance), and Hooks (automatic decision capture on exit_plan_mode).

Do not duplicate hooks in ~/.grok/hooks/ or add [mcp_servers.sqlew] to ~/.grok/config.toml. See Hooks Guide.

Uninstall:

bash
grok plugin remove sqlew

Hermes (Plugin)

Requires sqlew >= 5.3.0. Hermes uses a separate plugin bundle (.hermes-plugin/), not the Claude/Codex plugin manifest.

Install:

bash
hermes plugins install sqlew-io/sqlew-plugin/.hermes-plugin
hermes plugins enable sqlew

Merges MCP + shell hooks into ~/.hermes/config.yaml and copies planning skills to ~/.hermes/skills/. See Hermes Hooks Guide for wire-protocol details and manual config.yaml setup.

Uninstall:

bash
hermes plugins remove sqlew

If you merged hooks manually before using the plugin, also remove mcp_servers.sqlew and sqlew hooks: entries from ~/.hermes/config.yaml. Skills under ~/.hermes/skills/sqlew-* are not removed automatically.

oh-my-pi / omp (Extension)

Requires sqlew with the sqlew/hooks export (see Harness Compatibility for the minimum version). omp uses an in-process Extension (.omp-plugin/), not Claude-style shell hooks.

Install:

bash
npm i -g --allow-scripts=better-sqlite3 sqlew   # see Install above (npm 12+)
omp --extension /path/to/sqlew-plugin/.omp-plugin
# or:
omp plugin install /path/to/sqlew-plugin/.omp-plugin

Session context via before_agent_start; Plan-to-ADR when you approve via xd://propose / /xdev/propose. Plans live as session-local local://*-plan.md (no project .sqlew/plans/ copy by default). See Hooks Guide.

MCP still comes from the project .mcp.json (Extension does not re-register MCP when already present).

Other harness (MCP only)

MCP server only — no sqlew-plugin hooks or skills (Cursor, Claude Desktop, custom clients, …). See Harness Compatibility.

Add to .mcp.json in your project root:

json
{
    "mcpServers": {
        "sqlew": {
            "command": "sqlew"
        }
    }
}

The database (~/.config/sqlew/sqlew-shared.db) and config are auto-created on first run. See Shared Database for details.

3. Just use Plan Mode!

That's it. Every time you create a plan and get user approval, your architectural decisions are automatically recorded.

No special commands needed — just plan your work normally, and sqlew captures the decisions in the background.

Features

  • Structured Records — Decisions stored as relational data with metadata, tags, layers, and version history
  • Fast Queries — 2-50ms SQL recall for design intent; avoid multi-file repo archaeology every turn
  • Duplicate Detection — Three-tier similarity scoring (0-100) prevents redundant decisions
  • Constraint Tracking — Architectural rules and principles as first-class entities
  • Auto-Capture — Hooks/Extension automatically record decisions from Plan Mode (Claude Code, Codex, Grok Build, Hermes, and oh-my-pi via sqlew-plugin)
  • Session Context Injection — Recent decisions and active constraints injected at session start (Claude Code, Hermes, omp, Codex partial; not Grok Build — see matrix)
  • Multi-Database — SQLite (default), PostgreSQL, MySQL/MariaDB, or Cloud
  • Git Worktree Ready — Each worktree shares the same context database

Harness compatibility

Not every feature works the same on every client. Grok Build uses passive hooks (no stdout injection), so session context and plan-mode hook enforcement are skill-based only (◎). oh-my-pi (omp) uses an in-process Extension (sqlew/hooks) rather than shell hooks — the summary rows below are full (✓).

FeatureClaudeCodexGrokHermesomp
MCP tools✓✓✓✓✓
Session context injection✓△—✓✓
Plan-to-ADR (auto)✓△△✓✓
Plan mode hook enforcement✓△◎✓✓

✓ full · △ partial · ◎ skills only · ✎ manual MCP · — not available

Full matrix (hooks, Other harness column, fallbacks): Harness Compatibility

For Teams (sqlew.io)

Connect to sqlew.io for team-shared decisions:

Step 1: Get your API key

Visit sqlew.io and save your API key:

bash
# ~/.config/sqlew/.sqlew.env (shared across all projects)
SQLEW_API_KEY=your-api-key

Step 2: Configure each project

toml
# .sqlew/config.toml
[database]
type = "cloud"

[project]
name = "your-project-name"

Benefits:

  • All team members share the same decision database
  • Works seamlessly with Git worktree workflows
  • No local database setup required

Performance

MetricValue
Query speed2-50ms
Concurrent agents5+ simultaneous
Storage efficiency~140 bytes/decision
Token savingsFewer full-tree "confirm the architecture" passes; 60-75% vs dumping Markdown ADRs into context

Use Cases

  • Architecture Evolution — Document major decisions with full context and alternatives considered
  • Pattern Standardization — Establish coding patterns as constraints, enforce via AI code generation
  • Cross-Session Continuity — Agents reuse recorded intent across days without re-auditing the tree for why
  • Multi-Agent Coordination — Multiple AI agents share architectural understanding
  • Onboarding Acceleration — New sessions/agents load decisions and constraints first, then read only the code paths that matter

Documentation

GuideDescription
ADR ConceptsArchitecture Decision Records explained
ConfigurationConfig file setup, database options
Harness CompatibilityFeature × harness matrix (MCP, hooks, session context, Plan-to-ADR)
Hooks GuideClaude Code, Codex, Grok Build, Hermes, and oh-my-pi (omp) integration
Hermes Hooks GuideHermes-specific setup and wire-protocol notes
Cross DatabaseMulti-database support
CLI UsageDatabase migration, export/import

Upgrade Guides

MCP Tools

8 action-based tools: decision, constraint, project, suggest, help, example, use_case, queue

All tools support action: "help" for documentation. The project tool targets a project per call for desktop AI agents (Claude Desktop, Hermes Desktop) — see Shared Database.

Support

Support development via GitHub Sponsors.

Version

Current version: 5.3.0

See CHANGELOG.md for release history.

What's New in v5.3.0:

  • Hermes support — Plan-to-ADR via sqlew-plugin .hermes-plugin bundle (hermes plugins install sqlew-io/sqlew-plugin/.hermes-plugin)
  • Hook normalization — Hermes pre_tool_call / pre_llm_call payloads mapped to canonical Claude-shaped events and tools
  • Every-turn plan guidance — on-prompt injects FULL/SHORT context via Hermes pre_llm_call ({"context":"..."})
  • .hermes/plans/ — Plan files written by the Hermes plan skill are tracked for decision extraction

License

Apache License 2.0 — Free for commercial and personal use. See LICENSE for details.

Links


Built with MCP SDK, better-sqlite3, and TypeScript.

Installatie

TypingMind
Vereisten:

Node.js 18+

{
  "mcpServers": {
    "sqlew": {
      "command": "npx",
      "args": [
        "sqlew"
      ]
    }
  }
}

Beschikbare tools

  • decision

    Context Management - Store decisions with versioning and metadata. Use action: "help" for documentation.

  • file

    File Change Tracking - Track file modifications and database operations (SQLite only). Use action: "help" for documentation.

  • constraint

    Architectural Rules - Define and manage project constraints with priorities. Use action: "help" for documentation.

  • task

    Task Management - Create, track, and manage tasks with kanban workflow, layers, and file tracking. Use action: "help" for documentation.

  • help

    REQUIRED PARAMETER: action (must be specified in ALL calls)

    Help System - Query action documentation, parameters, and workflow guidance

    Actions:

    • query_action: Get action documentation with parameters and examples
    • query_params: Get parameter list only (quick reference)
    • query_tool: Get tool overview and all actions
    • workflow_hints: Get common next actions after current action
    • batch_guide: Get guidance for batch operations
    • error_recovery: Analyze errors and suggest fixes

    Use this tool to understand how to use other sqlew tools. Returns only requested information (80-95% token reduction vs legacy help).

  • example

    REQUIRED PARAMETER: action (must be specified in ALL calls)

    Example System - Browse and search code examples for sqlew tools

    Actions:

    • get: Get examples by tool, action, or topic
    • search: Search examples by keyword
    • list_all: List all available examples with filtering

    Use this tool to find working code snippets. Returns only requested examples (token-efficient).

  • use_case

    REQUIRED PARAMETER: action (must be specified in ALL calls)

    Use Case Catalog - Browse and search complete workflow scenarios

    Actions:

    • get: Get complete use case workflow by ID
    • search: Search use cases by keyword/category
    • list_all: List all use cases with filtering and pagination

    Use this tool to learn end-to-end workflows and multi-step operations. Returns workflow steps with executable code examples.

  • suggest

    Intelligent decision/constraint suggestion system. Find related decisions by key pattern, tags, or full context. Prevents duplicates and ensures consistency.

Gebruik SQLew MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra SQLew is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg SQLew toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van SQLew.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "sqlew": {
      "command": "npx",
      "args": [
        "-y",
        "sqlew"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van SQLew in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van SQLew in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je SQLew gebruiken om me hiermee te helpen?
SQLew
Zeker. Ik heb het gelezen.
Dit vond ik met SQLew.

Veelgestelde vragen

Waarvoor wordt de MCP-server SQLew gebruikt?

SQLew is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik SQLew MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je SQLew gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom SQLew MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als SQLew verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik SQLew MCP met TypingMind?

SQLew werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt SQLew MCP in TypingMind?

SQLew biedt 8 MCP-tools die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om SQLew MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als SQLew authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇