vscode.mdx•1.37 kB
---
title: "VS Code"
---
VS Code has native MCP support through GitHub Copilot.
Create `.vscode/mcp.json` in your project root:
```json .vscode/mcp.json
{
"servers": {
"dbhub": {
"type": "stdio",
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--dsn",
"postgres://user:password@localhost:5432/dbname"
]
}
}
}
```
## Using Input Variables
For sensitive data like passwords, use input variables:
```json .vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "db-dsn",
"description": "Database connection string",
"password": true
}
],
"servers": {
"dbhub": {
"type": "stdio",
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--dsn",
"${input:db-dsn}"
]
}
}
}
```
## Using Config File
For multi-database setups, use a config file:
```json .vscode/mcp.json
{
"servers": {
"dbhub": {
"type": "stdio",
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--config",
"${workspaceFolder}/dbhub.toml"
]
}
}
}
```
## References
- [VS Code MCP Documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)