YDB MCP
Model Context Protocol server for YDB databases that enables AI-powered database operations and natural language interactions with YDB instances from any LLM that supports MCP.
README
YDB MCP
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.
Usage
Via pip
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.
Example: Using Anonymous Authentication
{
"mcpServers": {
"ydb": {
"command": "python3",
"args": [
"-m", "ydb_mcp",
"--ydb-endpoint", "grpc://localhost:2136/local"
]
}
}
}
Example: Using Login/Password Authentication
To use login/password authentication, specify the --ydb-auth-mode, --ydb-login, and --ydb-password arguments:
{
"mcpServers": {
"ydb": {
"command": "python3",
"args": [
"-m", "ydb_mcp",
"--ydb-endpoint", "grpc://localhost:2136/local",
"--ydb-auth-mode", "login-password",
"--ydb-login", "<your-username>",
"--ydb-password", "<your-password>"
]
}
}
}
Via pipx
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.
Example: Using Anonymous Authentication
{
"mcpServers": {
"ydb": {
"command": "pipx",
"args": [
"run", "ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136/local"
]
}
}
}
Example: Using Login/Password Authentication
To use login/password authentication, specify the --ydb-auth-mode, --ydb-login, and --ydb-password arguments:
{
"mcpServers": {
"ydb": {
"command": "pipx",
"args": [
"run", "ydb-mcp",
"--ydb-endpoint", "grpc://localhost:2136/local",
"--ydb-auth-mode", "login-password",
"--ydb-login", "<your-username>",
"--ydb-password", "<your-password>"
]
}
}
}
Available Tools
YDB MCP provides the following tools for interacting with YDB databases:
-
ydb_query: Run a SQL query against a YDB database- Parameters:
sql: SQL query string to execute
- Parameters:
-
ydb_query_with_params: Run a parameterized SQL query with JSON parameters- Parameters:
sql: SQL query string with parameter placeholdersparams: JSON string containing parameter values
- Parameters:
-
ydb_list_directory: List directory contents in YDB- Parameters:
path: YDB directory path to list
- Parameters:
-
ydb_describe_path: Get detailed information about a YDB path (table, directory, etc.)- Parameters:
path: YDB path to describe
- Parameters:
-
ydb_status: Get the current status of the YDB connection
Development
The project uses Make as its primary development tool, providing a consistent interface for common development tasks.
Available Make Commands
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- Can be configured with environment variables:
LOG_LEVEL(default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)
- Can be configured with environment variables:
make unit-tests: Run only unit tests with verbose output- Can be configured with environment variables:
LOG_LEVEL(default: WARNING) - Control test output verbosity (DEBUG, INFO, WARNING, ERROR)
- Can be configured with environment variables:
make integration-tests: Run only integration tests with verbose output- Can be configured with environment variables:
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)
- Can be configured with environment variables:
make run-server: Start the YDB MCP server- Can be configured with environment variables:
YDB_ENDPOINT(default: grpc://localhost:2136)YDB_DATABASE(default: /local)
- Additional arguments can be passed using
ARGS="your args"
- Can be configured with environment variables:
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 dependencies
Test Verbosity Control
By 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 messages
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。