|
<< Click to Display Table of Contents >> Navigation: Tools > AI Assistant > Using Database Workbench as an MCP Server |
Database Workbench can be used as an MCP Server with your desktop AI client applications. This means that it exposes functionality to your AI client via it's tools.
This allows your AI client to connect to databases, view the meta data and generate SQL as per your database schema.
Note:
•You need to have Database Workbench running before you can connect to it from your AI client.
•The MCP server functionality is experimental and may change between releases.
•Only the first instance of Database Workbench can act like an MCP server because of port binding.

In order to use Database Workbench as an MCP server, you need to turn it ON and enter a port, default is 3000. Make sure your firewall allows this. This is a http-based MCP server, you start it yourself before starting your AI client.
Next, you need to tell your AI client that it can connect to it. This differs per client, but includes the port from the preferences, to modify accordingly.
•open the file " claude_desktop_config.json ", this can be found in folder %APPDATA%\Claude\ or %LOCALAPPDATA%\Packages\Claude_<random-id>\LocalCache\Roaming\Claude\ •if there's no entry for "mcpServers", add it, if there is, add an entry for Database Workbench like this: "Database Workbench": { "command": "npx", "args": [ "mcp-remote", "http://localhost:3000/mcp", "--allow-http" ] } } •Start or restart Claude Desktop |
•execute command to add this MCP server: |
•if you want it for a specific project only, open or create a file " .mcp.json " in the project folder and add: "mcpServers": { "database-workbench": { "type": "http", "url": "http://localhost:3000/mcp" } } } |
•execute command to add this MCP server, use additional " --scope user " for all projects, leave out to add to the current project |
•or open file " %USERPROFILE%\.gemini\settings.json " or file " .gemini/settings.json " in a project folder and add "mcpServers": { "database-workbench": { "httpUrl": "http://localhost:3000/mcp" } } } |
•open file " %USERPROFILE%\.config\opencode\opencode.json " or " opencode.json " in the project root and add the "mcp" item: "$schema": "https://opencode.ai/config.json", "mcp": { "database-workbench": { "type": "remote", "url": "http://localhost:3000/mcp", "enabled": true } } } |