Enterprise SQL & Postgres C# MCP Server
Provides read-only access to PostgreSQL databases with automatic transaction rollbacks and row limits to prevent accidental writes or runaway queries.
🔌 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:
Accidental Deletions/Writes: The AI might generate
DROP TABLE,DELETE, orUPDATEcommands that corrupt production data.Slow Schema Discovery: Manually copy-pasting tables and structures into prompts is tedious and quickly exceeds context window limits.
Runaway Queries: An AI writing a raw
SELECT *on a table with 10 million rows will freeze your database server.Path Traversal Attacks: Giving the AI filesystem tools can allow it to escape sandbox limits and read sensitive system files.
Related MCP server: sql-mcp
🟢 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) orLIMIT 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).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/herotech101/Enterprise-SQL-Postgres-MCP-Server-Demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server