
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
Devart.Mcp.PostgreSql
Advanced tools
Devart MCP Server for PostgreSQL (ADO.NET) gives AI tools schema-aware read and write access to PostgreSQL through dotConnect for PostgreSQL, the bundled Devart ADO.NET data provider. Windows x64.
Devart MCP Server for PostgreSQL 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 PostgreSQL data.
The server helps AI tools translate natural-language prompts into SQL queries, execute the queries against your databases, and return structured results to the AI.
The server uses Devart dotConnect for PostgreSQL, an ADO.NET data provider included in this package. The provider supplies PostgreSQL metadata, including tables, columns, primary and foreign keys, indexes, and routines, to help AI tools generate accurate SQL queries.
The server exposes 14 tools to the AI client: six for exploring the database schema, two for reading data, three for modifying data, and three for managing the server. Tool names are prefixed with the profile name. For example, the my_postgresql profile produces my_postgresql_get_tables, my_postgresql_execute_reader, and so on. If you start the server without a profile, tool names use the postgresql prefix.
| 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.
| 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 | PostgreSQL 8 or later, including EDB Postgres Advanced Server, Pervasive Postgres, and Heroku Postgres |
| Connection | Server name, database name, credentials, and a dotConnect license key — see License |
You can store database connections as named profiles and start the server by profile name.
Devart MCP Server for PostgreSQL is free to use. It connects to PostgreSQL through dotConnect for PostgreSQL, an ADO.NET data provider included in this package. To establish a connection, you need a dotConnect for PostgreSQL license key.
Get a license key from the dotConnect for PostgreSQL licensing page:
Add the license key to the connection string.
License Key=your_license_key;
For licensing terms, see the Devart MCP Server License Agreement and the Devart dotConnect License Agreement.
With dnx, you don't need to install the package. dnx downloads and runs it on demand.
Create a connection profile using your dotConnect for PostgreSQL license key.
dnx Devart.Mcp.PostgreSql@1.1.0 config add my_postgresql --connection-string "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;" --protocol-type stdio
where:
my_postgresql — the profile name. You pass this name to the run command and reference it in your AI client configuration.--connection-string — a dotConnect for PostgreSQL connection string.--protocol-type — the transport protocol: stdio or http.Connection string parameters:
| Parameter | Description |
|---|---|
Server (or Host) | The name or network address of the PostgreSQL server. Use localhost for a local instance. |
Port | The port that the server listens on. The PostgreSQL default is 5432. |
Database | The database name. |
User Id | The PostgreSQL role to authenticate as. |
Password | The password for the PostgreSQL role. |
Schema | The schema that the server works with. The default is public. Set this parameter if your tables are in another schema. |
Unicode | Set to True to exchange all data in UTF-8. Required if identifiers or data contain non-ASCII characters. |
License Key | Your dotConnect for PostgreSQL license key. |
For the full parameter list, see the Devart dotConnect for PostgreSQL connection string reference.
Note In JSON configuration files, such as
mcpserver.jsonor an AI client'smcp.json, escape each backslash with another backslash. For example, useData Source=server\\instance.
You can create multiple profiles. Use config list, config edit, and config delete to manage them. For details, see the command-line reference below.
If you use the http protocol, start the server.
dnx Devart.Mcp.PostgreSql@1.1.0 run my_postgresql
With stdio, the AI client starts the server automatically.
You can start the server without specifying a profile. In this case, run uses the connection string from the DEVART_MCP_POSTGRESQL_CONNECTION environment variable.
$env:DEVART_MCP_POSTGRESQL_CONNECTION = "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;"
dnx Devart.Mcp.PostgreSql@1.1.0 run
To start the server from an AI client, add the environment variable to the env section of the client configuration.
"args": ["Devart.Mcp.PostgreSql@1.1.0", "--yes", "--", "run"],
"env": {
"DEVART_MCP_POSTGRESQL_CONNECTION": "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;"
}
Note You don't need to create the profile in advance. The server saves the connection as a profile named after the environment variable. The profile appears in
config listand can be reused in subsequent runs.
dnx requires .NET 10 or later. With .NET 8 or .NET 9, install the server as a .NET tool instead.
dotnet tool install --global Devart.Mcp.PostgreSql --version 1.1.0
Create a connection profile.
devart-mcp-postgresql config add my_postgresql --connection-string "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;" --protocol-type stdio
If you use the http protocol, start the server.
devart-mcp-postgresql run my_postgresql
With stdio, the AI client starts the server automatically.
| Command | Purpose |
|---|---|
config add <profile> | Creates a profile |
config edit <profile> | Changes a profile |
config delete <profile> | Removes a profile |
config list | Lists saved profiles |
run <profile> | Starts the server with the specified profile |
Options for config add and config edit:
| Option | Purpose |
|---|---|
-c, --connection-string | Specifies the dotConnect for PostgreSQL connection string |
-p, --protocol-type | Specifies the transport protocol: stdio or http |
-ha, --http-address | Specifies the address that the server listens on. Used with --protocol-type http. Default: localhost |
-hp, --http-port | Specifies the port that the server listens on. Used with --protocol-type http. Default: 8080 |
-hr, --http-route-prefix | Specifies the route prefix for the server. Used with --protocol-type http |
Options for run:
| Option | Purpose |
|---|---|
-f, --file | Specifies the full path to the configuration file |
Option available for all commands:
| Option | Purpose |
|---|---|
-v, --verbosity | Specifies the output detail level: quiet, minimal, normal, detailed, or diagnostic |
Profiles are stored in mcpserver.json. You can also create or edit this file manually.
Search order. The server looks for mcpserver.json in the following order: the path specified by the --file option, the server folder, and %ProgramData%\Devart\AdoNet MCP Server for PostgreSQL\. Because the dnx cache path can change between versions, profiles are stored in %ProgramData% so that they persist across updates.
STDIO:
{
"Connections": [
{
"Name": "my_postgresql",
"ConnectionString": "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;",
"ProtocolType": "stdio"
}
]
}
HTTP:
{
"Connections": [
{
"Name": "my_postgresql",
"ConnectionString": "Server=localhost;Port=5432;Database=your_database;User Id=your_user;Password=your_password;Unicode=True;License Key=your_license_key;",
"ProtocolType": "http",
"HttpAddress": "localhost",
"HttpPort": 8080,
"HttpRoutePrefix": "postgresql"
}
]
}
where:
Name — Specifies the profile name.ConnectionString — Specifies the dotConnect for PostgreSQL connection string.ProtocolType — Specifies the transport protocol: stdio or http.HttpAddress — Specifies the address that the server listens on. Used when ProtocolType is set to http. Default: localhost.HttpPort — Specifies the port that the server listens on. Required when ProtocolType is set to http.HttpRoutePrefix — Specifies the route prefix for the server. Used when ProtocolType is set to http.To use a configuration file in a custom location, specify its path with the --file option.
devart-mcp-postgresql run my_postgresql --file C:\path\to\mcpserver.json
After you create a profile, configure your IDE or AI client to use the server. Restart the client after you update its configuration file.
Add the following configuration to the MCP configuration file:
.mcp.json to the solution root.mcp.json..NET 10 and later:
{
"servers": {
"devart-postgresql": {
"type": "stdio",
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
.NET 8 and .NET 9:
{
"servers": {
"devart-postgresql": {
"type": "stdio",
"command": "devart-mcp-postgresql",
"args": ["run", "my_postgresql"]
}
}
}
where:
devart-postgresql is the MCP server name that appears in your IDE or AI client.my_postgresql is the profile name you created.In Visual Studio Code, the MCP server appears under Extensions > MCP Servers – Installed. In Visual Studio, it appears in the GitHub Copilot Chat tools menu.
In Claude Desktop, go to File > Settings > Developer, and then click Edit Config to open claude_desktop_config.json.
Add the following configuration:
{
"mcpServers": {
"devart-postgresql": {
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
Restart Claude Desktop. The MCP server appears under Customize > Connectors.
In the Cline panel, click the MCP Servers icon, then click Configure MCP Servers to open the settings file.
Add the following configuration:
{
"mcpServers": {
"devart-postgresql": {
"type": "stdio",
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
The MCP server appears in Manage MCP Servers > MCP Servers.
Add the following configuration to config.toml:
[mcp_servers.devart-postgresql]
command = "dnx"
args = ["Devart.Mcp.PostgreSql@1.1.0", "run", "my_postgresql"]
The MCP server appears in Settings > MCP servers.
Open mcp.json. If the file does not exist, go to Settings > Tools & MCPs > User MCP Servers, then click Add Custom MCP to create it.
Add the following configuration:
{
"mcpServers": {
"devart-postgresql": {
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
The MCP server appears in Settings > Tools & MCPs > User MCP Servers.
Open mcp_config.json. If the file does not exist, go to Settings > User > MCP, then click Edit as JSON to create it.
Add the following configuration:
{
"mcpServers": {
"devart-postgresql": {
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
The MCP server appears in Settings > MCP Registry.
Open settings.json. If the file does not exist, select Open Settings from the main menu, then click Edit in settings.json.
Add the following configuration:
{
"context_servers": {
"devart-postgresql": {
"source": "custom",
"command": "dnx",
"args": [
"Devart.Mcp.PostgreSql@1.1.0",
"run",
"my_postgresql"
]
}
}
}
The MCP server appears in Settings > Model Context Protocol (MCP) Servers.
The configurations above use the stdio transport, in which the AI client starts the server automatically. If you use the http transport, start the server manually and configure the AI client to use one of the following endpoints:
| Endpoint | Transport |
|---|---|
http://<address>:<port>/<route-prefix>/sse | Server-Sent Events (SSE). Use this endpoint for clients that require SSE. |
http://<address>:<port>/<route-prefix> | Streamable HTTP. Use this endpoint for clients that support Streamable HTTP. |
<address>, <port>, and <route-prefix> correspond to --http-address, --http-port, and --http-route-prefix. If you don't specify a route prefix, use http://localhost:8080/sse for SSE and http://localhost:8080 for Streamable HTTP.
Replace the stdio configuration with the HTTP settings 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-postgresql": {
"type": "http",
"url": "http://localhost:8080/sse"
}
}
}
Note The HTTP transport doesn't use authentication, and the server accepts requests with any
Hostheader. Bind the server tolocalhostonly.
Note MCP server names must be unique. If you configure multiple profiles, use a different MCP server name for each profile, for example,
devart-postgresql_prodanddevart-postgresql_dev.
Other Devart connectivity solutions
© 2026 Devart. All rights reserved.
FAQs
Devart MCP Server for PostgreSQL (ADO.NET) gives AI tools schema-aware read and write access to PostgreSQL through dotConnect for PostgreSQL, the bundled Devart ADO.NET data provider. Windows x64.
We found that Devart.Mcp.PostgreSql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.