YugabyteDB

YugabyteDB

MCP Server to interact with your YugabyteDB database

8
Stars
5
Forks
0
Releases

Overview

YugabyteDB MCP Server is an MCP server implementation for YugabyteDB that enables language models (LLMs) to interact directly with the database using the MCP protocol. It supports listing all tables in the database with schema details and row counts, and it can execute read-only SQL queries with results returned in JSON, making data exploration and retrieval seamless for MCP clients. The server is designed for use with FastMCP and is compatible with popular MCP clients such as Claude Desktop, Cursor, and Windsurf Editor. It offers multiple transports, including STDIO via uv and Streamable-HTTP for HTTP-based MCP communications, and can be deployed via Docker. Configuration is environment-driven using YUGABYTEDB_URL to provide the YugabyteDB/PostgreSQL connection string. The repository provides example commands for running locally, Docker deployment instructions, and client configuration snippets for various editors. Tools exposed by the server include summarize_database and run_read_only_query, which implement core actions for table discovery and read-only querying. This setup enables secure, read-only access to YugabyteDB for AI-assisted data querying, exploration, and integration into ML workflows.

Details

Owner
yugabyte
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

Database table listing with schema and row counts

Lists all tables in the YugabyteDB database, including schema details and row counts.

Read-only SQL query execution

Runs read-only SQL queries and returns results as JSON.

FastMCP compatibility

Designed for use with FastMCP and compatible with MCP clients like Claude Desktop, Cursor, and Windsurf Editor.

STDIO transport support

Run the server with STDIO transport using uv (e.g., uv run src/server.py).

Streamable-HTTP transport support

Run the server with Streamable-HTTP transport for HTTP-based MCP communications.

Docker deployment

Docker-based deployment with sample run commands for both STDIO and HTTP transports.

Environment-driven configuration

Configured via the YUGABYTEDB_URL environment variable; includes example .env usage.

Audience

MCP clientsConnect with Claude Desktop, Cursor, Windsurf to access YugabyteDB via MCP.
LLM developersIntegrate the server into LLM workflows to run queries and receive JSON results.
Data teamsExplore YugabyteDB schemas and tables via natural language interfaces for rapid data discovery.

Tags

YugabyteDBMCPSQLread-onlyJSONtable listingFastMCPClaude DesktopCursorWindsurf EditorDockerTransport