Sqlew logo

Sqlew

Stores architectural decisions and constraints in SQL so coding agents can recall design intent without repeated repository-wide investigation.

Install Sqlew

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sqlew": {
      "command": "npx",
      "args": [
        "-y",
        "sqlew"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio sqlew -- npx -y sqlew

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

sqlew MCP server gives AI coding agents a SQL-backed repository for architectural decisions, rationale, constraints, tags, layers, and rejected alternatives. Agents can use suggest, session context, and targeted decision or constraint lookups to retrieve design intent before inspecting the whole codebase. It runs through MCP and supports local databases or remote PostgreSQL, MySQL, and SQLite configurations through its package variants. Reach for sqlew when repeated architecture research, multi-day work, or multiple agents are causing unnecessary repository re-reading.

Use cases

  • Record architectural decisions during coding-agent research
  • Retrieve constraints before changing a shared subsystem
  • Reuse rejected alternatives across multi-day development work
  • Share design intent between agents using one SQL database

Key features

  • SQL-backed ADR and constraint storage
  • Suggest-based intent retrieval
  • Decision and constraint lookups
  • Rationale, tags, layers, and rejected alternatives
  • Duplicate and similarity checks
  • SQLite, PostgreSQL, and MySQL package options

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · sqlew (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
npm downloads681Package downloads in the last 30 days.
Last commit23d agoMost recent push to the default branch.

How Sqlew works

What sqlew does

sqlew stores architecture knowledge separately from implementation code. Decisions can include their rationale, tags, architectural layers, constraints, and alternatives that were rejected. This gives coding agents a structured way to recall why a system was designed a certain way, what rules apply, and which options have already been considered.

The server is aimed at AI coding workflows where an agent repeatedly investigates the same repository. It does not replace reading source code for implementation details. Instead, it addresses the design-intent portion of that investigation: architectural choices, non-local constraints, and prior decisions that are difficult to reconstruct from code alone.

How it works

The MCP interface exposes intent-retrieval operations including suggest, session context, and targeted decision and constraint lookups. Session-start context can provide recent information where the coding harness supports it. Related decisions can also be surfaced after repository searches or web research when the surrounding hooks are installed.

sqlew supports three workflow stages. Research and writing can draft ADRs automatically, without requiring Plan Mode. Plan-based workflows can capture decisions as well. Constraints remain first-class records, while duplicate and similarity checks help prevent circular reconsideration of an existing decision.

The database is created automatically on first run for the local setup. The default shared database path is ~/.config/sqlew/sqlew-shared.db. Project identity usually comes from the basename of the Git remote; SQLEW_PROJECT_NAME can override that when several repositories share one database.

Setup and configuration

The full package is installed globally with npm and includes SQLite, PostgreSQL, and MySQL drivers. Smaller package options are available for PostgreSQL, MySQL, or SQLite. Cursor Cloud and other ephemeral environments can use npx @sqlew/pg with a remote database URL. SQLEW_DATABASE_URL or DATABASE_URL configures the database connection.

For npm 12 and later, the full package and the SQLite variant require permission for the better-sqlite3 install script. PostgreSQL and MySQL variants do not need that permission. On Windows, a global SQLite installation may require the same script permission or Node.js 22 LTS; PostgreSQL is another supported option.

A basic MCP-only setup registers the sqlew command in a project .mcp.json file. Native integrations are available through the separate sqlew-plugin for Claude Code, Codex CLI, Grok Build, Hermes, and oh-my-pi. The plugin adds harness-specific hooks and planning skills; MCP-only clients receive the server tools without those additions.

Tools and capabilities

  • Store architectural decisions and constraints in SQL.
  • Retrieve relevant context with suggest.
  • Query individual decisions or constraints.
  • Include rationale, tags, layers, and rejected alternatives in decision records.
  • Inject recent or related context through supported session and post-search hooks.
  • Detect duplicate or similar decisions before another architecture choice is recorded.

Limitations and notes

MCP alone does not provide the automatic, plan-less ADR workflow. That behavior depends on the sqlew-plugin hooks for compatible coding harnesses. Cursor Cloud also needs the plugin for plan-less automatic ADR capture; running the PostgreSQL package by itself only provides the MCP server.

The server is designed to recall design intent, not implementation detail. Agents still need to inspect the repository when they need exact code behavior. sqlew does not send data to external networks or collect usage statistics. It is licensed under Apache-2.0.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sqlew

sqlew is an MCP server that connects AI coding agents to a SQL-backed repository of architectural decisions and constraints. Its main tools and capabilities include `suggest`, session context, and targeted decision or constraint lookups, with records for rationale, tags, layers, and rejected alternatives.

Install the full package globally with `npm install -g sqlew`, or use a database-specific package such as `npx @sqlew/pg`. Register the `sqlew` command in your client's MCP configuration. Full and SQLite installs may require npm 12's `--allow-scripts=better-sqlite3` option.

Yes, sqlew works with Cursor through MCP, and Cursor Cloud can use the PostgreSQL package with a remote database URL. Automatic plan-less ADR capture requires the separate sqlew-plugin Cursor hooks; MCP alone provides the server capabilities without those hooks.

sqlew supports SQLite, PostgreSQL, and MySQL through its full or database-specific packages. Remote connections can be configured with `SQLEW_DATABASE_URL` or `DATABASE_URL`, while the local setup creates a shared SQLite database automatically on first run.

No, sqlew complements code reading by storing and retrieving design intent. Agents still inspect source code for implementation details, but can use stored decisions, constraints, rationale, and rejected alternatives instead of repeatedly reconstructing those points from the entire repository.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSqlew AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sqlew?style=directory)](https://allmcps.com/mcp/sqlew)
HTML Embed
<a href="https://allmcps.com/mcp/sqlew"><img src="https://allmcps.com/api/badge/sqlew?style=directory" alt="Sqlew on AllMCPs" /></a>