by ydb-platform
Provides a Model Context Protocol server that enables LLMs to execute queries, list directories, and retrieve metadata from YDB databases using natural‑language commands.
Ydb Mcp offers a server implementation of the Model Context Protocol (MCP) tailored for YDB. It bridges large language models and YDB instances, allowing AI‑driven database operations such as running SQL queries, exploring directory structures, and obtaining path details.
pip install ydb-mcp
(or use uvx
/ pipx
).python3 -m ydb_mcp --ydb-endpoint grpc://localhost:2136 --ydb-database /local
serverConfig
).ydb_query
, ydb_list_directory
, etc.) either directly through the MCP client or via LLM prompts that invoke these tools.ydb_query
– execute raw SQL.ydb_query_with_params
– run parameterised queries with JSON parameters.ydb_list_directory
– list contents of a YDB directory.ydb_describe_path
– fetch metadata of tables, directories, etc.ydb_status
– report current connection status.uvx
, pipx
, pip
).grpc://localhost:2136
).uvx ydb-mcp …
or pipx run ydb-mcp …
to execute it in an isolated environment.ARGS
environment variable when using make run-server
.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
.
{
"mcpServers": {
"ydb": {
"command": "uvx",
"args": [
"ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local"
]
}
}
}
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
.
{
"mcpServers": {
"ydb": {
"command": "pipx",
"args": [
"run", "ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local"
]
}
}
}
YDB MCP can be installed using pip
, Python's package installer. The package is available on PyPI and includes all necessary dependencies.
pip install ydb-mcp
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.
{
"mcpServers": {
"ydb": {
"command": "python3",
"args": [
"-m", "ydb_mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local"
]
}
}
}
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:
{
"mcpServers": {
"ydb": {
"command": "uvx",
"args": [
"ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local",
"--ydb-auth-mode", "login-password",
"--ydb-login", "<your-username>",
"--ydb-password", "<your-password>"
]
}
}
}
To use access token authentication, specify the --ydb-auth-mode
and --ydb-access-token
arguments:
{
"mcpServers": {
"ydb": {
"command": "uvx",
"args": [
"ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local",
"--ydb-auth-mode", "access-token",
"--ydb-access-token", "qwerty123"
]
}
}
}
To use service account authentication, specify the --ydb-auth-mode
and --ydb-sa-key-file
arguments:
{
"mcpServers": {
"ydb": {
"command": "uvx",
"args": [
"ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136",
"--ydb-database", "/local",
"--ydb-auth-mode", "service-account",
"--ydb-sa-key-file", "~/sa_key.json"
]
}
}
}
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_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
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:
make all
: Run clean, lint, and test in sequence (default target)make clean
: Remove all build artifacts and temporary filesmake test
: Run all tests using pytest
LOG_LEVEL
(default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)make unit-tests
: Run only unit tests with verbose output
LOG_LEVEL
(default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)make integration-tests
: Run only integration tests with verbose output
YDB_ENDPOINT
(default: grpc://localhost:2136)YDB_DATABASE
(default: /local)MCP_HOST
(default: 127.0.0.1)MCP_PORT
(default: 8989)LOG_LEVEL
(default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)make run-server
: Start the YDB MCP server
YDB_ENDPOINT
(default: grpc://localhost:2136)YDB_DATABASE
(default: /local)ARGS="your args"
make lint
: Run all linting checks (flake8, mypy, black, isort)make format
: Format code using black and isortmake install
: Install the package in development modemake dev
: Install the package in development mode with all development dependenciesBy 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:
# Run all tests with debug output
make test LOG_LEVEL=DEBUG
# Run integration tests with info output
make integration-tests LOG_LEVEL=INFO
# Run unit tests with warning output (default)
make unit-tests LOG_LEVEL=WARNING
Available log levels:
DEBUG
: Show all debug messages, useful for detailed test flowINFO
: Show informational messages and aboveWARNING
: Show only warnings and errors (default)ERROR
: Show only error messagesPlease log in to share your review and rating for this MCP.
{ "mcpServers": { "ydb": { "command": "python3", "args": [ "-m", "ydb_mcp", "--ydb-endpoint", "grpc://localhost:2136", "--ydb-database", "/local" ] } } }
Discover more MCP servers with similar functionality and use cases
by googleapis
Provides a configurable MCP server that abstracts connection pooling, authentication, observability, and tool management to accelerate development of database‑backed AI tools.
by bytebase
DBHub is a universal database gateway that implements the Model Context Protocol (MCP) server interface, enabling MCP-compatible clients to interact with various databases.
by neo4j-contrib
Provides Model Context Protocol servers for interacting with Neo4j databases, managing Aura instances, and handling personal knowledge graph memory through natural‑language interfaces.
by mongodb-js
Provides a Model Context Protocol server that connects to MongoDB databases and Atlas clusters, exposing a rich set of tools for querying, managing, and administering data and infrastructure.
by benborla
A Model Context Protocol (MCP) server that provides read-only access to MySQL databases, enabling Large Language Models (LLMs) to inspect database schemas and execute read-only queries.
by ClickHouse
Provides tools that let AI assistants run read‑only SQL queries against ClickHouse clusters or the embedded chDB engine, plus a health‑check endpoint for service monitoring.
by elastic
Provides direct, natural‑language access to Elasticsearch indices via the Model Context Protocol, allowing AI agents to query and explore data without writing DSL.
by motherduckdb
Provides an MCP server that enables SQL analytics on DuckDB and MotherDuck databases, allowing AI assistants and IDEs to execute queries via a unified interface.
by redis
Provides a natural language interface for agentic applications to manage and search data in Redis efficiently.