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

@vistal/mcp

v0.1.1

Published

Zero-config MCP server for any database — point it at a DATABASE_URL and let coding agents (Claude Code) query it safely, no SQL and no code

Readme

@vistal/mcp

Point it at a database URL. Claude talks to your data. No SQL, no code.

A zero-config MCP server for any database vistal supports through Prisma (PostgreSQL, MySQL, SQLite, SQL Server). Give it a DATABASE_URL and it:

  1. introspects your live schema (prisma db pull) — no schema.prisma needed,
  2. generates the typed tools an agent uses to query it,
  3. serves them over MCP — read-only by default, scoped by your policies.

No SQL ever reaches the model, and it can only do what the policy allows.

Quick start (Claude Code)

Add it to your .mcp.json — nothing to install or write:

{
  "mcpServers": {
    "db": {
      "command": "npx",
      "args": ["-y", "@vistal/mcp"],
      "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" }
    }
  }
}

That's it. Claude can now discover your tables (list_resources, describe_resource) and read them (query, get, aggregate) — all policy-gated, all without writing SQL.

You can also run it directly:

DATABASE_URL="postgresql://…" npx @vistal/mcp
# or pass the URL as the first argument
npx @vistal/mcp "postgresql://…"

Defaults & safety

  • Read-only. Out of the box only query / get / aggregate are exposed — never create / update / delete. Writes require a policy file (below).
  • All tables, opt-out. Every table is exposed; narrow it with allow/deny lists.
  • No SQL, no leaks. The model calls typed tools; vistal turns them into scoped queries server-side. Fields marked sensitive in your schema never reach it.

Configuration

All via environment variables:

| Variable | Description | | --- | --- | | DATABASE_URL | Connection string (required; or pass as the first arg). | | VISTAL_PROVIDER | postgresql | mysql | sqlite | sqlserver | mongodb. Inferred from the URL when omitted. | | VISTAL_TABLES | Comma-separated allow-list. Only these tables are exposed. | | VISTAL_EXCLUDE | Comma-separated deny-list, applied after the allow-list. | | VISTAL_POLICY_FILE | Path to a policy module that takes full control (enables writes — see below). | | VISTAL_CONTEXT | JSON policy context passed to your policy file. Defaults to {}. | | VISTAL_HTTP_PORT | Serve over Streamable HTTP on this port instead of stdio. |

Enabling writes / richer policies

For anything beyond read-only, point VISTAL_POLICY_FILE at a CommonJS module that receives the configured vistal instance and declares policies. It takes full control of access (the allow/deny lists are then ignored):

// db-policy.cjs
module.exports = (vistal) => {
  vistal.policy("orders", () => ({ read: true, write: true, delete: false }))
  vistal.policy("users", () => ({ read: true, write: false, delete: false }))
}
{ "env": {
  "DATABASE_URL": "postgresql://…",
  "VISTAL_POLICY_FILE": "./db-policy.cjs"
} }

Use VISTAL_CONTEXT to feed runtime context (tenant, role, …) your policies read: "VISTAL_CONTEXT": "{\"tenant\":{\"id\":\"acme\"}}".

How it works

Claude Code ─MCP─▶ @vistal/mcp
                     │  prisma db pull + generate  → live schema + typed client
                     │  @vistal/core               → policy engine (read-only default)
                     ▼
                  @vistal/prisma → PrismaClient → your database

The generated client lives in a temp directory and is removed on shutdown; your project is never modified. Requires network access to the database and the ability to run the bundled Prisma CLI.

Need policies-in-code instead?

If you'd rather define your adapter and policies yourself and embed an MCP server in your own app, use @vistal/mcp-sdk directly.

License

MIT