Back to Browse

Bytebase MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Query, inspect, and change databases through Bytebase's governed workflow with audit logging.

About

Query, inspect, and change databases through Bytebase's governed workflow with audit logging.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (4 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

6 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

What You'll Need

Set these up before or after installing:

External URL of your Bytebase instance (e.g. https://bytebase.example.com). The package connects to <BYTEBASE_URL>/mcp and signs you in with the instance's OAuth.Optional

Environment variable: BYTEBASE_URL

Directory for the OAuth sign-ins (default: ~/.bytebase-mcp)Optional

Environment variable: BYTEBASE_MCP_HOME

Loopback port that receives the OAuth redirect during sign-in (default: 51789)Optional

Environment variable: BYTEBASE_MCP_CALLBACK_PORT

Set to 1 to print the sign-in URL instead of opening a browserOptional

Environment variable: BYTEBASE_MCP_NO_BROWSER

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "bytebase-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/bytebase-mcp@0.1.1"
      ],
      "env": {
        "BYTEBASE_URL": "your-bytebase-url-here",
        "BYTEBASE_MCP_HOME": "your-bytebase-mcp-home-here",
        "BYTEBASE_MCP_NO_BROWSER": "your-bytebase-mcp-no-browser-here",
        "BYTEBASE_MCP_CALLBACK_PORT": "your-bytebase-mcp-callback-port-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Bytebase MCP

npm Bytebase MCP server

Let AI assistants work with your databases under the same review, access control and audit as your team.

Docs · npm · Bytebase · Install Bytebase

[!NOTE] Bytebase MCP needs a running Bytebase instance, either Bytebase Cloud or self-hosted. It does nothing without one. If you want a standalone database MCP server that connects straight to a database, see DBHub.

The official npm package for the MCP server built into Bytebase, the open-source database governance platform. AI assistants query data, inspect schemas and propose database changes through your Bytebase instance, under its approvals, access control, data masking and audit logging.

Two ways into the MCP server built into Bytebase: a client connects straight to it or runs this package locally, and Bytebase applies approval, access control, masking and audit in front of your databases

The package contains no Bytebase logic. Once you sign in, it lists your instance's own tools and forwards every call to the instance, where permissions, the workspace MCP access policy, approvals and audit apply exactly as in the console. Nothing is stored locally except the OAuth token.

When to use this package

Bytebase serves MCP over HTTP at <your Bytebase URL>/mcp, and a client that can connect to it directly needs nothing installed. See the MCP integration docs. This package is for the other cases:

  • Your client only starts MCP servers as local commands.
  • Your client connects from the cloud and your instance is private. Claude Desktop and claude.ai reach remote servers from Anthropic's cloud, so they cannot reach an instance on localhost or behind a VPN.
  • You are installing from an MCP directory.

What you can do

  • Query and explore: read schemas and run queries. Columns your project masks come back masked.
  • Change databases: propose a change in the chat. It becomes a plan and an issue under the project's approval policy.
  • Get just-in-time access: request a time-boxed grant to run one read statement. It starts once approved and ends on its own.
  • Review and administer: approve issues, manage masking exemptions and rules, set approval rules. You confirm each one in your client first.

An admin sets the ceiling for the workspace, Read-only or Read-write, and the assistant can do only what your own account can. Everything it does is recorded in Bytebase's audit log.

These are examples, not the full list. The tools your instance serves are under Tools.

Requirements

  • A running Bytebase instance, 3.22 or later, on Bytebase Cloud or self-hosted. No instance yet? See self-host or cloud to start one. The instance needs its external URL configured and the workspace MCP access policy not set to Disabled.
  • Node.js 20 or later, on macOS or Linux. Windows has not been tested yet. If your browser does not open at sign-in there, find the sign-in URL in the server's output (your client's MCP log) and open it yourself.
  • A Bytebase account. The package signs you in through Bytebase's own OAuth; it never sees your password.

Setup

Add the server to your MCP client with your instance's external URL:

