Enterprise SQL & Postgres C# MCP Server

Enterprise SQL & Postgres C# MCP Server

Hardened C# Model Context Protocol (MCP) server for MS SQL Server and PostgreSQL databases featuring read-only transaction safeguards, command security filters, and path traversal protection.

Category
Visit Server

README

šŸ”Œ Enterprise AI Toolkit (C# MCP Server)

A high-performance C# Model Context Protocol (MCP) server for Microsoft SQL Server and PostgreSQL. Connect Claude Desktop, Cursor IDE, and custom AI workflows to your production databases and filesystems safely, securely, and in under 5 minutes.


šŸ”“ The Database Access Problem for AI

AI agents like Claude and Cursor are incredibly smart, but they can't see your data. Giving them direct access to your database is extremely risky:

  1. Accidental Deletions/Writes: The AI might generate DROP TABLE, DELETE, or UPDATE commands that corrupt production data.
  2. Slow Schema Discovery: Manually copy-pasting tables and structures into prompts is tedious and quickly exceeds context window limits.
  3. Runaway Queries: An AI writing a raw SELECT * on a table with 10 million rows will freeze your database server.
  4. Path Traversal Attacks: Giving the AI filesystem tools can allow it to escape sandbox limits and read sensitive system files.

🟢 The Solution: Hardened C# MCP Server

This C# .NET 8.0 server provides a secure, read-only, and sandboxed bridge:

  • Autonomous Schema Crawlers: The AI discovers tables, row counts, columns, primary keys, and types dynamically on-the-fly.
  • Automatic Transaction Rollbacks: Every SQL query and stored procedure runs inside an explicit transaction that is automatically rolled back (transaction.Rollback()). Writes are physically impossible.
  • Command Keyword Filter: Pre-scans inputs and rejects any command containing modification keywords (INSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE, EXEC).
  • Row Guards: Automatically caps all query outputs with TOP 100 (SQL Server) or LIMIT 100 (PostgreSQL) if no limits are specified.
  • Sandboxed Filesystem: Traversal-proof file tools (read, write, copy, move, delete) restricted to a configured sandbox workspace.

šŸ“¦ Getting Started (Trial Guide)

This repository contains the Pre-Compiled Trial Binary of the server.

Step 1: Download & Extract

Clone this repository or download it as a ZIP and extract it to a folder (e.g., C:\Tools\EnterpriseMcpServer).

Step 2: Configure appsettings.json

Open appsettings.json in the extracted folder and configure your SQL database connection strings and sandbox directory:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=HeroERP;Trusted_Connection=True;TrustServerCertificate=True;",
    "PostgresConnection": "Host=localhost;Port=5432;Database=HeroERP;Username=postgres;Password=YOUR_PASSWORD;"
  },
  "McpSettings": {
    "AllowedWorkspace": "./Workspace"
  }
}

Step 3: Integrate with Claude Desktop

Open %APPDATA%\Claude\claude_desktop_config.json and register the server:

{
  "mcpServers": {
    "enterprise-sql-filesystem": {
      "command": "dotnet",
      "args": [
        "C:\\Tools\\EnterpriseMcpServer\\bin\\EnterpriseMcpServer.dll"
      ]
    }
  }
}

Note: Make sure to replace C:\\Tools\\EnterpriseMcpServer with your actual absolute path.

Restart Claude. You will see the tools icon (hammer) active, exposing all SQL and sandboxed file tools!


šŸ”’ Trial Version vs Full Version

The pre-compiled DLL in this repository is a Trial version. It has a limit of 10 database/file tool calls per session. If exceeded, it asks you to purchase a license.

To download the Full, Unprotected C# Source Code, Visual Studio Solution, and Unlimited Production Build, purchase the toolkit:

šŸ‘‰ Purchase Enterprise AI Toolkit on Gumroad

Includes lifetime updates, commercial use license, and full source code (no obfuscation, no limits).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured