
YugabyteDB
STDIOOfficialMCP server for LLMs to interact directly with YugabyteDB databases
MCP server for LLMs to interact directly with YugabyteDB databases
An MCP server implementation for YugabyteDB that allows LLMs to directly interact with your database.
Clone this repository and install dependencies:
git clone [email protected]:yugabyte/yugabytedb-mcp-server.git cd yugabytedb-mcp-server uv sync
The server is configured using the following environment variable:
YUGABYTEDB_URL
: The connection string for your YugabyteDB database (e.g., dbname=database_name host=hostname port=5433 user=username password=password
)Example .env
file:
YUGABYTEDB_URL=postgresql://user:password@localhost:5433/yugabyte
You can run the server using uv:
uv run server.py
To use this server with an MCP client (e.g., Claude Desktop, Cursor), add it to your MCP client configuration. Example for Cursor:
{ "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" } } } }
/path/to/cloned/yugabytedb-mcp-server/
with the path to your cloned repository.env
section.mcpServers
.The logs for Claude Desktop can be found in the following locations:
The logs can be used to diagnose connection issues or other problems with your MCP server configuration. For more details, refer to the official documentation.
In the bottom panel of Cursor, click on "Output" and select "Cursor MCP" from the dropdown menu to view server logs. This can help diagnose connection issues or other problems with your MCP server configuration.
Once connected via an MCP client, you can:
YUGABYTEDB_URL
: (required) The connection string for your YugabyteDB/PostgreSQL databaseYUGABYTEDB_URL
is set and correctuv
is installed and available in your PATH. Note: If claude is unable to access uv, giving the error: spawn uv ENOENT
, try symlinking the uv for global access:sudo ln -s "$(which uv)" /usr/local/bin/uv
pyproject.toml
src/server.py