Devart.Mcp.SqlServer 1.1.0

{
  "inputs": [
    {
      "type": "promptString",
      "id": "server",
      "description": "SQL Server host, optionally with an instance or a port: localhost, dbserver\\sqlexpress, dbserver,1433.",
      "password": false,
      "default": "localhost"
    },
    {
      "type": "promptString",
      "id": "database",
      "description": "Database to connect to.",
      "password": false
    },
    {
      "type": "promptString",
      "id": "user",
      "description": "SQL Server login.",
      "password": false
    },
    {
      "type": "promptString",
      "id": "password",
      "description": "Password for the login.",
      "password": true
    },
    {
      "type": "promptString",
      "id": "license_key",
      "description": "Devart dotConnect for SQL Server license key, from the Devart Customer Portal.",
      "password": true
    }
  ],
  "servers": {
    "devart.mcp.sqlserver": {
      "type": "stdio",
      "command": "dnx",
      "args": ["devart.mcp.sqlserver@1.1.0", "--yes", "--", "run"],
      "env": {
        "DEVART_MCP_SQLSERVER_CONNECTION": "Data Source=${input:server};Initial Catalog=${input:database};User Id=${input:user};Password=${input:password};License Key=${input:license_key};Trust Server Certificate=True;"
      }
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global Devart.Mcp.SqlServer --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Devart.Mcp.SqlServer --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Devart.Mcp.SqlServer&version=1.1.0
                    
nuke :add-package Devart.Mcp.SqlServer --version 1.1.0
                    

Devart MCP Server for SQL Server (ADO.NET)

Devart MCP Server for SQL Server is a self-hosted Model Context Protocol (MCP) server that connects AI tools — Visual Studio, Visual Studio Code, Claude, Cline, Codex, Cursor, Windsurf, Zed, and other MCP-compatible clients — to your SQL Server data.

Its primary function is to help AI tools translate natural-language prompts into structured SQL queries, execute those queries against your databases, and return clean, structured results back to the AI.

The server works through Devart dotConnect for SQL Server, a high-performance ADO.NET data provider bundled in this package. It supplies accurate SQL Server metadata (tables, columns, primary and foreign keys, indexes, and routines), which is what keeps the generated SQL correct and the behavior predictable.

Available tools

The server exposes 14 tools to the AI client: six for exploring the schema, two for reading data, three for changing it, and three for the server itself. Each name is prefixed with the profile name, so a profile called my_sqlserver produces my_sqlserver_get_tables, my_sqlserver_execute_reader, and so on. Started without a profile, the server prefixes them with sqlserver instead.

Category Tools
Schema get_tables, get_columns, get_primary_keys, get_foreign_keys, get_indexes, get_routines
Read execute_reader, count_rows
Write execute_nonquery, add_row, execute_routine
Server server_version, instructions, config

execute_reader runs SELECT statements and returns the result set as Markdown. execute_nonquery runs INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, and CALL statements in a single transaction and returns the number of rows affected.


Prerequisites

Requirement Details
Platform Windows x64
Runtime .NET 8.0 or later, including the ASP.NET Core shared framework. The .NET SDK includes both; dnx requires .NET 10 or later.
Data source SQL Server 2005 or later, including Azure SQL Database
Connection Server name, database name, credentials, and a dotConnect license key — see License

Installation and configuration

The server stores its database connections as named profiles. You create a profile once, then start the server by profile name.

License

The MCP server is free. It connects to your data source through dotConnect for SQL Server, a Devart ADO.NET data provider that comes with this package. dotConnect is a commercial product, so you need a license key to use it.

Go to the dotConnect for SQL Server licensing page:

  • If you already have a dotConnect for SQL Server license, sign in and copy your license key from the Customer Portal.
  • If you do not have a license, register to get a free 30-day trial of the full product.

Then add the key to the connection string:

License Key=your_license_key;

Step 1: Create a connection profile

There is no installation step with dnx — the package is downloaded and run on demand.

dnx Devart.Mcp.SqlServer@1.1.0 config add my_sqlserver --connection-string "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;Encrypt=true;TrustServerCertificate=true;License Key=your_license_key;" --protocol-type stdio

where:

  • my_sqlserver — the profile name. You pass this name to the run command and reference it in your AI client configuration.
  • --connection-string — a dotConnect for SQL Server connection string.
  • --protocol-type — the transport protocol: stdio or http.

Connection string parameters:

Parameter Description
Data Source The name or network address of the SQL Server instance. Use localhost for a local instance. A named instance is specified as servername\instancename, a port as servername,1433.
Initial Catalog The database name.
User ID The SQL Server login account.
Password The password for that account.
License Key Your Devart dotConnect for SQL Server license key.
Encrypt Set to true to use SSL encryption for data exchanged with the server.
TrustServerCertificate Set to true to encrypt the channel while bypassing certificate chain validation. Useful for on-premises instances that use a self-signed certificate. If TrustServerCertificate is true but Encrypt is not set to true, the channel is not encrypted.

For the full parameter list, see the Devart dotConnect for SQL Server connection string reference.

Note A connection string that travels inside a JSON file — mcpserver.json or the mcp.json of an AI client — follows JSON rules, so every backslash has to be doubled: Data Source=server\\instance, Database=C:\\data\\file.db.

You can create as many profiles as you need. Use config list, config edit, and config delete to manage them — see the command-line reference below.

Step 2: Start the server

dnx Devart.Mcp.SqlServer@1.1.0 run my_sqlserver

Note This step is required only when --protocol-type is set to http. With stdio, your AI client starts the server automatically — you only need the profile from Step 1 and the AI client configuration from the next section.

Starting without a profile

A profile is optional. Given no profile name, run takes the connection string from the DEVART_MCP_SQLSERVER_CONNECTION environment variable:

$env:DEVART_MCP_SQLSERVER_CONNECTION = "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;License Key=your_license_key;"
dnx Devart.Mcp.SqlServer@1.1.0 run

AI clients pass the same variable in the env section of their configuration:

"args": ["Devart.Mcp.SqlServer@1.1.0", "--yes", "--", "run"],
"env": {
  "DEVART_MCP_SQLSERVER_CONNECTION": "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;License Key=your_license_key;"
}

Note Nothing has to be created up front: the server saves the connection as a profile named after the variable, so config list shows it afterwards and later starts reuse it. A profile name passed to run takes precedence over the variable.

.NET 8 and .NET 9

The dnx command is not available before .NET 10. For .NET 8 and .NET 9, install the server as a .NET tool instead:

dotnet tool install --global Devart.Mcp.SqlServer --version 1.1.0

Create a connection profile:

devart-mcp-sqlserver config add my_sqlserver --connection-string "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;License Key=your_license_key;" --protocol-type stdio

Start the server. This is required only when --protocol-type is set to http — with stdio, your AI client starts the server for you:

devart-mcp-sqlserver run my_sqlserver

Command-line reference

Command Purpose
config add <profile> Create a profile
config edit <profile> Change a profile
config delete <profile> Remove a profile
config list List saved profiles
run <profile> Start the server with a profile

Options for config add and config edit:

Option Purpose
-c, --connection-string The dotConnect for SQL Server connection string
-p, --protocol-type stdio or http
-ha, --http-address The address the server listens on. Used together with --protocol-type http. Defaults to localhost
-hp, --http-port The port the server listens on. Used together with --protocol-type http. Defaults to 8080
-hr, --http-route-prefix The route prefix the server is served under. Used together with --protocol-type http

Options for run:

Option Purpose
-f, --file Full path to the configuration file

Available on every command:

Option Purpose
-v, --verbosity Output detail: quiet, minimal, normal, detailed, or diagnostic

Editing the configuration file directly

Profiles are stored in an mcpserver.json file. You can also create or edit it by hand.

Search order. The server looks for the file in the path given by the --file option, then in the server folder, then in %ProgramData%\Devart\AdoNet MCP Server for SQL Server. Because the dnx cache path changes between versions, profiles are kept in the %ProgramData% location so they survive an update.

STDIO:

{
  "Connections": [
    {
      "Name": "my_sqlserver",
      "ConnectionString": "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;License Key=your_license_key;",
      "ProtocolType": "stdio"
    }
  ]
}

HTTP:

{
  "Connections": [
    {
      "Name": "my_sqlserver",
      "ConnectionString": "Data Source=localhost;Initial Catalog=your_database;User ID=your_user;Password=your_password;License Key=your_license_key;",
      "ProtocolType": "http",
      "HttpAddress": "localhost",
      "HttpPort": 8080,
      "HttpRoutePrefix": "sqlserver"
    }
  ]
}

where:

  • Name — the profile name.
  • ConnectionString — a dotConnect for SQL Server connection string.
  • ProtocolType — the transport protocol: stdio or http.
  • HttpAddress — the address the server listens on. Used when ProtocolType is set to http. Defaults to localhost.
  • HttpPort — the port the server listens on. Required when ProtocolType is set to http.
  • HttpRoutePrefix — the route prefix the server is served under. Used when ProtocolType is set to http.

To use a configuration file in a custom location:

devart-mcp-sqlserver run my_sqlserver --file C:\path\to\mcpserver.json

Integration with your IDE and AI clients

After you create a profile, add the server to your AI client. Restart the client after editing its configuration file.

Visual Studio and Visual Studio Code

Add the following to mcp.json. In Visual Studio, add .mcp.json to your solution root. In Visual Studio Code, run MCP: Open User Configuration from the Command Palette if the file does not exist yet.

.NET 10 and later:

{
  "servers": {
    "devart-sqlserver": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

.NET 8 and .NET 9:

{
  "servers": {
    "devart-sqlserver": {
      "type": "stdio",
      "command": "devart-mcp-sqlserver",
      "args": ["run", "my_sqlserver"]
    }
  }
}

where:

  • devart-sqlserver is the connector name that will appear in your AI client.
  • my_sqlserver is the profile name you created.

The connector appears in Visual Studio Code in Extensions > MCP Servers – Installed, and in Visual Studio in the GitHub Copilot Chat tools menu.

Claude Desktop

Open claude_desktop_config.json. To locate it, go to File > Settings > Developer in Claude Desktop and click Edit Config.

{
  "mcpServers": {
    "devart-sqlserver": {
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

After you restart Claude Desktop, the connector appears in Customize > Connectors.

Cline

In the Cline panel, click the MCP Servers icon and then Configure MCP Servers to open the settings file.

{
  "mcpServers": {
    "devart-sqlserver": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

The connector appears in Manage MCP Servers > MCP Servers.

Codex

Add the following to config.toml.

[mcp_servers.devart-sqlserver]
command = "dnx"
args = ["Devart.Mcp.SqlServer@1.1.0", "run", "my_sqlserver"]

The connector appears in Settings > MCP servers.

Cursor

Open mcp.json. If the file does not exist yet, go to Settings > Tools & MCPs > User MCP Servers and click Add Custom MCP.

{
  "mcpServers": {
    "devart-sqlserver": {
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

The connector appears in Settings > Tools & MCPs > User MCP Servers.

Windsurf

Open mcp_config.json. If the file does not exist yet, go to Settings > User > MCP and click Edit as JSON.

{
  "mcpServers": {
    "devart-sqlserver": {
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

The connector appears in Settings > MCP Registry.

Zed

Open settings.json. If the file does not exist yet, select Open Settings on the main menu and click Edit in settings.json.

{
  "context_servers": {
    "devart-sqlserver": {
      "source": "custom",
      "command": "dnx",
      "args": [
        "Devart.Mcp.SqlServer@1.1.0",
        "run",
        "my_sqlserver"
      ]
    }
  }
}

The connector appears in Settings > Model Context Protocol (MCP) Servers.

Using the HTTP transport

The configurations above use the stdio transport, where the AI client starts the server itself. If you set --protocol-type http instead, start the server yourself and point the client at one of two endpoints:

Endpoint Transport
http://<address>:<port>/<route-prefix>/sse Server-Sent Events. Use this endpoint in the client configurations below.
http://<address>:<port>/<route-prefix> Streamable HTTP. Available for clients that require it.

<address>, <port> and <route-prefix> are the values of --http-address, --http-port and --http-route-prefix. With no route prefix set, the endpoints are served from the root — http://localhost:8080 and http://localhost:8080/sse.

Replace the command and args entries with the field listed for your client:

Client Root key HTTP field
Claude Desktop mcpServers command: "npx", args: ["-y", "mcp-remote", "http://localhost:8080/sse"]
Cline mcpServers type: "streamableHttp", url: "http://localhost:8080"
Codex [mcp_servers.<name>] command = "npx", args = ["-y", "mcp-remote", "http://localhost:8080/sse"]
Cursor mcpServers command: "npx", args: ["-y", "mcp-remote", "http://localhost:8080/sse"]
Visual Studio Code servers type: "http", url: "http://localhost:8080/sse"
Windsurf mcpServers serverUrl: "http://localhost:8080/sse"
Zed context_servers url: "http://localhost:8080/sse"

For example, in Visual Studio Code:

{
  "servers": {
    "devart-sqlserver": {
      "type": "http",
      "url": "http://localhost:8080/sse"
    }
  }
}

Note The HTTP transport has no authentication, and the server accepts requests with any Host header. Bind it to localhost only.

Note Connector names must be unique. If you configure several profiles, give each one its own connector name, for example devart-sqlserver_prod and devart-sqlserver_dev.


Support

Licensing. The MCP server is free; Devart dotConnect for SQL Server requires a license key, with a free 30-day trial. See License.

Other Devart connectivity solutions

© 2026 Devart. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.1.0 9 9/14/2026