Announcing Dolt SQL Server MCP

FEATURE RELEASE
7 min read

In August, we announced the release of Dolt MCP, the official MCP server for Dolt databases. MCP servers provide a common interface for AI agents to connect to your database and perform reads or writes as needed. To enable this, Dolt MCP provides a suite of "tools" AI agents can call that enable them to inspect your database, perform queries or execute statements, and most importantly isolate their operations to branches, so that you never have to worry about their changes impacting production.

Now, we're excited to announce that we've integrated Dolt MCP directly into Dolt itself!

Available in Dolt v1.58.7 and onwards, the dolt sql-server command and its configuration file now provide the option to start a Dolt MCP HTTP server, at the same time the SQL server starts. This MCP server will be available on a separate port, defaulting to 7007, and will provide AI Agents access to the running SQL server, which uses port 3306 by default.

In today's blog, I'll show you how to get started using Dolt's built-in MCP server using both the command line interface (CLI) arguments and the configuration file.

Starting Dolt SQL Server MCP from the CLI

$ dolt sql-server --help
...

--mcp-port=<port>
If provided, runs a Dolt MCP HTTP server on this port alongside the sql-server.

--mcp-user=<user>
SQL user for MCP to connect as (required when --mcp-port is set).

--mcp-password=<password>
Optional SQL password for MCP to connect with (requires --mcp-user).

--mcp-database=<database>
Optional SQL database name MCP should connect to (requires --mcp-port and --mcp-user).

When starting a Dolt SQL server from the CLI, you can now supply the --mcp-* related flag arguments to additionally start a Dolt MCP HTTP server on a specified port, that will be connected to the started SQL server.

At minimum, you will need to provide the --mcp-port and --mcp-user flags, which tell Dolt the port to use to serve the MCP interface on, and what SQL identity to use for the MCP server.

Let's go through a simple example of how to do this to make it clear.

First, I'll create a new Dolt database and add some sample data to it.

➜  dbs git:(main) mkdir mcp_example
➜  dbs git:(main) cd mcp_example
➜  mcp_example git:(main) dolt init
Successfully initialized dolt data repository.
➜  mcp_example git:(main) dolt sql -q 'create table t1 (pk int primary key);'
➜  mcp_example git:(main) dolt sql -q 'insert into t1 values (1), (2), (3);'
➜  mcp_example git:(main) dolt add .
➜  mcp_example git:(main) dolt commit -m 'create t1 and add data'
commit 73kfm1iikc8iggad8pejdn0q9ibikg5h (HEAD -> main)
Author: coffeegoddd☕✨ <dustin@dolthub.com>
Date:  Tue Sep 09 10:46:49 -0700 2025

        create t1 and add data

Next, I'll create a new SQL user that the Dolt MCP server will use to authenticate to the Dolt SQL server.

➜  mcp_example git:(main) dolt sql -q "create user mcp_user@'%' identified by 'mcp_pass';"
➜  mcp_example git:(main) dolt sql -q "grant all privileges on mcp_example.* to 'mcp_user'@'%'"

Then, I'll start both the Dolt SQL server and Dolt MCP server simultaneously by running a single command.

➜  mcp_example git:(main) dolt sql-server --host 0.0.0.0 --mcp-port 7007 --mcp-user mcp_user --mcp-password mcp_pass -l debug
Starting server with Config HP="0.0.0.0:3306"|T="28800000"|R="false"|L="debug"
DEBU[0000] Loading events
DEBU[0000] privileges.db already exists, not creating root superuser
INFO[0000] Server ready. Accepting connections.
WARN[0000] secure_file_priv is set to "", which is insecure.
WARN[0000] Any user with GRANT FILE privileges will be able to read any file which the sql-server process can read.
WARN[0000] Please consider restarting the server with secure_file_priv set to a safe (or non-existent) directory.

After the servers are started, I'll register the MCP server with my local AI agent, and confirm the agent now has access to my Dolt database.

➜  mcp_example git:(main) claude mcp add -t http dolt-mcp http://localhost:7007/mcp
Added HTTP MCP server dolt-mcp with URL: http://localhost:7007/mcp to local config
File modified: /home/dustin/.claude.json [project: /home/dustin/dbs/mcp_example]

In the snippet above we registered the HTTP MCP server at http://localhost:7007/mcp. Note: the HTTP MCP server uses the default /mcp endpoint. Now, we can start the agent.

➜  mcp_example git:(main) claude
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/dustin/dbs/mcp_example               │
╰───────────────────────────────────────────────────╯
 Tips for getting started:

  Run /init to create a CLAUDE.md file with instructions for Claude
  Use Claude to help with file analysis, editing, bash commands and git
  Be as specific as you would with another engineer for the best results
  ✔ Run /terminal-setup to set up terminal integration
╭────────────────────────────────────────────────────────────────────────────────╮
│ Manage MCP servers                                                             │
│                                                                                │
│ ❯ 1. dolt-mcp  ✔ connected · Enter to view details                             │
│                                                                                │
│ MCP Config locations (by scope):                                               │
│  • User config (available in all your projects):                               │
│    • /home/dustin/.claude.json                                                 │
│  • Project config (shared via .mcp.json):                                      │
│    • /home/dustin/dbs/mcp_example/.mcp.json (file does not exist)              │
│  • Local config (private to you in this project):                              │
│    • /home/dustin/.claude.json [project: /home/dustin/dbs/mcp_example]         │
│                                                                                │
│ For help configuring MCP servers, see:                                         │
│ https://docs.anthropic.com/en/docs/claude-code/mcp                             │
╰────────────────────────────────────────────────────────────────────────────────╯
   Esc to exit

