Skip to content

Commit 22c090c

Browse files
docs: add mcp docs (#974)
* update mcp docs * update
1 parent 8dd2cb0 commit 22c090c

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed
20.5 KB
Loading

docs/docs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@
298298
"group": "Infrastructure as Code",
299299
"pages": ["integrations/terraform/overview"]
300300
},
301+
{
302+
"group": "AI Integration",
303+
"pages": [
304+
"integrations/mcp"
305+
]
306+
},
301307
{
302308
"group": "3rd Party",
303309
"pages": [

docs/integrations/mcp.mdx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Model Context Protocol (MCP)
3+
---
4+
5+
Connect AI assistants to Bytebase using the Model Context Protocol.
6+
7+
## Prerequisites
8+
9+
- [Configure external URL](/get-started/self-host/external-url) if you haven't already.
10+
11+
- OAuth authentication is required on first connection. Ensure you have appropriate Bytebase permissions.
12+
13+
## Setup
14+
15+
Navigate to **Integration** > **MCP** in your Bytebase console. Choose one of the following options:
16+
17+
### Option 1: JSON Configuration
18+
19+
Add this JSON to your MCP client configuration file:
20+
21+
```json
22+
{
23+
"mcpServers": {
24+
"bytebase": {
25+
"type": "http",
26+
"url": "{https://your-bytebase-url.com}/mcp"
27+
}
28+
}
29+
}
30+
```
31+
32+
### Option 2: CLI Commands
33+
34+
Alternatively, use the CLI command shown on the MCP integration page for your preferred tool (Claude Code, Codex, Copilot CLI, Gemini CLI, or VS Code).
35+
36+
## Authentication
37+
38+
To connect to Bytebase, you need to finish the authentication process via OAuth by logging into Bytebase and authorizing the AI to access your Bytebase account.
39+
40+
![mcp-auth](/content/docs/integrations/mcp/mcp-auth.webp)
41+
42+
Your tool will be connected to Bytebase once you click the Allow button.
43+
44+
## Usage
45+
46+
Once connected, try asking your AI assistant:
47+
48+
- "List all projects in my Bytebase instance"
49+
- "Show me the schema for database X"
50+
- "Generate a migration script to add a users table"
51+
52+
53+
## Important notes
54+
55+
<Warning>
56+
57+
Caution: Once connected, your AI assistant will inherit all your permissions in Bytebase, including making changes to database or updating settings (in the case of an admin). So be cautious when instructing AI assistant to apply any change via Bytebase.
58+
</Warning>
59+
60+
<Warning>
61+
62+
Audit logging: any action taken by the AI assistant via MCP will be audit-logged in Bytebase under your account.
63+
64+
</Warning>
65+

0 commit comments

Comments
 (0)