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

anydb-mcp

v1.0.0

Published

The ultimate universal database connector for AI Agents (Cursor, Claude, Gemini, Zed, Cline). Zero-config MCP server for PostgreSQL, MySQL, SQLite, MongoDB, and Redis.

Readme

AnyDB MCP Server

AnyDB MCP Banner

The Universal Database Connector for AI Agents

npm version Downloads License

anydb-mcp is a professional, zero-config Model Context Protocol (MCP) server that empowers AI agents to safely query SQL and NoSQL databases.

It acts as a universal bridge, allowing tools like Cursor, Claude, Gemini, and Zed to interact with your data effortlessly using a single unified interface.


✨ Features

  • 🔌 Universal Support: Works with PostgreSQL, MySQL, SQLite, MongoDB, and Redis out of the box.
  • 🚀 Zero Config: No configuration files required. Just run it via npx.
  • Stateless & Fast: Connections are created on-demand and closed immediately.
  • 🛡️ Secure: Designed for read-only access (enforceable via DB users).
  • 🧠 Smart Parsing: Automatically detects database types from standard connection URIs.

📦 Quick Start

You can run this server directly using npx without installing anything manually.

🤖 Choose Your Client

  1. Open Cursor Settings > Features > MCP.
  2. Click + Add New MCP Server.
  3. Enter the following details:
    • Name: anydb
    • Type: command
    • Command: npx
    • Args: -y anydb-mcp

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "anydb": {
      "command": "npx",
      "args": ["-y", "anydb-mcp"]
    }
  }
}

Edit your settings.json (Cmd/Ctrl + ,):

{
  "context_servers": {
    "anydb": {
      "command": {
        "path": "npx",
        "args": ["-y", "anydb-mcp"]
      }
    }
  }
}

Add to your mcp_servers.json:

{
  "mcpServers": {
    "anydb": {
      "command": "npx",
      "args": ["-y", "anydb-mcp"]
    }
  }
}

Note: On Windows, explicitly use npx.cmd.

  1. Open the MCP Servers tab (usually in the sidebar or settings).
  2. Select Configure MCP Servers.
  3. Add the configuration:
"anydb": {
  "command": "npx",
  "args": ["-y", "anydb-mcp"]
}

🔗 Connection URIs

The AI agent will provide these URIs automatically, or you can provide them in the chat context.

| Database | Protocol | Example URI | |----------|----------|-------------| | PostgreSQL | postgres:// | postgres://user:pass@localhost:5432/mydb | | MySQL | mysql:// | mysql://user:pass@localhost:3306/mydb | | SQLite | sqlite:// | sqlite:///Users/alex/data.db (Absolute path) | | MongoDB | mongodb:// | mongodb://user:pass@localhost:27017 | | Redis | redis:// | redis://:pass@localhost:6379 |


🛠️ Tool Usage

The server exposes one powerful tool: db_query.

Arguments:

  • uri (string, required): The connection string.
  • query (string, required): The SQL query, MongoDB filter (JSON), or Redis command.
  • collection (string, optional): Required only for MongoDB.

Examples:

SQL (Postgres/MySQL/SQLite):

SELECT id, email FROM users WHERE created_at > '2024-01-01' LIMIT 5;

MongoDB:

{ "status": "active", "age": { "$gt": 21 } }

Redis:

GET session:12345

🔒 Security Best Practices

  1. Read-Only User: ALWAYS create a dedicated database user with SELECT-only permissions (or equivalent) for the AI.
    • Postgres: GRANT SELECT ON ALL TABLES IN SCHEMA public TO ai_user;
    • MySQL: GRANT SELECT ON mydb.* TO 'ai_user'@'%';
  2. Network: Ensure the database host is accessible from the machine running the MCP server.
  3. Data Privacy: Be cautious. The AI has access to whatever data the query returns.

👨‍💻 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

  1. Fork the repo.
  2. npm install
  3. npm test
  4. Submit a Pull Request.

License

MIT © Alexeev Alexandr