YDB MCP server

Provides a bridge between AI and YDB databases, enabling natural language interactions for executing SQL queries, exploring schema information, and retrieving connection status.
Back to servers
Setup instructions
Provider
YDB
Release date
Apr 25, 2025
Language
Python
Package
Stats
3.1K downloads
22 stars

YDB MCP is a Model Context Protocol server that connects YDB databases with Large Language Models (LLMs). This integration enables AI-powered database operations and natural language interactions with your YDB instances through the Model Context Protocol.

Installation Options

Using pip

You can install YDB MCP directly using pip:

pip install ydb-mcp

Alternative Installation Methods

YDB MCP can also be run without permanent installation using tools like uvx or pipx.

Configuration and Usage

Basic Configuration

To use YDB MCP, you need to configure your MCP client to communicate with the YDB instance. Here's a basic configuration example using anonymous authentication:

{
  "mcpServers": {
    "ydb": {
      "command": "python3",
      "args": [
        "-m", "ydb_mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Using uvx

If you prefer using uvx (an alias for uv run tool):

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Using pipx

Alternatively, you can use pipx:

{
  "mcpServers": {
    "ydb": {
      "command": "pipx",
      "args": [
        "run", "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Authentication Methods

Login/Password Authentication

{
  "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>"
      ]
    }
  }
}

Access Token Authentication

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local",
        "--ydb-auth-mode", "access-token",
        "--ydb-access-token", "qwerty123"
      ]
    }
  }
}

Service Account Authentication

{
  "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"
      ]
    }
  }
}

Available Tools

YDB MCP provides several tools for database interaction:

ydb_query

Run a SQL query against a YDB database.

Parameters:

  • sql: SQL query string to execute

ydb_query_with_params

Run a parameterized SQL query with JSON parameters.

Parameters:

  • sql: SQL query string with parameter placeholders
  • params: JSON string containing parameter values

ydb_list_directory

List directory contents in YDB.

Parameters:

  • path: YDB directory path to list

ydb_describe_path

Get detailed information about a YDB path (table, directory, etc.).

Parameters:

  • path: YDB path to describe

ydb_status

Get the current status of the YDB connection.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "ydb" '{"command":"python3","args":["-m","ydb_mcp","--ydb-endpoint","grpc://localhost:2136/local"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "ydb": {
            "command": "python3",
            "args": [
                "-m",
                "ydb_mcp",
                "--ydb-endpoint",
                "grpc://localhost:2136/local"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "ydb": {
            "command": "python3",
            "args": [
                "-m",
                "ydb_mcp",
                "--ydb-endpoint",
                "grpc://localhost:2136/local"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later