YugabyteDB MCP Server
@yugabyte
An MCP server implementation for YugabyteDB that allows LLMs to directly interact with your database.
Overview
What is YugabyteDB MCP Server?
The YugabyteDB MCP Server is an MCP (Model Context Protocol) implementation that enables large language models to directly interact with a YugabyteDB database. It allows LLMs to list database tables with schemas and row counts, and execute read-only SQL queries, returning results as JSON, and is designed for use with MCP clients like Claude Desktop, Cursor, and Windsurf Editor.
How to use YugabyteDB MCP Server?
Install by cloning the repository and running uv sync. Set the YUGABYTEDB_URL environment variable with your database connection string, then start the server with uv run server.py. Configure your MCP client (e.g., Claude Desktop, Cursor, Windsurf Editor) by adding a server entry using uv as the command and specifying the environment variable.
Key features of YugabyteDB MCP Server
- List all tables with schema and row counts.
- Run read-only SQL queries returning JSON results.
- Compatible with Claude Desktop, Cursor, Windsurf Editor.
- Built with FastMCP for easy MCP integration.
- Uses environment variable for database connection.
Use cases of YugabyteDB MCP Server
- Ask an LLM to summarize all tables in your YugabyteDB database.
- Run ad-hoc SELECT queries via natural language and get JSON results.
- Integrate with AI coding assistants to explore and query database schema.
- Use in development workflows to quickly inspect database structure.
FAQ from YugabyteDB MCP Server
What are the prerequisites for YugabyteDB MCP Server?
Prerequisites include Python 3.10 or higher, uv installed, a running YugabyteDB database, and an MCP client such as Claude Desktop or Cursor.
What environment variables are required?
The only required environment variable is YUGABYTEDB_URL, which specifies the connection string for your