Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>DAB MCP (Data API builder)New to Visual Studio Code? Get it now.
DAB MCP (Data API builder)

DAB MCP (Data API builder)

Developer Experiences

|
1,540 installs
| (0) | Free
Install Data API Builder configurations as MCP servers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DAB MCP (Data API builder)

A Visual Studio Code extension that installs Data API Builder configurations as MCP (Model Context Protocol) servers.

DAB MCP extension screenshot

Features

  • Adds a right-click context menu for files named dab-config.json or staticwebapp.database.config.json.
  • Automatically generates server name from the folder name (e.g., "my-project" becomes "my-project-mcp").
  • Uses VS Code's MCP install protocol to handle installation automatically.
  • Sets the working directory to the selected configuration's directory.
  • References the adjacent .env file when present, without reading or copying credentials.
  • One-click installation - no manual editing required.

Usage

  1. Right-click on a dab-config.json file in the Explorer.
  2. Select "Install MCP Server" from the context menu.
  3. VS Code will automatically handle the MCP server installation.
  4. Complete installation in VS Code. When updating a server, use its existing name and installation scope.
  5. Run MCP: List Servers, select the server, and choose Restart Server (or Stop Server, then Start Server) to apply the updated registration. A VS Code restart is not normally required.

Requirements

  • Ensure that dab is installed: dotnet tool install microsoft.dataapibuilder -g.
  • GitHub Copilot Chat extension must be installed to use MCP servers.

MCP Server Configuration

For a selected configuration in sample/mcp, the installer generates a VS Code registration like this (Windows paths shown):

{
  "servers": {
    "mcp-mcp": {
      "type": "stdio",
      "command": "dab",
      "cwd": "${workspaceFolder}\\sample\\mcp",
      "envFile": "${workspaceFolder}\\sample\\mcp\\.env",
      "args": [
        "start",
        "--mcp-stdio",
        "role:anonymous",
        "--LogLevel",
        "none",
        "--config",
        "${workspaceFolder}\\sample\\mcp\\dab-config.json"
      ]
    }
  }
}

The server name is automatically generated from the folder name containing the config file. Spaces and special characters are converted to hyphens, and "-mcp" is appended.

Paths are derived from the selected file. Single-folder workspaces use ${workspaceFolder}; multi-root workspaces use ${workspaceFolder:Folder Name} for the containing folder. Files outside a workspace use absolute paths. Spaces remain part of individual arguments, not a shell command string.

cwd is always the configuration directory because DAB loads .env from the process working directory, not from --config. envFile is included only when .env exists beside the selected configuration. If absent, the extension explains that DAB must use the process environment; create the file and register again if needed. The extension does not create, read, overwrite, or log credential values. Keep .env out of source control.

The extension passes a single server definition to VS Code's native installer, leaving installation scope, confirmation, unrelated servers, and user settings under VS Code's control. It does not edit your DAB configuration or configure entity tools.

Format matters: VS Code .vscode/mcp.json uses servers and supports cwd and envFile. Portable Copilot configuration uses mcpServers and does not support envFile. Do not copy this example into that format unchanged. See the current MCP configuration reference.

Learn more about DAB's STDIO transport: https://learn.microsoft.com/en-us/azure/data-api-builder/mcp/stdio-transport

Troubleshooting and verification

Opening the installer is not proof of startup. After completing installation and restarting the server, verify MCP initialization, tool discovery, and an actual tool invocation with all required inputs.

For startup failures, use MCP: List Servers, select the affected server, and choose Show Output. Check that dab is installed and available to VS Code, the selected configuration is valid, and the adjacent .env is accessible and supplies the expected variables. If the file was removed, restore it or register again to omit envFile. Any nonzero exit code, including -1, indicates failure; successful tool discovery alone does not establish successful execution. Review output locally and redact credentials before sharing it.

With --LogLevel none, DAB can exit without detailed diagnostics. Temporarily change the registration to --LogLevel error and restart the server to investigate, then restore the intended logging level.

After updating an existing registration, verify that cwd, envFile (when present), and --config refer to the same selected directory in the same scope. Stop/start the server to avoid using a previous process. The extension does not diagnose stale registration, host forwarding, or handshake failures automatically.

Run npm test and npm run lint from this extension directory for registration regression checks; run npm run package for the production bundle.

Release Notes

1.0.5 - 2026-10-30

Fixed

  • Set the SQL MCP process working directory to the selected DAB configuration directory.
  • Include the adjacent .env path when present and qualify paths in multi-root workspaces.
  • Handle an unavailable installer and provide restart/startup troubleshooting guidance without exposing configuration or environment values.
  • Add registration regression tests for nested paths, spaces, updates, and missing environment files.

1.0.3 - 2026-03-14

Changed

  • Version bump for coordinated release

1.0.0 - 2026-03-13

Added

  • Initial release
  • Install MCP Server command for dab-config.json files
  • Automatic server name generation from folder name (e.g., "my-project" → "my-project-mcp")
  • Smart character cleaning (spaces and special characters converted to hyphens)
  • Uses VS Code's vscode:mcp/install protocol for seamless installation
  • Configures DAB with STDIO transport for MCP communication
  • Uses ${workspaceFolder} variable for portable configuration paths
  • Dynamic log level selection with VS Code input variable (${input:logLevel})
  • One-click installation with no manual configuration needed
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft