SqlAugur is an MCP (Model Context Protocol) server that provides AI assistants with secure, read-only access to SQL Server databases. Its design goal is to enable AI to query and explore databases while keeping security risks within an acceptable range.
Purpose SqlAugur is used to connect SQL Server databases to AI clients that support MCP, enabling assistants to view server lists, database lists, database schemas, table definitions, indexes and constraints, execution plans, and, when enabled, run the DBA diagnostic toolkit. It is suitable for scenarios that require AI-assisted database exploration, troubleshooting, and schema understanding, while also requiring teams to strictly limit write operations.
Main capabilities
- AST-based query validation: Every query is parsed into a complete syntax tree by Microsoft's official T-SQL parser (TSql180Parser), rather than using keyword blocking or regular expression matching. It can correctly handle bypass techniques such as keywords in comments, string literals, nested block comments, and encoding tricks. The rules include: only a single statement is allowed, only SELECT is allowed, SELECT INTO is prohibited, external data access such as OPENROWSET / OPENQUERY / OPENDATASOURCE / OPENXML is prohibited, linked servers (four-part naming) are prohibited, and the MAXRECURSION hint is prohibited. Cross-database queries (three-part naming) are allowed by design; the security boundary is the server rather than the database, and access can be restricted to a single database through login permissions.
- Rate limiting: Token buckets are used for throughput limiting, along with concurrency control, to prevent runaway AI query loops from overwhelming a production SQL Server. The default MaxConcurrentQueries is 5, and MaxQueriesPerMinute is 60. Requests exceeding these limits are rejected and return a retry prompt.
- Parameter lockdown: Diagnostic stored procedures are executed through a whitelist of procedure names, and parameters that could trigger write operations are blocked. First Responder Kit blocks all @Output* parameters; DarlingData blocks logging and output parameters; sp_WhoIsActive blocks @destination_table, @return_schema, @schema, and @help.
- Database toolkit: Multi-server named connections, Markdown-formattedSchema overview (including primary keys, foreign keys, constraints, default values), table documentation (columns, indexes, foreign keys, constraints), ER diagram generation (PlantUML and Mermaid, with cardinality detection), programmable objects and view definitions, extended properties, dependency graph exploration, estimated or actual XML execution plan analysis.
- DBA diagnostic tools: optional integration with First Responder Kit, DarlingData, sp_WhoIsActive; requires the corresponding stored procedures to be installed on the target SQL Server. Responses are size-optimized by default—excluding XML query plan columns and truncating long strings, which can reduce response size by 90–99%; use the verbose and includeQueryPlans parameters when full output is needed. Some tools have additional parameters: includeXmlReports (BlitzLock, HealthParser, HumanEventsBlockViewer), compact (sp_WhoIsActive), verboseMetrics (QuickieStore).
- Progressive discovery: when EnableDynamicToolsets is true, only core tools are loaded at startup, and the AI can discover and enable other toolsets on demand through three meta-tools (list_toolsets, get_toolset_tools, enable_toolset), reducing initial context usage. In static mode, all enabled toolsets are loaded at startup. Known limitation: this mechanism relies on MCP's notifications/tools/list_changed notification, which Claude Code currently does not handle, so static mode should be used with Claude Code.
Usage All installation methods produce the same MCP server. It is recommended to proceed in order: install SqlAugur, save appsettings.json to the correct location, add SqlAugur to the MCP client configuration, and have the assistant call list_servers to verify.
- NuGet global tool (recommended): first install the .NET 10.0 runtime, then install the tool, save the configuration file, and add it to the MCP client. The update command is dotnet tool update -g SqlAugur.
- Docker / Podman: run the SqlAugur container, then configure the MCP client. To access SQL Server on the host, use host.docker.internal with Docker Desktop and --network=host on Linux; on SELinux systems (Fedora, RHEL), mounting volumes requires the :Z flag; when mounting the configuration file, save it as /path/to/appsettings.json and mount it to /app/appsettings.json.
- Build from source: requires the .NET 10.0 SDK; after building, configure the client. Configuration file locations: for the local tool, ~/.config/sqlaugur/appsettings.json (Linux / macOS) or %APPDATA%\sqlaugur\appsettings.json (Windows); for the container, /app/appsettings.json; for source builds, SqlAugur/publish/appsettings.json next to the published DLL. Configuration loading priority, from highest to lowest, is: command-line arguments, environment variables (using __ as the separator), current working directory, user configuration directory, Azure Key Vault (when AzureKeyVaultUri is set), application directory. Windows authentication is officially recommended; appsettings.json has been added to gitignore to avoid accidentally committing credentials.
Use cases Suitable for connecting production or test SQL Server to an AI assistant for read-only exploration and troubleshooting, such as generating schema documentation and ER diagrams, analyzing execution plans, and running health checks on servers with the diagnostic toolkit installed. Also suitable for environments that need strict prevention of AI write operations and limits on query frequency.
Limitations and considerations Only SELECT and CTE queries are allowed; databases other than SQL Server are not supported. Progressive discovery is unavailable in Claude Code, so static mode must be used. DBA diagnostic tools require the corresponding stored procedures to be pre-installed on the target server. The project depends on Microsoft's official MCP C# SDK (ModelContextProtocol 1.3.0); vulnerabilities at the framework level directly affect the security boundary, so updates should be monitored. Query-returnedData may contain malicious prompt injections targeting AI, and this risk cannot be eliminated by this project; only trusted data sources should be connected. For detailed recommendations on authentication methods and credential storage, see the project's SECURITY.md; for contribution and architecture information, see CONTRIBUTING.md. Information such as platform and pricing is not yet available.