npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strictdb-mcp

v0.1.1

Published

MCP server for StrictDB — AI agents talk to any database through one unified interface

Readme

strictdb-mcp

MCP server for StrictDB — AI agents talk to any database through one unified interface.

Connect Claude, GPT, or any MCP-compatible client to MongoDB, PostgreSQL, MySQL, MSSQL, SQLite, or Elasticsearch. StrictDB's guardrails, sanitization, and self-correcting errors are enforced on every tool call.

Full Documentation | GitHub | strictdb on npm

Install

npm install strictdb-mcp

You also need the database driver for your backend:

npm install mongodb        # MongoDB
npm install pg             # PostgreSQL
npm install mysql2         # MySQL
npm install mssql          # MSSQL
npm install better-sqlite3 # SQLite
npm install @elastic/elasticsearch # Elasticsearch

Usage

Set the STRICTDB_URI environment variable and run the server:

STRICTDB_URI="postgresql://user:pass@localhost:5432/mydb" npx strictdb-mcp

Claude Desktop Configuration

Add this to your Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "strictdb": {
      "command": "npx",
      "args": ["strictdb-mcp"],
      "env": {
        "STRICTDB_URI": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

Claude Code Configuration

claude mcp add strictdb -- npx strictdb-mcp

Then set the environment variable in your shell before launching Claude Code:

export STRICTDB_URI="postgresql://user:pass@localhost:5432/mydb"

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | STRICTDB_URI | Yes | Database connection URI (auto-detects backend) | | STRICTDB_DB_NAME | No | Override the database name from the URI | | STRICTDB_ES_API_KEY | No | Elasticsearch API key (if using ES with auth) |

Available Tools (14)

Discovery & Validation

| Tool | Description | |------|-------------| | strictdb_describe | Discover the schema of a collection — call this BEFORE writing any query | | strictdb_validate | Dry-run validate an operation without executing it | | strictdb_explain | Show the native query that would be executed | | strictdb_status | Check database connection health |

Read Operations

| Tool | Description | |------|-------------| | strictdb_query_one | Find a single document matching the filter | | strictdb_query_many | Find multiple documents (always include a limit) | | strictdb_count | Count documents matching the filter |

Write Operations

| Tool | Description | |------|-------------| | strictdb_insert_one | Insert a single document | | strictdb_insert_many | Insert multiple documents | | strictdb_update_one | Update a single document matching the filter | | strictdb_update_many | Update all documents matching the filter | | strictdb_delete_one | Delete a single document matching the filter | | strictdb_delete_many | Delete all documents matching the filter (requires non-empty filter) | | strictdb_batch | Execute multiple operations in a single optimized batch |

Filter Syntax

All tools that accept a filter parameter use MongoDB-style syntax, regardless of backend:

{ "status": "active" }
{ "age": { "$gte": 18 } }
{ "role": { "$in": ["admin", "mod"] } }
{ "$or": [{ "status": "active" }, { "role": "admin" }] }

Supported operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists, $regex, $not, $size, $and, $or, $nor.

Safety

All StrictDB guardrails are enforced automatically:

  • Empty filter blockingdeleteMany and updateMany with {} are rejected
  • Unbounded query blockingqueryMany requires a limit
  • SQL field validation — column names are whitelisted to prevent injection
  • ES internal field blocking — fields starting with _ are blocked
  • Regex complexity validation — ReDoS patterns are rejected
  • Self-correcting errors — every error includes a .fix field with actionable instructions

Supported Databases

| Database | URI Scheme | Driver | |----------|-----------|--------| | MongoDB | mongodb:// mongodb+srv:// | mongodb | | PostgreSQL | postgresql:// postgres:// | pg | | MySQL | mysql:// | mysql2 | | MSSQL | mssql:// | mssql | | SQLite | sqlite:// file: | better-sqlite3 | | Elasticsearch | http:// https:// | @elastic/elasticsearch |

Related

License

MIT