{
  "mcpServers": {
    "bytebase": {
      "command": "npx",
      "args": ["-y", "@bytebase/bytebase-mcp"],
      "env": {
        "BYTEBASE_URL": "https://bytebase.example.com"
      }
    }
  }
}

When the server first starts, it opens your browser on Bytebase's authorization page. Sign in, review what the session may do, and click Allow. Bytebase shows your AI client by name there, and each client application signs in once per instance. The token is stored under ~/.bytebase-mcp/ with owner-only permissions and refreshed automatically; several sessions share it safely. Set BYTEBASE_MCP_NO_BROWSER=1 to print the sign-in URL instead of opening a browser.

Commands

CommandWhat it does
bytebase-mcpServe MCP over stdio (what your client runs)
bytebase-mcp statusShow the instance and the stored sign-ins, without signing in
bytebase-mcp logoutRevoke and forget every sign-in stored for the instance (does not sign you out of the console). To switch accounts: log out, reconnect the server in your client, sign in as the other account

Every command takes --url <bytebase-url> in place of BYTEBASE_URL.

Environment variables

VariableDefaultPurpose
BYTEBASE_URL–External URL of the instance. Required to call tools.
BYTEBASE_MCP_HOME~/.bytebase-mcpWhere sign-ins live, one per instance and client app
BYTEBASE_MCP_CALLBACK_PORT51789Loopback port that receives the OAuth redirect
BYTEBASE_MCP_NO_BROWSERunsetSet to 1 to print the sign-in URL instead of opening a browser

Tools

Once you sign in, the tools are the ones your instance serves, so an older or newer Bytebase shows its own. The table below is the bundled snapshot. MCP directories show it when no instance is configured, and your client shows it until you sign in:

Generated from Bytebase 3.25.0.

ToolPurpose
administer_workspaceMake a workspace administration change that the user confirms in this client first.
call_apiExecute a Bytebase API endpoint.
decide_issueApprove or reject a Bytebase issue at its current approval step.
get_gitops_workflowReturn the workflow files that set up GitOps for a project.
get_schemaInspect a Bytebase database's schema.
grant_masking_exemptionExempt one member from data masking in a Bytebase project, for one database (optionally one schema, table, or columns of one table) or for every database in the project.
propose_database_changeRun DDL/DML changes (ALTER TABLE, CREATE TABLE, INSERT, UPDATE, migrations) against a Bytebase database.
query_databaseExecute a SQL query against a Bytebase database.
reauthorizeLog out the current MCP OAuth connection so the client can run OAuth again.
request_access_grantRequest an access grant: time-boxed permission to run one read-only statement on one Bytebase database, optionally with results unmasked or exported.
revoke_masking_exemptionRemove one member's masking exemption in a Bytebase project.
search_apiDiscover Bytebase API endpoints.
set_just_in_time_accessTurn just-in-time access on or off for one Bytebase project.

How it works

  1. With BYTEBASE_URL set, the server answers initialize at once. If you have signed in before, it opens a session first and passes on your instance's own instructions and tools. Otherwise it lists the bundled snapshot and starts the browser sign-in. A tool call made before then waits for the sign-in, or starts one. Once you have signed in, it announces your instance's own tools with tools/list_changed.
  2. It connects to <BYTEBASE_URL>/mcp over Streamable HTTP. With no valid token it runs the OAuth authorization-code flow with PKCE: discovery through /.well-known/oauth-protected-resource/mcp, dynamic client registration, browser sign-in, loopback redirect.
  3. Tool lists, tool calls, results and confirmation forms pass through unchanged, paging included.
  4. Without BYTEBASE_URL, the server lists the bundled snapshot so MCP directories can show Bytebase's tools, and every tool call says to set BYTEBASE_URL. A configured server lists the snapshot only until your session opens.

The design, with every state the server can be in, is in docs/DESIGN.md.

Development

Building, testing (against a local Bytebase and in a real client), keeping the tool snapshot current and releasing are covered in CONTRIBUTING.md. The design is in docs/DESIGN.md.

License

MIT. Bytebase itself is licensed separately; see bytebase/bytebase.

Reviews

No reviews yet

Be the first to review this server!