Devart MCP Server for PostgreSQL (ADO.NET) logo

Devart MCP Server for PostgreSQL (ADO.NET)

Schema-aware read/write access to PostgreSQL through Devart dotConnect ADO.NET data provider.

Install Devart MCP Server for PostgreSQL (ADO.NET)

Run the project’s own setup commands, in order.

Setup steps from the project

Devart MCP Server for PostgreSQL (ADO.NET) installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/devart-ai-connectivity/devart-mcp-server-postgresql.git
    
  2. 2. Install
    cd devart-mcp-server-postgresql
    
  3. 3. Install
    dotnet publish Devart.AI.McpServer.AdoNet/Devart.AI.McpServer.AdoNet.PostgreSql/Devart.AI.McpServer.AdoNet.PostgreSql.csproj -c ReleasePostgreSql /p:TargetFramework=net8.0
    
  4. 4. Install
    dotnet publish Devart.AI.McpServer.Odbc/Devart.AI.McpServer.Odbc.PostgreSql/Devart.AI.McpServer.Odbc.PostgreSql.csproj -c ReleasePostgreSql -r "win-x64" /p:TargetFramework=net8.0
    
  5. 5. Install
    dotnet publish Devart.AI.McpServer.Odbc/Devart.AI.McpServer.Odbc.PostgreSql/Devart.AI.McpServer.Odbc.PostgreSql.csproj -c ReleasePostgreSql -r "win-x86" /p:TargetFramework=net8.0
    

Overview

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 68d

From the project README

Devart MCP Server for PostgreSQL

NuGet MCP Registry

Version 1.1.0

What's new · Changelog

Devart MCP Server for PostgreSQL

Devart MCP Server for PostgreSQL is a self-hosted Model Context Protocol (MCP) server that gives AI clients structured access to your PostgreSQL data—schema, queries, and writes. It runs in your environment on Windows and is free to use.

The server comes in two editions built from this repository:

EditionHow you get itConnects through
ADO.NETNuGet .NET tool Devart.Mcp.PostgreSql, MCP Registry name com.devart/mcp-postgresqlDevart dotConnect for PostgreSQL, included in the package
ODBCWindows installer from devart.comDevart ODBC Driver for PostgreSQL, installed with the server

Key benefits

Devart MCP Server for PostgreSQL allows you to:

  • Work with data intuitively through natural language.
  • Retrieve the required data for analysis within minutes.
  • Report on your data faster with AI-powered assistance.
  • Minimize manual data handling and integration maintenance.

How it works

The server exposes your PostgreSQL schema—tables, columns, keys, indexes, and routines—to the AI client as MCP tools. The AI client uses this schema to compose SQL queries and sends them to the server as tool calls. The server runs the queries through dotConnect for PostgreSQL or Devart ODBC Driver for PostgreSQL and returns structured results. Nothing is routed through a Devart-hosted service.

Devart MCP Server architecture

Available tools

The server exposes 14 tools. Tool names are prefixed with the connection profile name, for example my_postgresql_get_tables.

CategoryTools
Schemaget_tables, get_columns, get_primary_keys, get_foreign_keys, get_indexes, get_routines
Readexecute_reader, count_rows
Writeexecute_nonquery, add_row, execute_routine
Serverserver_version, instructions, config

The server includes write tools: execute_nonquery runs INSERT, UPDATE, DELETE, CREATE, ALTER, and DROP statements, and execute_routine calls stored procedures. For read-only access, see Security and access control.

Transports

TransportHow it works
stdioThe AI client starts the server as a local process. Use it when the AI client runs on the same computer.
HTTPYou start the server, and AI clients connect to http://localhost:8080 (Streamable HTTP) or http://localhost:8080/sse (SSE). The HTTP transport doesn't use authentication, so keep the server bound to localhost.

Quick start

Option 1: NuGet package (ADO.NET)

Prerequisites

  • Windows x64.
  • .NET 8 or later, including the ASP.NET Core shared framework. dnx requires .NET 10 or later. For .NET 8 and .NET 9, see the package README.
  • A dotConnect for PostgreSQL license key. On the licensing page, sign in to copy your key or register for a free 30-day trial.

Step 1: Create a connection profile

Code
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

For all connection string parameters, see the dotConnect for PostgreSQL connection string reference.

Step 2: Add the server to your AI client

In Visual Studio Code, run MCP: Open User Configuration from the Command Palette and add:

config.json
{
  "servers": {
    "devart-postgresql": {
      "type": "stdio",
      "command": "dnx",
      "args": ["Devart.Mcp.PostgreSql@1.1.0", "run", "my_postgresql"]
    }
  }
}

The AI client starts the server automatically. Instead of a profile, you can pass the connection string in the DEVART_MCP_POSTGRESQL_CONNECTION environment variable.

Configuration examples for Visual Studio, Claude Desktop, Cline, Codex, Cursor, Windsurf, and Zed, the .NET 8 and .NET 9 setup, and the HTTP transport setup are in the package README on NuGet.

