Bytebase
FreeMaintainedOfficial MCP server package for Bytebase: ships the built-in server's tool definitions and forwards calls to your Bytebase instance
About
Official MCP server package for Bytebase: ships the built-in server's tool definitions and forwards calls to your Bytebase instance
README
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.
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
localhostor 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
| Command | What it does |
|---|---|
bytebase-mcp |
Serve MCP over stdio (what your client runs) |
bytebase-mcp status |
Show the instance and the stored sign-ins, without signing in |
bytebase-mcp logout |
Revoke 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
| Variable | Default | Purpose |
|---|---|---|
BYTEBASE_URL |
– | External URL of the instance. Required to call tools. |
BYTEBASE_MCP_HOME |
~/.bytebase-mcp |
Where sign-ins live, one per instance and client app |
BYTEBASE_MCP_CALLBACK_PORT |
51789 |
Loopback port that receives the OAuth redirect |
BYTEBASE_MCP_NO_BROWSER |
unset | Set 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.
| Tool | Purpose |
|---|---|
administer_workspace |
Make a workspace administration change that the user confirms in this client first. |
call_api |
Execute a Bytebase API endpoint. |
decide_issue |
Approve or reject a Bytebase issue at its current approval step. |
get_gitops_workflow |
Return the workflow files that set up GitOps for a project. |
get_schema |
Inspect a Bytebase database's schema. |
grant_masking_exemption |
Exempt 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_change |
Run DDL/DML changes (ALTER TABLE, CREATE TABLE, INSERT, UPDATE, migrations) against a Bytebase database. |
query_database |
Execute a SQL query against a Bytebase database. |
reauthorize |
Log out the current MCP OAuth connection so the client can run OAuth again. |
request_access_grant |
Request an access grant: time-boxed permission to run one read-only statement on one Bytebase database, optionally with results unmasked or exported. |
revoke_masking_exemption |
Remove one member's masking exemption in a Bytebase project. |
search_api |
Discover Bytebase API endpoints. |
set_just_in_time_access |
Turn just-in-time access on or off for one Bytebase project. |
How it works
- With
BYTEBASE_URLset, the server answersinitializeat 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 withtools/list_changed. - It connects to
<BYTEBASE_URL>/mcpover 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. - Tool lists, tool calls, results and confirmation forms pass through unchanged, paging included.
- Without
BYTEBASE_URL, the server lists the bundled snapshot so MCP directories can show Bytebase's tools, and every tool call says to setBYTEBASE_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.
Installing Bytebase
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/bytebase/bytebase-mcpFAQ
Is Bytebase MCP free?
Yes, Bytebase MCP is free — one-click install via Unyly at no cost.
Does Bytebase need an API key?
Yes, it requires environment variables: BYTEBASE_URL. Unyly injects them into the config during install.
Is Bytebase hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Bytebase in Claude Desktop, Claude Code or Cursor?
Open Bytebase on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Changes
Versions and requested access over time.
- Requested access changed+ BYTEBASE_URL
Related MCPs
Postgres
Query your database in natural language
by Anthropicwenb1n-dev/SmartDB_MCP
Connect to multiple databases at once (MySQL, PostgreSQL, SQL Server, MariaDB, Dameng, Oracle) for operations, health analysis and SQL optimization.
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolRedis
Interact with Redis key-value stores.
by modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
by modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
by raw-labsjulien040/anyquery
Query apps with SQL from a single local-first binary; also connects to PostgreSQL, MySQL and SQLite-compatible databases.
by julien040drakonkat/wizzy-mcp-tmdb
Search and retrieve movie, TV show and person information from The Movie Database (TMDB) API.
by drakonkatlongevity-genie/opengenes-mcp
Query the OpenGenes database for aging and longevity research.
by longevity-genieCompare Bytebase with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
