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.
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:
- 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.
š¢ 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).
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.