DO

Dolt MCP Server for Versioned SQL Access

Enable AI assistants to access and manage version-controlled Dolt SQL databases via an MCP server for database operations and version control.

Quick Install
npx -y @dolthub/dolt-mcp

Overview

The Dolt MCP Server implements a Model Context Protocol (MCP) bridge that gives AI assistants direct, programmatic access to Dolt’s versioned SQL databases. By exposing Dolt operations as MCP “tools”, the server lets an assistant list schemas, run queries, mutate rows, and perform version-control actions (commits, branches, merges, diffs) without manual CLI steps.

This is useful when you want conversational agents or automation tools to inspect and modify a Dolt repository as part of data exploration, automated migrations, QA, or developer workflows. The server supports both stdio and HTTP transports so it can be run locally for tight integrations or in a container for networked services.

Repository: https://github.com/dolthub/dolt-mcp

Features

  • Expose Dolt SQL/database operations to MCP-capable assistants
  • Full table lifecycle support: create, alter, describe, drop
  • Data operations: select, insert, update, delete
  • Version control tools: branches, commits, merges, diffs
  • Remote operations: clone, fetch, push, pull
  • Two transport modes: stdio (ideal for local assistant integrations) and HTTP (REST endpoint for web integrations)
  • Docker image and a Go-based binary for self-hosted deployments

Installation / Configuration

Prerequisites:

  • Go 1.24.4+ for building from source
  • A running Dolt SQL server (host and port)

Build from source:

git clone https://github.com/dolthub/dolt-mcp
cd dolt-mcp
go build -o dolt-mcp-server ./mcp/cmd/dolt-mcp-server

Docker (official image):

docker pull dolthub/dolt-mcp:latest

Run as an HTTP server (Docker):

docker run -d \
  --name dolt-mcp-server \
  -p 8080:8080 \
  -e MCP_MODE=http \
  -e DOLT_HOST=your-dolt-host \
  -e DOLT_USER=root \
  -e DOLT_DATABASE=your_database \
  -e DOLT_PASSWORD=your_password \
  dolthub/dolt-mcp:latest

Run as a stdio server (Docker):

docker run -it --rm \
  -e MCP_MODE=stdio \
  -e DOLT_HOST=your-dolt-host \
  -e DOLT_USER=root \
  -e DOLT_DATABASE=your_database \
  -e DOLT_PASSWORD=your_password \
  dolthub/dolt-mcp:latest

Native binary modes:

  • Stdio mode (recommended when embedding in a local assistant):
./dolt-mcp-server --stdio --dolt-host 0.0.0.0 --dolt-port 3306 --dolt-user root --dolt-database mydb
  • HTTP mode:
./dolt-mcp-server --http --mcp-port 8080 --dolt-host 0.0.0.0 --dolt-port 3306 --dolt-user root --dolt-database mydb

Important: HTTP clients must target the /mcp endpoint (for example, https://host:8080/mcp).

Environment variables (Docker / container-friendly):

VariableRequiredDescription
DOLT_HOSTyesDolt SQL server hostname
DOLT_USERyesDolt username
DOLT_DATABASEnoDefault database to connect to
DOLT_PASSWORDnoPassword for authentication
DOLT_PORTnoDolt port (default 3306)
MCP_MODEno“http” or “stdio” (default: stdio)
MCP_PORTnoHTTP port (default 8080 when using HTTP mode)

Available Tools / Resources

The server exposes a collection of MCP tools organized by capability. Examples:

  • Database management
    • list_databases
    • create_database
    • drop_database
    • select_version
  • Table operations
    • show_tables
    • show_create_table
    • describe_table
    • create_table
    • alter_table
    • drop_table
  • Data operations
    • select
    • insert_rows
    • update_rows
    • delete_rows
  • Version control
    • branch_list / branch_create / branch_delete
    • commit
    • merge
    • diff
  • Remote
    • clone
    • fetch
    • push
    • pull

Use the HTTP transport to call these tools via REST, or register the stdio process with an MCP-capable assistant (examples below).

Claude / MCP client example (stdio registration using a JSON config snippet):

{
  "mcpServers": {
    "dolt-mcp": {
      "command": "/path/to/dolt-mcp-server",
      "args": ["--stdio", "--dolt-host", "0.0.0.0", "--dolt-port", "3306", "--dolt-user", "root", "--dolt-database", "mydb"],
      "env": { "DOLT_PASSWORD": "your_password_if_needed" }
    }
  }
}

HTTP client example (note the /mcp suffix):

curl -H "Authorization: Bearer <token>" https://your-dolt-host:8080/mcp/tools/list_databases

Use Cases

  • Schema exploration and automated query generation
    • An assistant can list tables, describe columns, and suggest SELECT queries based on table metadata, then run those queries and present results to the user.
  • Data edits with version control
    • An assistant can create a branch, apply a set of INSERT/UPDATE operations, run tests or validations, and either merge the branch back or keep it for review—each change is a Dolt commit.
  • Automated migration and rollout
    • Use the MCP server in CI to let an automation bot apply schema migrations on a feature branch, produce diffs, and push changes to a remote repository when checks pass.
  • Remote sync and audit
    • Clone remote Dolt repos, fetch updates, and produce diffs that an assistant can summarize or include in a changelog.

Getting Started Tips

  • For local development and assistant embedding, prefer stdio mode—it’s simpler to wire up and avoids HTTP auth complexity.
  • For multi-user, web, or cloud deployments, use HTTP mode behind TLS and an authentication proxy.
  • Store credentials via environment variables or a secrets manager; avoid hardcoding passwords in configs or source control.

This server allows AI-driven workflows to interact with Dolt repositories programmatically while preserving Dolt’s versioned history and collaboration primitives.