MCP.Market

Locksmith MCP server

by cxk280·io.github.cxk280/locksmith·v0.1.1

Lints PostgreSQL migrations for dangerous locking operations and suggests safe rewrites.

A88/100grade A
What users say
No reviews yet
Be the first
Safety scan
A88/100

full report

Adoption
New

0 stars35 downloads/wk

Reviews

Write one

Nobody has reviewed Locksmith yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Locksmith tools (2)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • analyze_migration

    Lint a PostgreSQL migration for operations that take dangerous locks (table rewrites,

  • explain_lock

    Given a lock mode name (e.g. 'ACCESS EXCLUSIVE') or a fragment of an operation, explain

Public scan report

scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it

no findings
  • Code scan43 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 89 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 88/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Locksmith compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
88/100
higher than 75% of 48,255 servers
Tools
2
the typical server has 7
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
Downloads a week
35
more than 25% of 12,191 servers with a package

What its tools let an agent do: 2 read

Install Locksmith in Claude Code, Cursor or VS Code

Runs npx -y locksmith-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add locksmith -- npx -y locksmith-mcp
Add to Cursor

What the publisher says

From the Locksmith repository's README, as published. We do not edit it. Read it on GitHub

Locksmith 🔒

An MCP server that catches dangerous SQL migrations before they lock your database.

Most migrations look harmless and then take down production: a plain CREATE INDEX blocks every write for the length of the build; ALTER COLUMN ... TYPE rewrites the whole table under ACCESS EXCLUSIVE; SET NOT NULL scans every row. Which operations are safe — and the rewrite that makes the dangerous ones safe — is knowledge that lives in senior engineers' heads.

Locksmith encodes that knowledge as a tool an LLM agent (or a human) can call. Give it a PostgreSQL migration; it returns a PASS / REVIEW / BLOCK verdict, a finding for each risky statement (which lock it takes, why that's dangerous), and a concrete safe rewrite.

🛑 BLOCK — do not ship as written

## 🛑 CREATE INDEX without CONCURRENTLY  `create-index-non-concurrent` (line 5)
> `CREATE INDEX idx_users_email ON users (email)`
Problem: This index build will block all writes to the table until it completes.
Lock taken: SHARE (blocks writes)
Fix: Build the index with CREATE INDEX CONCURRENTLY, which does not block writes.
Suggested rewrite:
  CREATE INDEX CONCURRENTLY idx_users_email ON users (email)

Why an MCP server?

An agent can often reason about lock semantics — but not reproducibly, and not in a way you can test, audit, or trust to gate a deploy unsupervised. The same prompt may approve a table-rewriting ALTER one run and flag it the next, or miss it entirely in a long migration. Locksmith turns that probabilistic capability into a deterministic, tested tool: the lock semantics were verified once (against the PostgreSQL docs and the parser's real behavior, with a test suite pinning each rule) and now run identically every time, returning the same verdict plus a paste-ready fix — so "review this migration" stops being a guess.

Capabilities

Tools

(both human-readable Markdown and validated structured output).

  • analyze_migration(sql, assumeLargeTables?) → verdict + findings + safe rewrites
  • explain_lock(query) → what a given Postgres lock mode blocks and what takes it.

Resources

  • locksmith://lock-matrix — the PostgreSQL table-level lock compatibility matrix.
  • locksmith://rules — the full rule catalog (id, severity, rationale) as JSON.

Prompts

  • review-migration — analyze a migration and summarize the risk as a PR comment.

Rule catalog

Suppressing a rule

Acknowledge a deliberate risk inline, eslint-style:

-- locksmith:disable create-index-non-concurrent
CREATE INDEX idx_users_email ON users (email);

A bare -- locksmith:disable suppresses all rules for the next statement.

Install & run

No clone or build required — run it straight from npm:

npx locksmith-mcp

Use with Claude Code

claude mcp add locksmith -- npx -y locksmith-mcp

Or add to any MCP client config (Claude Desktop, etc.):

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Locksmith: common questions

Is Locksmith MCP server safe?
Yes, by our scan: it is graded A (88/100). Read the Locksmith safety report
How do I install Locksmith?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Locksmith need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Locksmith maintained?
The last commit was 128 days ago (2026-06-29). The latest release is v0.1.1.
How does Locksmith compare with other MCP servers?
safety score 88/100 (higher than 75% of 48,255 servers); tools 2 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.