Anydb MCP logo

Anydb MCP

Connects AI agents to PostgreSQL, MySQL, SQLite, MongoDB, and Redis through five MCP tools and named profiles.

Install Anydb MCP

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": {
    "anydb-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "anydb-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 5 tools correctly (Today).

Overview

The anydb-mcp MCP server gives AI agents one MCP interface for PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, and Redis. It exposes tools for listing profiles, running a statement, inspecting schemas, explaining queries, and checking database health. Named profiles are stored in a local JSON file, keeping connection passwords out of prompts and the model context. Reach for it when an agent needs database access across multiple engines through a single stdio server.

Use cases

  • Query several database engines through one MCP interface
  • Inspect tables, columns, indexes, and keyspaces
  • Check database reachability and role capabilities
  • Review query plans without executing statements
  • Keep database credentials outside model prompts

Key features

  • PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, and Redis support
  • Named connection profiles
  • Five shared database tools
  • Schema inspection and query explanation
  • Database health checks
  • stdio MCP transport

Tools5

What Anydb MCP lets your agent do. Expand a tool for its parameters.

Verified live~3.0k tokens of context

Security & health

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

ActiveLast checked 1d ago

Recent health check succeeded.

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Can delete or modify data · 1Handles credentials · 1Makes network requests · 4Read-only tools · 4
Network at startup3 connections
Files written at startup1
Install scriptsNone
npm provenanceSigned build
Package age268 days
Maintainers1

Observed 2026-10-22 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15h ago via OSV.dev · anydb-mcp (npm)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
Last commit20d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Anydb MCP works

What anydb-mcp MCP server does

The anydb-mcp MCP server connects an MCP-compatible AI client to PostgreSQL, MySQL or MariaDB, SQLite, MongoDB, and Redis. It presents the databases through five shared tools rather than separate tools for each database type. The selected database driver comes from the named connection profile supplied to a tool.

The server is listed in the 🗄️ Databases category and is suited to agents that need to inspect or query several database systems without changing their tool interface. It can also be used with a single database when keeping credentials outside the model context is important.

How it works

Connection details are stored in named profiles in ~/.anydb/db.json. Tools receive a profile name instead of requiring the model to provide a connection string or password. db_list returns profile names and non-identifying metadata, so an agent can discover available profiles before calling another tool.

The server communicates over MCP using standard input and output. It writes logs to stderr so stdout remains available for protocol messages. Node.js 20.19 or newer is required. The same npx -y anydb-mcp command can be registered with supported clients; only the client configuration format changes.

Setup and configuration

To create an initial local configuration, make the directory and copy the included example:

bash
mkdir -p ~/.anydb
cp examples/db.json ~/.anydb/db.json

That example uses SQLite and does not require a host, account, or secret. For other databases, create profiles using the repository’s example configuration as a guide. The configuration file can be placed elsewhere by setting ANYDB_CONFIG=/path/to/db.json in the client environment; the default location is used when it is not set.

Register the server as a stdio process with the MCP client. Other clients that launch standard stdio MCP servers can use the same command. On Windows, a client that cannot launch npx through a shell may need npx.cmd.

Tools and capabilities

  • db_list reports profile names and selected metadata without exposing identifying connection details.
  • db_query runs one statement against one selected database. It is the only tool described as capable of changing data, so calls should be reviewed when writes are possible.
  • db_schema returns database structure such as tables, columns, indexes, or keyspace information, depending on the driver.
  • db_explain returns a statement’s execution plan without running the statement.
  • db_health checks reachability and reports what the configured role can do.

Four tools are marked read-only in their MCP annotations. db_query is marked as non-read-only, destructive, non-idempotent, and open-world because its result and effects depend on the target database and statement.

Limitations and notes

The server requires Node.js 20.19 or newer because of its database drivers. A profile must exist before the tools that target a database can be used, and callers need to know or discover its name. db_explain describes a plan without executing the statement; it is not a substitute for running a query. Credentials remain in the local profile configuration, so protecting that file and the database accounts remains the operator’s responsibility.

Reviews

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

Frequently Asked Questions about Anydb MCP

anydb-mcp is an MCP server that connects AI agents to PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, and Redis through named profiles. Its main tools list profiles, run database statements, inspect schemas, explain query plans without execution, and check database health while keeping credentials outside model prompts.

Run it through `npx -y anydb-mcp` and register that command as a stdio MCP server in your client. Create `~/.anydb/db.json` first, or point `ANYDB_CONFIG` to another profile file.

By default, anydb-mcp reads profiles from `~/.anydb/db.json`. Set `ANYDB_CONFIG` to use a different file. The model passes profile names to tools rather than connection strings or passwords.

It supports PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, and Redis. The database type is determined by the selected named connection profile.

Yes, anydb-mcp works with Cursor through a stdio configuration using `npx -y anydb-mcp`. Cursor can use a user-level or project-level MCP configuration.

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 PreviewAnydb MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/anydb-mcp?style=directory)](https://allmcps.com/mcp/anydb-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/anydb-mcp"><img src="https://allmcps.com/api/badge/anydb-mcp?style=directory" alt="Anydb MCP on AllMCPs" /></a>