YugabyteDB MCP Server

The YugabyteDB MCP Server acts as a bridge between artificial intelligence and a YugabyteDB database, allowing AI models to "talk" directly to stored data. Instead of a developer manually copying and pasting database schemas or query results into a chat window, this tool enables AI coding assistants and chat clients to access the data source autonomously. This makes it incredibly easy for an AI to understand the structure of a database and provide answers based on real-time information. Technically, the server is built using the Model Context Protocol (MCP) and the FastMCP framework to provide specific capabilities to any compatible LLM. It offers a `summarize_database` tool, which fetches a comprehensive list of all tables along with their schemas and row counts, giving the AI a bird's-eye view of the data architecture. Furthermore, the `run_read_only_query` tool enables the model to execute SQL commands and receive results in JSON format, ensuring that the AI can perform data analysis or retrieve specific records safely within a read-only environment. For developers, this integration streamlines the development workflow by allowing tools like Claude Desktop, Cursor, or Windsurf to interact with distributed SQL workloads seamlessly. The server is highly flexible, supporting both STDIO and Streamable-HTTP transports, and can be deployed locally using the `uv` package manager or via containerized Docker environments. By bridging the gap between LLMs and high-performance databases, this tool empowers developers to build AI-driven applications that can reason over complex, live datasets with minimal friction.

Category: Databases & Data Stores

Tags: database-management, distributed-database, postgresql, SQL, yugabytedb

Visit YugabyteDB MCP Server

How to install and configure YugabyteDB MCP Server

1. Installation The YugabyteDB MCP Server requires Python 3.10 or higher and the uv package manager. Standard Installation: 1. Clone the repository: bash git clone git@github.com:yugabyte/yugabytedb-mcp-server.git cd yugabytedb-mcp-server 2. Install dependencies using uv: bash uv sync Docker Installation: Build the Docker image: bash docker build -t mcp/yugabytedb . ---

2. Configuration The server requires a connection string via the YUGABYTEDB_URL environment variable.

Claude Desktop (Docker Method) Add this to your claude_desktop_config.json: json { "mcpServers": { "yugabytedb-mcp-docker": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "YUGABYTEDB_URL=dbname=yugabyte host=host.docker.internal port=5433 user=yugabyte password=yugabyte load_balance=false", "mcp/yugabytedb" ] } } }

Cursor / IDE (Local uv Method) Add this to your MCP settings: json { "mcpServers": { "yugabytedb-mcp": { "command": "uv", "args": [ "--directory", "/path/to/cloned/yugabytedb-mcp-server/", "run", "src/server.py" ], "env": { "YUGABYTEDB_URL": "dbname=database_name host=hostname port=5433 user=username password=password load_balance=true topology_keys=cloud.region.zone1,cloud.region.zone2" } } } } Note: Replace /path/to/cloned/yugabytedb-mcp-server/ with your actual local path. ---

3. Available Tools * summarize_database: Lists all tables in the database, including schema information and row counts. * run_read_only_query: Runs a read-only SQL query and returns the results in JSON format. ---

4. Example Prompts Once the MCP server is connected, you can use prompts such as: * "Give me a summary of all the tables and schemas in my YugabyteDB database." * "Show me the first 10 rows from the users table." * "Run a read-only query to count the number of orders per customer." * "Describe the schema for the 'products' table and tell me how many rows it contains."

What you can do with YugabyteDB MCP Server

Use Case 1: Natural Language Data Exploration for Business Insights Problem: Non-technical stakeholders or developers who are unfamiliar with a specific database schema often struggle to extract quick insights because they cannot write complex SQL queries or don't know which tables contain the necessary data. Solution: This MCP allows users to interact with YugabyteDB using natural language. The LLM can first use summarize_database to understand the schema and then automatically generate and execute the correct run_read_only_query to answer business questions. Example: A product manager asks Claude: "Which five products had the highest sales volume in the last 24 hours?" The LLM identifies the sales and products tables, joins them, and returns a JSON list of the top products directly in the chat.

Use Case 2: AI-Assisted Schema Discovery and Onboarding Problem: When joining a new project with a large, distributed YugabyteDB cluster, developers often spend hours reading documentation or manually running DESCRIBE commands to understand table relationships and data distribution. Solution: Developers can use the MCP within their IDE (like Cursor or Windsurf) to get an instant, high-level overview of the database. The LLM can explain how tables relate to one another based on the actual live schema. Example: A developer asks Cursor: "Explain the database schema for our billing system and show me how the invoices table links to customer_accounts." The LLM runs summarize_database, identifies the foreign keys, and provides a summary of the relationship.

Use Case 3: Real-time Debugging of Distributed Applications Problem: While debugging a failing API or a data consistency issue in a distributed environment, developers usually have to switch context between their code editor and a terminal

GUI database client to check the state of specific records. Solution: By integrating the YugabyteDB MCP into an AI-powered code editor, the developer can query the live database without leaving their workflow. The LLM can verify if a record exists or if a specific flag was updated during a test run. Example: While investigating a bug, a developer tells Windsurf: "Check the orders table for the record with ID 'ORD-123' and tell me if the status column is 'PENDING' or 'COMPLETED'." The AI executes the query and reports the current state of that row.

Use Case 4: Automated Data Quality Auditing Problem: Data engineers need to periodically check for anomalies, such as orphaned records, unexpected null values, or row count mismatches, which can be tedious…

Key facts

  • Open Source
  • Databases & Data Stores, Developer Tools & Code Intelligence
  • database-management, distributed-database, postgresql, SQL, yugabytedb

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — Create, edit, and manage LaTeX files. Requires an external LaTeX distribution like MiKTeX, TeX Live, or MacTeX.
  • MCP JSON — A collection of servers for file system operations, Google search, web automation, and executing terminal commands.
  • MCP Jupyter Complete — A server for Jupyter notebook manipulation with position-based operations and VS Code integration.
  • MCP LSP Go — An MCP server that connects AI assistants to Go's Language Server Protocol (LSP) for advanced code analysis.
  • MCP Manager — A full-stack application for managing Model Context Protocol (MCP) servers for Claude Desktop with a modern web interface.
  • MCP Lab — A development environment for building and testing custom MCP servers with AI and VS Code integration.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories