Related MCP Server Resources

Explore more AI models, providers, and integration options:

  • Explore AI Models
  • Explore AI Providers
  • Explore MCP Servers
  • LangDB Pricing
  • Documentation
  • AI Industry Blog
  • Vertex AI MCP Server
  • Ramp MCP Server
  • AGE-MCP-Server
  • sourcesage
  • Weekly Weather
Back to MCP Servers
T-SQL Analyzer

T-SQL Analyzer

Public
ErikEJ/SqlServer.Rules

Provides a comprehensive library of over 120 static analysis rules and a CLI tool for enforcing SQL best practices and detecting code smells in SQL Database projects using Model Context Protocol.

javascript
0 tools
May 29, 2025
Updated Jun 4, 2025

Supercharge Your AI with T-SQL Analyzer

MCP Server

Unlock the full potential of T-SQL Analyzer through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.

Unified API Access
Complete Tracing
Instant Setup
Get Started Now

Free tier available • No credit card required

Instant Setup
99.9% Uptime
10,000+Monthly Requests

Static Analysis Rule-sets for SQL Projects

build status

Overview

A library of SQL best practices implemented as more than 120 database code analysis rules checked at build.

The rules can be added as NuGet packages to modern SQL Database projects based on either MSBuild.Sdk.SqlProj or Microsoft.Build.Sql.

You can also download and manually use the rules with Visual Studio and "classic" SQL Database projects, as described in my blog post here.

For a complete list of the current rules we have implemented see here.

This fork also contains an additional set of rules TSQL Smells forked from TSQL-Smells

Usage

The latest version is available on NuGet

dotnet add package ErikEJ.DacFX.SqlServer.Rules
dotnet add package ErikEJ.DacFX.TSQLSmellSCA

You can read more about using and customizing the rules in the readme here

Command line tool - T-SQL Analyzer CLI

This repository also contains a .NET commmand line tool, that uses the rule sets. Read more in the dedicated readme file

Solution Organization

.github - GitHub actions

docs - markdown files generated from rule inspection with the DocsGenerator unit test

Solution Items - files relating to build etc.

src

  • SqlServer.Rules - This holds the rules derived from SqlCodeAnalysisRule
  • TSQLSmellSCA - an additional set of rules TSQL Smells forked from TSQL-Smells

test

  • SqlServer.Rules.Tests - a few test to demonstrate unit testing of rules
  • TSQLSmellsSSDTTest - unit tests of some of the TSQL Smells rules
  • TestHelpers - shared test base classes

tools

  • SqlAnalyzerCli - a command line tool to run rules against a SQL Project
  • ErikEJ.DacFX.TSQLAnalyzer - library and NuGet package for running rules against SQL scripts and reporting results. Used by SqlAnalyzerCli
  • SqlServer.Rules.Generator - a quick console app to report on all rules in a SQL Project.
  • SqlServer.Rules.Report - Library for evaluating a rule and serializing the result.

sqlprojects

  • AW - AdventureWorks schema SQL Project for rules validation
  • TestDatabase - a small SQL Database Project with some rule violations
  • TSQLSmellsTest - a SQL Database Project with some rule violations
Publicly Shared Threads0

Discover shared experiences

Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!

Share your threads to help others
Related MCPs5
  • Vertex AI MCP Server
    Vertex AI MCP Server

    Provides a Model Context Protocol server enabling advanced interaction with Google Cloud's Vertex AI...

    20 tools
    Added May 30, 2025
  • Ramp MCP Server
    Ramp MCP Server

    Model Context Protocol server enabling efficient retrieval, analysis, and task execution on Ramp dat...

    Added May 30, 2025
  • AGE-MCP-Server
    AGE-MCP-Server

    Enables integration of Apache AGE graph database capabilities with Azure Database for PostgreSQL thr...

    Added May 30, 2025
  • sourcesage
    sourcesage

    Efficiently memorize and dynamically update codebase logic, style, and standards across multiple lan...

    Added May 30, 2025
  • Weekly Weather
    Weekly Weather

    Provides 8-day global weather forecasts and current conditions with detailed hourly and daily data, ...

    Added May 30, 2025