Option 2: Windows installer (ODBC)

1. Download and install Devart MCP Server for PostgreSQL. The installer also installs Devart ODBC Driver for PostgreSQL and .NET 8.

2. In Devart MCP Server for PostgreSQL, configure your data connection, transport, and integration settings. For all connection string parameters, see the Devart ODBC Driver for PostgreSQL connection string reference.

Devart MCP Server configuration

3. Run your first natural-language query.

Need an MCP Server for multiple data sources?

Security and access control

The server includes write tools and can do anything the account in the connection string is allowed to do. To limit an AI client to reading data:

EditionRead-only access
ADO.NET (NuGet)Connect with a PostgreSQL role that has only the SELECT privilege
ODBC (installer)Add Read Only=True to the connection string

To limit what an AI client can read, give the account access only to the data it needs.

  • Self-hosted. The server runs on your computer, not on Devart infrastructure, and connects to PostgreSQL from there. Query results go to your AI client and its AI model provider.
  • Network access. The HTTP transport doesn't use authentication. Keep the server bound to localhost, the default address. See Transports.

Manual installation and configuration

Prerequisites

Before building and running Devart MCP Server for PostgreSQL, ensure the following components are installed:

  • .NET 8 SDK
  • ADO.NET connection — Devart.AI.McpServer.AdoNet.PostgreSql.csproj Devart dotConnect for PostgreSQL (installed automatically via NuGet during build)
  • ODBC connection — Devart.AI.McpServer.Odbc.PostgreSql.csproj Devart ODBC Driver for PostgreSQL (requires manual download and installation)

Step 1: Clone the repository

Clone the project repository and navigate to the project directory:

1. Open Command Prompt.

2. Enter the following command:

cmd
git clone https://github.com/devart-ai-connectivity/devart-mcp-server-postgresql.git
cd devart-mcp-server-postgresql

Step 2: Build the MCP Server from source

You can build Devart MCP Server for PostgreSQL from source using either of the supported database connectivity technologies: ADO.NET or ODBC.

  • To build the MCP server with ADO.NET, run the following command:
cmd
dotnet publish Devart.AI.McpServer.AdoNet/Devart.AI.McpServer.AdoNet.PostgreSql/Devart.AI.McpServer.AdoNet.PostgreSql.csproj -c ReleasePostgreSql /p:TargetFramework=net8.0

The Devart dotConnect for PostgreSQL NuGet package is downloaded and restored automatically.

  • To build the MCP server with ODBC, select the command based on the bitness of your data source.

For 64-bit data source, run the following command:

cmd
dotnet publish Devart.AI.McpServer.Odbc/Devart.AI.McpServer.Odbc.PostgreSql/Devart.AI.McpServer.Odbc.PostgreSql.csproj -c ReleasePostgreSql -r "win-x64" /p:TargetFramework=net8.0

For 32-bit data source, run the following command:

cmd
dotnet publish Devart.AI.McpServer.Odbc/Devart.AI.McpServer.Odbc.PostgreSql/Devart.AI.McpServer.Odbc.PostgreSql.csproj -c ReleasePostgreSql -r "win-x86" /p:TargetFramework=net8.0

Note

The target platform must match the bitness of your ODBC data source.

Step 3: Configure the database connection for the MCP Server

1. Create an mcpserver.json configuration file in the directory containing the built MCP Server executable.

2. In the file, configure the database connection.

  • Configure a connection with ADO.NET.

Add the following configuration to the mcpserver.json file:

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Devart MCP Server for PostgreSQL (ADO.NET)

Devart MCP Server for PostgreSQL (ADO.NET) is an MCP server that provides schema-aware read/write access to PostgreSQL databases through Devart’s dotConnect ADO.NET data provider. It runs in your environment and lets AI clients use natural-language prompts to request data operations, translating requests into structured queries and returning clean, structured results.

Install the .NET 8 SDK, clone the project repository, and publish the ADO.NET PostgreSQL project with the ReleasePostgreSql configuration. The Devart dotConnect for PostgreSQL NuGet package is restored automatically during the build.

Configure your PostgreSQL data connection and integration settings in Devart MCP Server for PostgreSQL after installation, then run natural-language queries through your AI client.

Yes, the ADO.NET MCP server provides schema-aware read/write access to PostgreSQL and enables AI clients to interact with database data through natural-language requests.

The ADO.NET build requires the .NET 8 SDK and uses Devart dotConnect for PostgreSQL, which is installed automatically through NuGet during the build.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDevart MCP Server for PostgreSQL (ADO.NET) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/devart-mcp-server-for-postgresql-ado-net?style=directory)](https://allmcps.com/mcp/devart-mcp-server-for-postgresql-ado-net)
HTML Embed
<a href="https://allmcps.com/mcp/devart-mcp-server-for-postgresql-ado-net"><img src="https://allmcps.com/api/badge/devart-mcp-server-for-postgresql-ado-net?style=directory" alt="Devart MCP Server for PostgreSQL (ADO.NET) on AllMCPs" /></a>