File tree Expand file tree Collapse file tree 1 file changed +27
-12
lines changed
Expand file tree Collapse file tree 1 file changed +27
-12
lines changed Original file line number Diff line number Diff line change @@ -50,17 +50,7 @@ docker run --rm --init \
5050### NPM
5151
5252``` bash
53- # Install latest stable version globally
54- npm install -g @bytebase/dbhub
55-
56- # Or install development version
57- npm install -g @bytebase/dbhub@dev
58-
59- # Run from anywhere
60- dbhub --dsn=" postgres://user:password@localhost:5432/dbname"
61-
62- # Run via npx
63- npx @bytebase/dbhub --dsn=" postgres://user:password@localhost:5432/dbname"
53+ npx @bytebase/dbhub --transport sse --port 8080 --dsn " postgres://user:password@localhost:5432/dbname"
6454```
6555
6656## Usage
@@ -114,9 +104,12 @@ Database Source Name (DSN) is required to connect to your database. You can prov
114104
115105![ claude-desktop] ( https://raw.githubusercontent.com/bytebase/dbhub/main/assets/claude-desktop.webp )
116106
117- Add to ` claude_desktop_config.json `
107+ - Claude Desktop only supports ` stdio ` transport https://github.com/orgs/modelcontextprotocol/discussions/16
108+
109+ #### Docker
118110
119111``` json
112+ // claude_desktop_config.json
120113{
121114 "mcpServers" : {
122115 "dbhub" : {
@@ -129,13 +122,35 @@ Add to `claude_desktop_config.json`
129122 " --transport" ,
130123 " stdio" ,
131124 " --dsn" ,
125+ // Use host.docker.internal as the host if connecting to the local db
132126 " postgres://user:password@host.docker.internal:5432/dbname?sslmode=disable"
133127 ]
134128 }
135129 }
136130}
137131```
138132
133+ #### NPX
134+
135+ ``` json
136+ // claude_desktop_config.json
137+ {
138+ "mcpServers" : {
139+ "dbhub" : {
140+ "command" : " npx" ,
141+ "args" : [
142+ " -y" ,
143+ " @bytebase/dbhub" ,
144+ " --transport" ,
145+ " stdio" ,
146+ " --dsn" ,
147+ " postgres://user:password@localhost:5432/dbname?sslmode=disable"
148+ ]
149+ }
150+ }
151+ }
152+ ```
153+
139154## Development
140155
1411561 . Install dependencies:
You can’t perform that action at this time.
0 commit comments