MCP server/database

SqlAugur MCP Server

Safe, read-only access to SQL Server databases with AST-based validation.

★ 5mbentham/SqlAugur ↗by mbenthamupdated
1

Add it to Claude Code

claude mcp add sql-augur -- sqlaugur
2

Make your agent remember this setup

sql-augur's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • AST-level query validation using Microsoft's official T-SQL parser
  • Read-only by design, permitting only SELECT and CTE queries
  • Integrated DBA diagnostic tools including First Responder Kit and sp_WhoIsActive
  • Token bucket throughput limiting and concurrency control
  • Response size optimization for DBA tools by excluding verbose columns

Tools 3

list_serversLists configured SQL Server connections.
execute_queryExecutes a read-only SELECT or CTE query validated via AST.
get_schemaExplores database schema objects.

Try it

List the available SQL Server connections configured in SqlAugur.
Run a query to select the top 10 rows from the Users table in the production database.
Show me the schema for the Sales schema in the production database.
Use the DBA toolkit to check for active sessions on the production server.
Original README from mbentham/SqlAugur

SqlAugur

<a href="https://glama.ai/mcp/servers/@mbentham/sql-augur"> </a>

An MCP server that gives AI assistants safe, read-only access to SQL Server databases. Every query is parsed into a full AST using Microsoft's official T-SQL parser — not regex — so comment injection, string literal tricks, and encoding bypasses are blocked at the syntax level.

┌──────────────┐          ┌───────────────────────────────────────────┐        ┌──────────────┐
│              │  stdio   │  SqlAugur                                 │        │              │
│  AI Client   │◄────────►│                                           │───────►│  SQL Server  │
│              │          │  ┌────────────┐  ┌──────────────────────┐ │        │              │
└──────────────┘          │  │  Query     │  │  Schema / Diagram /  │ │        └──────────────┘
                          │  │  Validator │  │  DBA Services        │ │
                          │  └────────────┘  └──────────────────────┘ │
                          │  ┌────────────────────────────────────┐   │
                          │  │  Rate Limiter                      │   │
                          │  └────────────────────────────────────┘   │
                          └───────────────────────────────────────────┘

Quick Start

Prerequisite: .NET 10.0 runtime

1. Install

dotnet tool install -g SqlAugur

2. Configure — create ~/.config/sqlaugur/appsettings.json (Linux/macOS) or %APPDATA%\sqlaugur\appsettings.json (Windows), setting the connection string for your environment:

{
  "SqlAugur": {
    "Servers": {
      "production": {
        "ConnectionString": "Server=myserver;Database=master;Integrated Security=True;TrustServerCertificate=False;Encrypt=True;"
      }
    }
  }
}

3. Connect — add to your MCP client:

<details open> <summary><strong>Claude Desktop</strong></summary>

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "sqlaugur": {
      "command": "sqlaugur"
    }
  }
}
</details> <details> <summary><strong>Claude Code</strong></summary>
claude mcp add --transport stdio sqlaugur -- sqlaugur

Or add to .mcp.json in your project root:

{
  "mcpServers": {
    "sqlaugur": {
      "type": "stdio",
      "command": "sqlaugur"
    }
  }
}
</details> <details> <summary><strong>VS Code / Copilot</strong></summary>

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "sqlaugur": {
      "command": "sqlaugur"
    }
  }
}
</details>

4. Verify — ask your AI assistant to list_servers and you should see your configured connection.

For Docker, Podman, and other install methods, see Installation.

Why This Approach

  • AST-level query validation — Most MCP database servers use keyword blocking or no validation at all. This project parses every query into a full syntax tree using Microsoft's official TSql170Parser. Comment injection, string literal tricks, and encoding bypasses are blocked at the syntax level, not with fragile regex patterns.

  • Rate limiting — Token bucket throughput limiting and concurrency control prevent runaway AI query loops from overwhelming production SQL Servers. No other MCP database server offers this.

  • DBA diagnostic tooling — Integrated support for First Responder Kit, DarlingData, and sp_WhoIsActive with parameter blocking that prevents write operations. This is an entirely new MCP capability category.

  • Response size optimisation — DBA tools exclude verbose columns (XML query plans, deadlock graphs, metric breakdowns) and truncate long strings by default, reducing response sizes by 90–99%. Use verbose and includeQueryPlans parameters to get full untruncated output when needed.

  • Progressive discovery — Up to 29 tools organized into toolsets that load on demand. Only 6 core tools are exposed initially, keeping the AI's context window small and reducing token usage. Additional toolsets are discovered and enabled as needed.

Features

Security

  • Read-only by design — only SELECT and CTE queries are permitted
  • AST-based query validation using ScriptDom (not regex)
  • Parameter blocking on all diagnostic stored procedures to prevent writes
  • Concurrency and throughput rate l

Frequently Asked Questions

What are the key features of SqlAugur?

AST-level query validation using Microsoft's official T-SQL parser. Read-only by design, permitting only SELECT and CTE queries. Integrated DBA diagnostic tools including First Responder Kit and sp_WhoIsActive. Token bucket throughput limiting and concurrency control. Response size optimization for DBA tools by excluding verbose columns.

What can I use SqlAugur for?

Allowing AI assistants to query production databases without risk of data modification. Automating database health checks and performance monitoring using DBA diagnostic tools. Providing developers with safe, natural language access to database schema exploration. Preventing runaway AI query loops from overwhelming production SQL Server instances.

How do I install SqlAugur?

Install SqlAugur by running: dotnet tool install -g SqlAugur

What MCP clients work with SqlAugur?

SqlAugur works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep SqlAugur docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest