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 u
Add this skill
npx mdskills install ydb-platform/ydb-mcpComprehensive MCP server with clear setup, multiple auth options, and useful database tools
1# YDB MCP2---3[](https://github.com/ydb-platform/ydb-mcp/blob/main/LICENSE)4[](https://badge.fury.io/py/ydb-mcp)56[Model Context Protocol server](https://modelcontextprotocol.io/) for [YDB](https://ydb.tech). It allows to work with YDB databases from any [LLM](https://en.wikipedia.org/wiki/Large_language_model) that supports MCP. This integration enables AI-powered database operations and natural language interactions with your YDB instances.78<a href="https://glama.ai/mcp/servers/@ydb-platform/ydb-mcp">9 <img width="380" height="200" src="https://glama.ai/mcp/servers/@ydb-platform/ydb-mcp/badge" alt="YDB MCP server" />10</a>1112## Usage1314### Via uvx1516[uvx](https://docs.astral.sh/uv/concepts/tools/), 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`.1718#### Example: Using Anonymous Authentication1920```json21{22 "mcpServers": {23 "ydb": {24 "command": "uvx",25 "args": [26 "ydb-mcp",27 "--ydb-endpoint", "grpc://localhost:2136",28 "--ydb-database", "/local"29 ]30 }31 }32}33```3435### Via pipx3637[pipx](https://pipx.pypa.io/stable/) allows you to run various applications from PyPI without explicitly installing each one. However, it must be [installed](https://pipx.pypa.io/stable/#install-pipx) first. Below are examples of how to configure YDB MCP using `pipx`.3839#### Example: Using Anonymous Authentication4041```json42{43 "mcpServers": {44 "ydb": {45 "command": "pipx",46 "args": [47 "run", "ydb-mcp",48 "--ydb-endpoint", "grpc://localhost:2136",49 "--ydb-database", "/local"50 ]51 }52 }53}54```5556### Via pip5758YDB MCP can be installed using `pip`, [Python's package installer](https://pypi.org/project/pip/). The package is [available on PyPI](https://pypi.org/project/ydb-mcp/) and includes all necessary dependencies.5960```bash61pip install ydb-mcp62```6364To 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.6566#### Example: Using Anonymous Authentication6768```json69{70 "mcpServers": {71 "ydb": {72 "command": "python3",73 "args": [74 "-m", "ydb_mcp",75 "--ydb-endpoint", "grpc://localhost:2136",76 "--ydb-database", "/local"77 ]78 }79 }80}81```8283### Authentication8485Regardless of the usage method (`uvx`, `pipx` or `pip`), you can configure authentication for your YDB installation. To do this, pass special command line arguments.8687#### Using Login/Password Authentication8889To use login/password authentication, specify the `--ydb-auth-mode`, `--ydb-login`, and `--ydb-password` arguments:9091```json92{93 "mcpServers": {94 "ydb": {95 "command": "uvx",96 "args": [97 "ydb-mcp",98 "--ydb-endpoint", "grpc://localhost:2136",99 "--ydb-database", "/local",100 "--ydb-auth-mode", "login-password",101 "--ydb-login", "<your-username>",102 "--ydb-password", "<your-password>"103 ]104 }105 }106}107```108109#### Using Access Token Authentication110111To use access token authentication, specify the `--ydb-auth-mode` and `--ydb-access-token` arguments:112113```json114{115 "mcpServers": {116 "ydb": {117 "command": "uvx",118 "args": [119 "ydb-mcp",120 "--ydb-endpoint", "grpc://localhost:2136",121 "--ydb-database", "/local",122 "--ydb-auth-mode", "access-token",123 "--ydb-access-token", "qwerty123"124 ]125 }126 }127}128```129130#### Using Service Account Authentication131132To use service account authentication, specify the `--ydb-auth-mode` and `--ydb-sa-key-file` arguments:133134```json135{136 "mcpServers": {137 "ydb": {138 "command": "uvx",139 "args": [140 "ydb-mcp",141 "--ydb-endpoint", "grpc://localhost:2136",142 "--ydb-database", "/local",143 "--ydb-auth-mode", "service-account",144 "--ydb-sa-key-file", "~/sa_key.json"145 ]146 }147 }148}149```150151## Available Tools152153YDB MCP provides the following tools for interacting with YDB databases:154155- `ydb_query`: Run a SQL query against a YDB database156 - Parameters:157 - `sql`: SQL query string to execute158159- `ydb_query_with_params`: Run a parameterized SQL query with JSON parameters160 - Parameters:161 - `sql`: SQL query string with parameter placeholders162 - `params`: JSON string containing parameter values163164- `ydb_list_directory`: List directory contents in YDB165 - Parameters:166 - `path`: YDB directory path to list167168- `ydb_describe_path`: Get detailed information about a YDB path (table, directory, etc.)169 - Parameters:170 - `path`: YDB path to describe171172- `ydb_status`: Get the current status of the YDB connection173174## Development175176The project uses [Make](https://www.gnu.org/software/make/) as its primary development tool, providing a consistent interface for common development tasks.177178### Available Make Commands179180The project includes a comprehensive Makefile with various commands for development tasks. Each command is designed to streamline the development workflow and ensure code quality:181182- `make all`: Run clean, lint, and test in sequence (default target)183- `make clean`: Remove all build artifacts and temporary files184- `make test`: Run all tests using pytest185 - Can be configured with environment variables:186 - `LOG_LEVEL` (default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)187- `make unit-tests`: Run only unit tests with verbose output188 - Can be configured with environment variables:189 - `LOG_LEVEL` (default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)190- `make integration-tests`: Run only integration tests with verbose output191 - Can be configured with environment variables:192 - `YDB_ENDPOINT` (default: grpc://localhost:2136)193 - `YDB_DATABASE` (default: /local)194 - `MCP_HOST` (default: 127.0.0.1)195 - `MCP_PORT` (default: 8989)196 - `LOG_LEVEL` (default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)197- `make run-server`: Start the YDB MCP server198 - Can be configured with environment variables:199 - `YDB_ENDPOINT` (default: grpc://localhost:2136)200 - `YDB_DATABASE` (default: /local)201 - Additional arguments can be passed using `ARGS="your args"`202- `make lint`: Run all linting checks (flake8, mypy, black, isort)203- `make format`: Format code using black and isort204- `make install`: Install the package in development mode205- `make dev`: Install the package in development mode with all development dependencies206207### Test Verbosity Control208209By default, tests run with minimal output (WARNING level) to keep the output clean. You can control the verbosity of test output using the `LOG_LEVEL` environment variable:210211```bash212# Run all tests with debug output213make test LOG_LEVEL=DEBUG214215# Run integration tests with info output216make integration-tests LOG_LEVEL=INFO217218# Run unit tests with warning output (default)219make unit-tests LOG_LEVEL=WARNING220```221222Available log levels:223- `DEBUG`: Show all debug messages, useful for detailed test flow224- `INFO`: Show informational messages and above225- `WARNING`: Show only warnings and errors (default)226- `ERROR`: Show only error messages
Full transparency — inspect the skill content before installing.