YugabyteDB MCP Server
Published · Updated
At a glance
- Category
- Databases
- GitHub repository
- yugabyte/yugabytedb-mcp-server
- Watch out for
- Version 2 is a release candidate, so you must pin 2.0.0rc2 or allow pre-releases until the stable release is published.
Yugabyte publishes this server in its own GitHub organization and on PyPI as yugabytedb-mcp-server. It is a Python server that talks to YugabyteDB and also to plain PostgreSQL, so a model can look at a schema, run SELECT statements, and, if you allow it, run writes behind a guardrail layer.
By default it runs locally over stdio, launched by your MCP client. It can also run as a Streamable HTTP service for shared deployments, with optional OAuth through AWS Cognito or a generic OIDC provider, plus Origin header checks. In HTTP mode it binds to 127.0.0.1 and refuses to start on a non-loopback address unless an auth provider is set.
Version 2 is still marked as a release candidate in the README, so default installs may not pick it up until 2.0.0 stable ships. The server sends no telemetry and logs only to stderr.
How it connects
Your AI app
An assistant or agent that supports MCP
YugabyteDB MCP Server
Runs as
- Python (uv / pip)
- Remote (HTTP)
Gives the agent
- Schema summary
- Read-only queries
- Guarded writes
- Optional WHERE enforcement
- Self-hosted remote mode
- TLS certificates from AWS
YugabyteDB
Signs in with
- Username and password
What it can do
- Schema summary
- summarize_database lists the tables in a schema (public by default) with their columns and row counts. It is marked read-only.
- Read-only queries
- run_read_only_query wraps a SELECT in BEGIN READ ONLY and returns the rows as JSON, with a byte cap on large results.
- Guarded writes
- run_write_query handles INSERT, UPDATE, DELETE, MERGE, TRUNCATE and DDL. It is off until you pass --enable-write-query, and it rejects statements such as GRANT, DROP SCHEMA, COPY, CREATE EXTENSION and multi-statement input.
- Optional WHERE enforcement
- YB_MCP_REQUIRE_WHERE_ON_UPDATE and YB_MCP_REQUIRE_WHERE_ON_DELETE make the server reject updates or deletes that have no WHERE clause.
- Self-hosted remote mode
- With --transport http and --stateless-http, the server can sit behind a reverse proxy with Cognito or OIDC auth, and per-user SET ROLE mapping limits what each caller can touch.
- TLS certificates from AWS
- The server can fetch the database root certificate from AWS Secrets Manager using --yb-aws-ssl-root-cert-secret-arn and the matching region flag.
Setting it up
You need Python 3.10 or later, uv (or pip), and a reachable YugabyteDB or PostgreSQL database. The quickest route is uvx with no install: in claude_desktop_config.json add a server named yugabytedb with "command": "uvx", "args": ["yugabytedb-mcp-server"] and an env block setting YUGABYTEDB_URL to a libpq string like host=... port=5433 dbname=... user=... password=..., then restart Claude Desktop. While 2.0.0rc2 is the only published version, the README says the args need "[email protected]" (or --pre). Alternatively run pipx install yugabytedb-mcp-server (or uv tool install) and point the config at the yugabytedb-mcp command instead. The same entries work in Cursor (Settings, MCP, add a new global MCP server) and Devin Desktop (formerly Windsurf), which reads ~/.config/devin/mcp_config.json. To allow writes, set YB_MCP_ENABLE_WRITE_QUERY=true. For HTTP testing, run yugabytedb-mcp --transport http and connect MCP Inspector to http://localhost:8000/mcp.
Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)
Where it helps
- Ask the agent to summarize the tables and row counts in a schema before writing a migration or a report query.
- Have it answer ad hoc questions about production data with SELECT queries that cannot modify anything.
- Let it create a snapshot table with CREATE TABLE AS SELECT on a dev cluster once writes are enabled.
- Run one shared, OIDC-protected instance for a team, where each user's queries run under their own database role.
Limitations and things to watch
- Version 2 is a release candidate, so you must pin 2.0.0rc2 or allow pre-releases until the stable release is published.
- The write guardrail list is described by Yugabyte as best effort, not exhaustive, so use a least-privilege database role.
- Only three tools are exposed, so cluster administration and anything beyond SQL is out of scope.
- Remote HTTP mode has no TLS of its own; you have to terminate HTTPS at a reverse proxy.
- Multi-replica HTTP deployments break sessions unless --stateless-http is set.
Sources
Written from the project's own documentation, checked November 2026.
- github.com /yugabyte/yugabytedb-mcp-server
- github.com /yugabyte/yugabytedb-mcp-server/blob/main/CHANGELOG.md
- pypi.org /project/yugabytedb-mcp-server
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.