Bytebase
Lets AI assistants query and change databases through Bytebase's approvals and audit log
Bytebase is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, macOS
- Runs
- Locally
- What it can do
- Can delete data (1 tool)
- Version
- 0.1.0
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add bytebase-mcp --env BYTEBASE_URL='<BYTEBASE_URL>' -- npx -y @bytebase/bytebase-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"bytebase-mcp": {
"command": "npx",
"args": [
"-y",
"@bytebase/bytebase-mcp"
],
"env": {
"BYTEBASE_URL": "<BYTEBASE_URL>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"bytebase-mcp": {
"command": "npx",
"args": [
"-y",
"@bytebase/bytebase-mcp"
],
"env": {
"BYTEBASE_URL": "<BYTEBASE_URL>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"bytebase-mcp": {
"command": "npx",
"args": [
"-y",
"@bytebase/bytebase-mcp"
],
"env": {
"BYTEBASE_URL": "<BYTEBASE_URL>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"bytebase-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@bytebase/bytebase-mcp"
],
"env": {
"BYTEBASE_URL": "<BYTEBASE_URL>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add bytebase-mcp --env BYTEBASE_URL='<BYTEBASE_URL>' -- npx -y @bytebase/bytebase-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.bytebase-mcp]
command = "npx"
args = ["-y", "@bytebase/bytebase-mcp"]
env = { BYTEBASE_URL = "<BYTEBASE_URL>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"bytebase-mcp": {
"command": "npx",
"args": [
"-y",
"@bytebase/bytebase-mcp"
],
"env": {
"BYTEBASE_URL": "<BYTEBASE_URL>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Or run: gemini mcp add -s user -e BYTEBASE_URL='<BYTEBASE_URL>' bytebase-mcp npx -- -y @bytebase/bytebase-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "bytebase-mcp": { "command": "npx", "args": [ "-y", "@bytebase/bytebase-mcp" ], "env": { "BYTEBASE_URL": "<BYTEBASE_URL>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
BYTEBASE_URLExternal 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.RequiredBYTEBASE_MCP_HOMEDirectory for the OAuth sign-ins (default: ~/.bytebase-mcp)BYTEBASE_MCP_CALLBACK_PORTLoopback port that receives the OAuth redirect during sign-in (default: 51789)BYTEBASE_MCP_NO_BROWSERSet to 1 to print the sign-in URL instead of opening a browser
About Bytebase
Bytebase MCP connects an AI assistant to a running Bytebase instance, so schema reads, queries and proposed database changes go through the same projects, approval rules, masking and audit trail that a team already uses in the console. The npm package itself holds no Bytebase logic; after OAuth sign-in it lists the tools the instance serves and forwards each call to it, so what the assistant can do is limited by the workspace access policy and the signed-in account's permissions.
The assistant can run read-only queries, export results, propose schema or data changes that become plans and issues, and request time-boxed access grants for a single read statement. Mode settings set the ceiling: Read-only blocks any statement Bytebase cannot confirm as a read, while Read-write also allows changes. Sensitive actions such as masking exemptions and new approval rules wait for confirmation in the client before they are made.
It suits database administrators and engineering teams who want AI help with queries and migrations without giving up review and traceability. It needs a Bytebase Cloud or self-hosted instance with an external URL configured; query results are capped at 1,000 rows and requests at 4 MiB.
Tools this server provides (13)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 13 tools deletes data and 1 changes data; 7 names don't say.
From the server's own tool labels and tool names; not verified by us.
- 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_workflowName suggests: reads
- Return the workflow files that set up GitOps for a project.
- get_schemaName suggests: reads
- Inspect a Bytebase database's schema.
- grant_masking_exemption
- Exempt one member from data masking in a Bytebase project.
- propose_database_change
- Run DDL/DML changes against a Bytebase database as a proposed issue.
- query_databaseName suggests: reads
- 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 a time-boxed grant to run one read-only statement on one database.
- revoke_masking_exemptionName suggests: deletes
- Remove one member's masking exemption in a Bytebase project.
- search_apiName suggests: reads
- Discover Bytebase API endpoints.
- set_just_in_time_accessName suggests: changes
- Turn just-in-time access on or off for one Bytebase project.
What it does
- Governed query access
- Run read-only queries and schema inspection, with masked columns returned masked for the signed-in user.
- Proposed database changes
- Turn a requested change into a sheet, plan and issue that follow the project's approval flow.
- Just-in-time access grants
- Request a time-boxed grant to run one read statement, which starts only once approved.
- Access policy modes
- Admins choose Read-only or Read-write for the workspace, capping what the assistant may do.
- Confirmation before sensitive actions
- Masking exemptions, instance additions and rule changes are confirmed in the client first where supported.
- Audit logging
- MCP calls, including refused ones, are recorded in Bytebase's audit log and can be filtered.
Good for
- Let an assistant explore a production schema and answer data questions with masked results
- Draft a migration in chat and route it through the project's review and rollout process
- Request a one-off read grant for a specific statement without widening standing access
- Approve or reject pending database change issues from an AI client after confirmation
- Give an AI coding assistant safe, audited database access for a team
Pricing
Open source
Package is MIT licensed; Bytebase itself is licensed separately.
Prices change. Check docs.bytebase.com before you buy.
Bytebase FAQ
Does the npm package need a Bytebase instance?
Yes. It connects to a running Bytebase Cloud or self-hosted instance (version 3.22 or later) through its external URL and does nothing without one.
Which database engines are supported for changes?
The query tool runs INSERT, UPDATE, DELETE, CREATE, ALTER and DROP on MySQL, PostgreSQL, Oracle, SQL Server, TiDB, Snowflake, Spanner, BigQuery, MongoDB and Elasticsearch, within the user's permissions.
How is access to the instance authenticated?
The package signs in through Bytebase's own OAuth in the browser and never sees the user's password. The token is stored under ~/.bytebase-mcp with owner-only permissions.
What limits apply to query results?
Queries return 100 rows by default and 1,000 at most, with a 30-second timeout. Requests over 4 MiB are refused.
Which operating systems are supported by the package?
It is tested on macOS and Linux; Windows has not been tested yet.
Is Bytebase free?
Yes. Bytebase is open source, so you can use and self-host it for free.
How do I add Bytebase to Claude Code?
Run this command in your terminal: claude mcp add bytebase-mcp --env BYTEBASE_URL='<BYTEBASE_URL>' -- npx -y @bytebase/bytebase-mcp
What are the best alternatives to Bytebase?
The closest alternatives to Bytebase are Airtable MCP, Metabase Ai Assistant, Baserow, mcpbus and Db Planner.
Where this comes from
- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.