Mcpolyglot logo

Mcpolyglot

Policy-controlled MCP access to Postgres, MySQL, SQLite, MongoDB, and OpenAPI REST APIs with auditing and redaction.

Install Mcpolyglot

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": {
    "mcpolyglot": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpolyglot/cli",
        "serve",
        "--config",
        "<config>"
      ]
    }
  }
}

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

Claude Code command
claude mcp add --transport stdio mcpolyglot -- npx -y @mcpolyglot/cli serve --config '<config>'

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @mcpolyglot/cli serve --config <config>

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

mcpolyglot MCP server exposes existing databases and OpenAPI REST APIs to MCP-compatible agents through one CLI and configuration format. It applies table policies, read-only database connections, query checks, rate limits, timeouts, redaction, result-size limits, untrusted-data wrapping, and auditing before or after connector execution. Use it when agents need controlled access to Postgres, MySQL, SQLite, MongoDB, or OpenAPI sources without building a separate server for each system. It supports stdio and HTTP serving, with per-agent tokens available for HTTP access.

Use cases

  • Expose selected database tables to an MCP agent
  • Restrict agent writes with table and column policies
  • Redact sensitive fields from query results
  • Audit agent access across multiple data sources
  • Serve database and OpenAPI sources over one MCP interface

Key features

  • Postgres, MySQL, SQLite, and MongoDB connectors
  • OpenAPI REST API support
  • Per-table access and denied-column policies
  • Read-only connections unless writes are allowed
  • Redaction, result limits, and untrusted-data wrapping
  • stdio and HTTP serving with audit output

Security & health

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

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 52d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16h ago via OSV.dev · @mcpolyglot/cli (npm)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
npm downloads283Package downloads in the last 30 days.
Last commit18d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Mcpolyglot works

What mcpolyglot does

mcpolyglot turns configured database and OpenAPI sources into MCP servers that agents can use through a common interface. Supported database connectors include Postgres, MySQL, SQLite, and MongoDB. It also supports OpenAPI REST APIs, allowing one server configuration to cover heterogeneous sources.

Access is governed by a policy rather than by instructions sent to the model. Policies can expose selected tables for reading or writing, hide unlisted tables, deny specific columns, cap returned rows, limit statement duration, and restrict writes per call. A database connection is read-only unless the policy grants write access. The server also redacts sensitive values, removes denied columns, marks returned content as untrusted data, and records calls in an audit log.

How it works

The server processes requests through a fixed core pipeline. It checks the agent's scope, applies rate limiting and timeouts, classifies the request against the policy, invokes the relevant connector, then applies redaction, result-size limits, untrusted-data wrapping, and auditing. Connectors cannot bypass these stages. A rejected request stops at the first failing stage and returns a tool error with a reason.

Policies can use defaultAccess: 'none' so newly added tables remain hidden until explicitly listed. The doctor command compares policy entries with the live schema and reports exposed tables, writable tables, hidden tables, and hidden columns. Requests such as DDL, GRANT, SET, multiple statements, unreadable SQL, and several server-access functions are always denied. Updates and deletes without a column-based WHERE clause are also blocked.

Setup and configuration

Node.js 22 or newer is required. The CLI can create a configuration from a database URL or SQLite path:

Terminal
npx @mcpolyglot/cli init ./app.db
npx @mcpolyglot/cli doctor
npx @mcpolyglot/cli serve

init introspects the schema and creates a read-oriented policy. It suggests denied columns for names associated with passwords, tokens, social security numbers, API keys, and hashes. Database credentials can be supplied through environment variables, files, or a keychain; inline passwords in database URLs are converted to environment-variable references in generated configuration.

The default serving mode uses stdio. HTTP mode is available with serve --http, and the Docker setup mounts configuration at /config/mcpolyglot.config.json. HTTP clients can authenticate with per-agent tokens. Claude Desktop can launch the CLI through its MCP configuration using npx and a config path.

Tools and capabilities

The server provides an MCP query tool for database requests, including parameterized queries. Its client package can connect to a running HTTP endpoint and reports policy denials as McpolyglotDeniedError values with a code and reason. Separate agents can receive individual tokens, scopes, sources, and narrowed policies.

Auditing can write JSONL records to the console, a file, or a webhook. Policy examples cover read-only analytics, constrained transaction posting, and multiple agents sharing one server. The repository also includes connector examples for Postgres, MySQL, SQLite, MongoDB, OpenAPI, streamable HTTP, and Docker.

Limitations and notes

The project is marked alpha. A policy denial prevents the request from reaching the database and is returned to the agent as a tool error. The parser-based WHERE protection is intended to catch omitted clauses, not determined attempts to evade controls; write limits and database constraints provide additional safeguards. A write policy can limit execution to one row per call, and excess writes can be rolled back according to the configured limit.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about Mcpolyglot

mcpolyglot is an MCP server that connects agents to Postgres, MySQL, SQLite, MongoDB, and OpenAPI REST APIs. Its main tools apply policy checks to database and API requests, enforce read or write access, redact sensitive results, wrap returned data as untrusted, and audit agent calls through one CLI and configuration.

Run it through the npm CLI with `npx @mcpolyglot/cli`. Use `init` with a database URL or SQLite path to generate configuration, run `doctor` to validate the policy, and start the MCP endpoint with `serve`.

Run `npx @mcpolyglot/cli init ./app.db`, then review the generated policy and start it with `npx @mcpolyglot/cli serve`. The initializer inspects the schema, defaults tables to read access, and suggests sensitive columns for denial.

Yes. Cursor is named as a supported MCP host, and the repository includes an agent skill for setting up and wiring mcpolyglot into Cursor. The server can communicate over stdio or HTTP.

Yes. Policies can grant write access selectively, limit writes per call, and block unsafe statement forms. Database connections remain read-only unless the policy grants writes, while denied requests return tool errors instead of reaching the database.

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