cursor.mdx•1.93 kB
---
title: "Cursor"
---
<img src="/images/cursor.webp" alt="Cursor with DBHub" />
## One-Click Install
Click the link below to install DBHub in Cursor:
<a href="cursor://anysphere.cursor-deeplink/mcp/install?name=dbhub&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAYnl0ZWJhc2UvZGJodWIiLCItLXRyYW5zcG9ydCIsInN0ZGlvIiwiLS1kc24iLCJwb3N0Z3JlczovL3VzZXI6cGFzc3dvcmRAbG9jYWxob3N0OjU0MzIvZGJuYW1lIl19">
<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install DBHub MCP server in Cursor" height="32" />
</a>
After installing, edit the DSN in your Cursor MCP settings to point to your database.
## Manual Configuration
<Tabs>
<Tab title="MacOS/Linux">
Edit `~/.cursor/mcp.json`:
```json ~/.cursor/mcp.json
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--dsn",
"postgres://user:password@localhost:5432/dbname"
]
}
}
}
```
</Tab>
<Tab title="Windows">
Edit `%USERPROFILE%\.cursor\mcp.json`:
```json %USERPROFILE%\.cursor\mcp.json
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--dsn",
"postgres://user:password@localhost:5432/dbname"
]
}
}
}
```
</Tab>
</Tabs>
## Project-Specific Configuration
For project-specific database connections, create `.cursor/mcp.json` in your project root:
```json .cursor/mcp.json
{
"mcpServers": {
"project-db": {
"command": "npx",
"args": [
"@bytebase/dbhub",
"--transport",
"stdio",
"--config",
"${workspaceFolder}/dbhub.toml"
]
}
}
}
```
## References
- [Cursor MCP Documentation](https://cursor.com/docs/context/mcp)