MCP server enabling AI agents to interact with YDB databases via SQL queries and directory operations.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
The install command below didn't complete successfully in our automated test.
uvx ydb-mcp --ydb-endpoint grpc://localhost:2136 --ydb-database /localDownloading cryptography (4.5MiB) Downloading grpcio (6.8MiB) Downloading aiohttp (1.7MiB) Downloading pydantic-core (2.0MiB) Downloading ydb (1.4MiB) Downloaded pydantic-core Downloaded grpcio Downloaded aiohttp Downloaded cryptography Downloaded ydb Installed 40 packages in 28ms Traceback (most recent call last): File "/home/user/.cache/uv/archive-v0/KaiOrdrRCXNPRdsY/bin/ydb-mcp", line 6, in <module> from ydb_mcp.__main__ import main File "/home/user/.cache/uv/archive-v0/KaiOrdrRC
This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Ydb MCP.
ydb_queryRun a SQL query against a YDB database
sqlSQL query string to execute
ydb_query_with_paramsRun a parameterized SQL query with JSON parameters
paramsJSON string containing parameter values
ydb_explain_queryExplain a SQL query (returns the execution plan)
ydb_explain_query_with_paramsExplain a parameterized SQL query
Model Context Protocol server for YDB. It allows to work with YDB databases from any LLM that supports MCP. This integration enables AI-powered database operations and natural language interactions with your YDB instances.
uvx, which is an allias for uv run tool, allows you to run various python applications without explicitly installing them. Below are examples of how to configure YDB MCP using uvx.
pipx allows you to run various applications from PyPI without explicitly installing each one. However, it must be installed first. Below are examples of how to configure YDB MCP using pipx.
YDB MCP can be installed using pip, Python's package installer. The package is available on PyPI and includes all necessary dependencies.
To get started with YDB MCP, you'll need to configure your MCP client to communicate with the YDB instance. Below are example configuration files that you can customize according to your setup and then put into MCP client's settings. Path to the Python interpreter might also need to be adjusted to the correct virtual environment that has the ydb-mcp package installed.
Regardless of the usage method (uvx, pipx or pip), you can configure authentication for your YDB installation. To do this, pass special command line arguments.
To use login/password authentication, specify the --ydb-auth-mode, --ydb-login, and --ydb-password arguments:
To use access token authentication, specify the --ydb-auth-mode and --ydb-access-token arguments:
Service account authentication requires the yandexcloud package, which is not installed by default. Make sure it is available in the environment that runs YDB MCP:
--with yandexcloud (passed before ydb-mcp).pipx install ydb-mcp followed by pipx inject ydb-mcp yandexcloud.pip install ydb-mcp yandexcloud.To use service account authentication, specify the --ydb-auth-mode and --ydb-sa-key-file arguments:
Use a grpcs:// endpoint to connect over TLS. If the cluster certificate is issued by a private CA, pass a path to the PEM file with its root certificates via --ydb-root-certificates; otherwise the system trust store is used:
YDB MCP provides the following tools for interacting with YDB databases:
ydb_query: Run a SQL query against a YDB database
sql: SQL query string to executeydb_query_with_params: Run a parameterized SQL query with JSON parameters
sql: SQL query string with parameter placeholdersparams: JSON string containing parameter valuesydb_explain_query: Explain a SQL query (returns the execution plan)
sql: SQL query string to explainydb_explain_query_with_params: Explain a parameterized SQL query
sql: SQL query string with parameter placeholdersparams: JSON string containing parameter valuesydb_list_directory: List directory contents in YDB
path: YDB directory path to listydb_describe_path: Get detailed information about a YDB path (table, directory, etc.)
path: YDB path to describeydb_status: Get the current status of the YDB connection
YDBMCPServer is designed to be subclassed. You can add your own tools on top of an established YDB connection and, optionally, disable the built-in generic tools to expose only the queries your application needs.
Override or call these in your subclass:
| Method | Description |
|---|---|
await self.execute(sql, params=None) | Run a SQL query. Returns list[dict], each dict has "columns" and "rows". |
await self.explain(sql, params=None) | Return the query execution plan as a dict. |
await self.list_directory(path) | List a YDB directory. Returns dict with "path" and "items". |
await self.describe_path(path) | Describe a YDB path (table schema, directory, etc.). Returns a dict. |
The params argument is a plain dict. Keys without a $ prefix get it added automatically. To specify an explicit YDB type, use a (value, "TypeName") tuple — e.g. {"id": (42, "Int64")}.
Use the generic_tools class attribute to control which built-in tools are registered:
| Value | Effect |
|---|---|
set(YDBGenericTool) | All built-in tools (default) |
set() | No built-in tools — only your own |
{YDBGenericTool.QUERY, YDBGenericTool.STATUS} | Only the listed tools |
YDBGenericTool is a string enum — available values: QUERY, QUERY_WITH_PARAMS, EXPLAIN, EXPLAIN_WITH_PARAMS, STATUS, LIST_DIRECTORY, DESCRIBE_PATH.
Run it directly:
Or wire it up as an MCP server in your client config:
The project uses Make as its primary development tool, providing a consistent interface for common development tasks.
The project includes a comprehensive Makefile with various commands for development tasks. Each command is designed to streamline the development workflow and ensure code quality:
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ydb-ydb-mcp)<a href="https://allmcps.com/mcp/ydb-ydb-mcp"><img src="https://allmcps.com/api/badge/ydb-ydb-mcp?style=directory" alt="Ydb MCP on AllMCPs" /></a>