YDB for VS Code

A Visual Studio Code extension for working with YDB databases.
Features
- Connection management — login/password, service account, anonymous, token, and metadata authentication
- Schema navigation — browse tables, column tables, topics, views, external data sources, and other objects
- YQL editor — syntax highlighting, autocompletion, and keyword suggestions
- Query execution — run YQL queries and visualize results as tables, JSON, or charts
- Explain — view query execution plans
- Session management — monitor and manage active sessions
- Permissions viewer — inspect ACL for database objects
- DDL generation — generate CREATE statements for any database object
- Database load monitoring — built-in dashboard for performance metrics
- MCP server — expose your YDB connections to AI assistants (Claude Code and others)
- YQL RAG — semantic and keyword search over YQL documentation for AI-assisted query writing
- SQL dialect converter — convert SQL dialects to YQL
Installation
From GitHub Releases
Download the latest .vsix file from the Releases page and install it:
code --install-extension ydb-vscode-plugin-0.1.0.vsix
Or via the VS Code UI:
- Open VS Code
- Go to the Extensions panel (
Ctrl+Shift+X / Cmd+Shift+X)
- Click
... (three dots) in the top-right corner
- Select Install from VSIX...
- Choose the downloaded
.vsix file
After installation, reload VS Code to activate the extension.
Getting Started
- After installation, click the YDB icon in the Activity Bar on the left
- Click Add Connection to create a new connection
- Fill in the connection parameters: endpoint, database path, and authentication method
- Once connected, the Navigator panel shows your database schema
- Open the Query Workspace with
Cmd+Shift+Q / Ctrl+Shift+Q
- Write YQL queries and run them with
Cmd+Enter / Ctrl+Enter
Updating
Download the new .vsix from the Releases page and re-run the install command. VS Code will replace the previous version automatically.
MCP Integration (AI Assistants)
The extension runs a built-in MCP (Model Context Protocol) server, which allows AI assistants such as Claude Code to query your YDB databases directly.
Port configuration
The server runs on port 3333 (localhost only) by default. Change it in VS Code settings:
{
"ydb.mcpPort": 3333
}
If the port is already in use, the extension will show a warning and continue without MCP.
Connecting Claude Code
Make sure the YDB extension is running in VS Code and at least one connection is added in the Connections panel.
Register the MCP server in Claude Code:
claude mcp add --transport sse ydb http://localhost:3333/sse
- Verify the connection:
claude mcp list
| Tool |
Parameters |
Description |
ydb_list_connections |
— |
List all connections configured in the plugin |
ydb_query |
connection, sql |
Execute a YQL query |
ydb_describe_table |
connection, path |
Get table schema (columns, primary key) |
ydb_list_directory |
connection, path? |
List directory contents |
ydb_list_all |
connection, path?, limit?, offset? |
Recursively list all objects |
ydb_yql_help |
query, connection? |
Search YQL documentation (requires RAG to be enabled) |
The connection parameter is the connection name as shown in the Connections panel. System objects (names starting with .) are excluded from results.
YQL Documentation Search (RAG)
The extension can download a YQL documentation index and use it for AI-assisted query writing. When RAG is active, the ydb_yql_help MCP tool lets Claude Code look up the correct YQL syntax during a conversation.
Enabling RAG
- Open connection settings (click the pencil icon next to a connection in the Connections panel).
- Check Use RAG — the plugin will automatically detect the YDB server version, find the matching documentation index in the cloud, and download it.
- Status is shown next to the checkbox: ● Running — RAG is active, ○ Not running — disabled or index not loaded.
If something goes wrong, use the Detect & Download RAG button (auto-detects version) or Download RAG (force re-download).
Semantic Search via Ollama (optional)
By default RAG uses keyword search, which works without any additional dependencies.
For semantic (vector) search, you need Ollama with an embedding model:
# Install Ollama from https://ollama.com/
ollama pull nomic-embed-text
Then set the URL in VS Code settings:
{
"ydb.ragOllamaUrl": "http://localhost:11434",
"ydb.ragOllamaModel": "nomic-embed-text"
}
The Ollama status is shown directly in the connection settings form, with a Check button to verify availability. If Ollama is unavailable, the search automatically falls back to keyword mode.
How RAG Works in Claude Code
Once RAG is enabled, Claude Code automatically calls ydb_yql_help before writing YQL queries. You can also ask for help directly:
Show me the syntax for WINDOW functions in YQL
How do I write an UPSERT in YDB?
Every response from the tool indicates which search method was used:
[Search method: Ollama vector search (nomic-embed-text)] — semantic search
[Search method: keyword search] — keyword search
Connection Switching
When you switch between connections, RAG is automatically unloaded from memory and re-enabled only for connections that have Use RAG checked.
Usage with dbt
Claude Code connected via MCP can automatically explore the database schema when working on dbt projects. A typical workflow:
- AI calls
ydb_list_connections to discover available connections
- Calls
ydb_list_all(connection="prod") to get the full list of tables
- Calls
ydb_describe_table for specific tables as needed
- Generates or validates dbt models and tests
Development
npm install # Install dependencies
npm run compile # Compile TypeScript
npm test # Run tests
Press F5 in VS Code to launch an Extension Development Host for debugging.
See CONTRIBUTING.md for details on setting up a development environment and submitting pull requests.
License
Apache 2.0 — Copyright 2024 Yandex LLC