The agent shows a successful connection to the Dolt MCP server in the snippet above, and below, shows it can successfully make tool calls.

> and can you list the data in that table?

● dolt-mcp - query (MCP)(working_database: "mcp_example", working_branch:
                        "main", query: "SELECT * FROM t1")
  ⎿  pk
     ---
     1
     … +2 lines (ctrl+r to expand)

● The t1 table contains 3 rows with a pk column containing values 1, 2, and
  3.

╭────────────────────────────────────────────────────────────────────────────────╮
│ >                                                                              │
╰────────────────────────────────────────────────────────────────────────────────╯
  ? for shortcuts                @anthropic-ai/claude-code

Pretty cool, right! It's also worth noting that MCP server logs will be written to the same output stream as the Dolt server logs, and respect the same --log-level. When using --log-level=debug, you will see MCP server logs like this:

DEBU[0172] [dolt-mcp] http request                       bytes=24099 duration="963.247µs" method=POST path=/mcp remote="[::1]:40450" status=200

Starting Dolt SQL Server MCP from the Config file

# config.yaml

mcp_server:
  port: 7007
  user: root
  password: ""
  database: ""

These same options are also supported in Dolt SQL server's configuration file, as shown in the snippet above.

Let's replay our earlier example, only this time using the config.yaml to use Dolt's built-in MCP server, instead of the CLI flags. When a Dolt SQL server is started, it generates a sample config.yaml in the local directory. We'll use this generated file to configure our SQL server (and MCP server) this time.

The only thing we need to edit in the config.yaml is the mcp_server block and save the changes.

# config.yaml

mcp_server:
  port: 7007
  user: mcp_user
  password: mcp_pass
  database: ""

Let's save these changes, then we can start the Dolt SQL server using the --config CLI flag argument pointed at our updated config.yaml.

➜  mcp_example git:(main) dolt sql-server --config config.yaml
Starting server with Config HP="0.0.0.0:3306"|T="28800000"|R="false"|L="debug"
DEBU[0000] Loading events
DEBU[0000] privileges.db already exists, not creating root superuser
INFO[0000] Server ready. Accepting connections.
WARN[0000] secure_file_priv is set to "", which is insecure.
WARN[0000] Any user with GRANT FILE privileges will be able to read any file which the sql-server process can read.
WARN[0000] Please consider restarting the server with secure_file_priv set to a safe (or non-existent) directory.

And, since we've already registered our MCP service with our AI agent, we can just start using the agent like we did before.

➜  mcp_example git:(main) claude
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/dustin/dbs/mcp_example               │
╰───────────────────────────────────────────────────╯


 What's new:
  • Windows: Fixed path permission matching to consistently use POSIX format
  (e.g., `Read(//c/Users/...)`)
  • Settings: /doctor now validates permission rule syntax and suggests
  corrections
  • Vertex: add support for global endpoints for supported models
  • /memory command now allows direct editing of all imported memory files
  • SDK: Add custom tools as callbacks
╭────────────────────────────────────────────────────────────────────────────────╮
│ Manage MCP servers                                                             │
│                                                                                │
│ ❯ 1. dolt-mcp  ✔ connected · Enter to view details                             │
│                                                                                │
│ MCP Config locations (by scope):                                               │
│  • User config (available in all your projects):                               │
│    • /home/dustin/.claude.json                                                 │
│  • Project config (shared via .mcp.json):                                      │
│    • /home/dustin/dbs/mcp_example/.mcp.json (file does not exist)              │
│  • Local config (private to you in this project):                              │
│    • /home/dustin/.claude.json [project: /home/dustin/dbs/mcp_example]         │
│                                                                                │
│ For help configuring MCP servers, see:                                         │
│ https://docs.anthropic.com/en/docs/claude-code/mcp                             │
╰────────────────────────────────────────────────────────────────────────────────╯
   Esc to exit
> can you list the data in t1 using dolt-mcp again?

● I'll list the data in table t1 using the Dolt MCP tools.
  ⎿  Database
     ---
     information_schema
     … +2 lines (ctrl+r to expand)

● dolt-mcp - show_tables (MCP)(working_database: "mcp_example",
                              working_branch: "main")
  ⎿  Tables_in_mcp_example
     ---
     t1

● dolt-mcp - query (MCP)(working_database: "mcp_example", working_branch:
                        "main", query: "SELECT * FROM t1")
  ⎿  pk
     ---
     1
     … +2 lines (ctrl+r to expand)

● The table t1 contains 3 rows with pk values of 1, 2, and 3.

╭────────────────────────────────────────────────────────────────────────────────╮
│ >                                                                              │
╰────────────────────────────────────────────────────────────────────────────────╯
  ? for shortcuts                @anthropic-ai/claude-code

Conclusion

We're very excited about the future of software as the utility of AI agents continues to grow.

And, even though it's still very early, one thing is already crystal clear: agents need branches, and agents need Dolt, since Dolt is the only SQL database with branches.

If you're building agentic workflows and are curious about integrating Dolt, come by our Discord, we'd love to chat with you.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.