Skip to main content
Glama
MSSQL MCP Server

MSSQL MCP Server

by vicagbasi

๐Ÿ—„๏ธ MSSQL MCP Server ๐Ÿš€ Quick Start

  1. ๐Ÿ“ฆ Install: npm install && npm run build

  2. โš™๏ธ Configure: Set up individual environment variables (see configuration below)

  3. ๐Ÿ”— Connect: Tools automatically use your configured connections

  4. ๐Ÿ” Explore: Use natural language to query and explore your databases conversationally

  5. ๐Ÿ“„ Extract: Get complete stored procedure SQL code for business logic analysis

  6. ๐Ÿ—๏ธ Modernize: Use comprehensive schema tools to plan application modernization. This comprehensive Model Context Protocol (MCP) server for Microsoft SQL Server database analysis and modernization provides extensive capabilities for exploring and transforming your database schema. For complete configuration details, file locations, and troubleshooting, see the Configuration Guide.

๐Ÿ’ฌ Conversational Usage

With multiple connections configured, you can switch between databases naturally: This comprehensive server provides extensive tools for analyzing Classic ASP applications, exploring database schemas, and planning modernization to .NET/Angular architectures.

Built using the tedious library for pure JavaScript SQL Server connectivity with support for Windows Authentication (NTLM).

๐Ÿ†• Latest Update: Enhanced stored procedure tools now provide complete SQL source code access for comprehensive business logic analysis and modernization planning.

Related MCP server: SQL Server MCP

โ“ Why Windows Credentials in Environment Variables?

NTLM Pass-Through Authentication Requirement: When connecting to SQL Server using Windows Authentication (Integrated Security=SSPI), the MSSQL MCP server must provide explicit domain credentials because:

  1. No Interactive Session: MCP servers run as background processes without access to the current user's Windows session

  2. NTLM Protocol: Windows Authentication requires explicit username, password, and domain to establish the NTLM handshake

  3. Security Context: The tedious library needs these credentials to impersonate the domain user for database access

  4. Cross-Process Authentication: Unlike applications running in the user's context, MCP servers need explicit credential delegation

Environment variables are the secure, standard way to provide these credentials without hard-coding them in configuration files.

๐Ÿ› ๏ธ Available Tools (29 Comprehensive Database Analysis Tools)

๐Ÿ”ง Core Database Tools (8 tools)

  • ๐Ÿ”Œ test_connection - Test database connectivity and get server information

  • ๐Ÿ“‹ list_connections - List all available named database connections

  • ๐Ÿ“š list_databases - List all available databases on the SQL Server instance

  • ๐Ÿ“Š list_tables - List all tables in a specific schema (default: dbo)

  • ๐Ÿ“ describe_table - Get detailed schema information including columns, data types, and constraints

  • ๐ŸŽฏ sample_data - Retrieve sample data from a table (default: 10 rows, max: 100)

  • ๐Ÿ’ป execute_query - Execute custom SELECT queries (disabled by default; set MSSQL_ENABLE_EXECUTE_QUERY=true to enable)

  • ๐Ÿ”— get_relationships - Get foreign key relationships between tables

๐Ÿ—๏ธ Schema Discovery Tools (7 tools)

  • ๐Ÿ“‹ list_stored_procedures - List and analyze stored procedures with parameters and definitions

  • ๐Ÿ” describe_stored_procedure - Get procedure parameters and definition

  • ๐Ÿ“‹ list_views - Analyze views, their definitions, and dependencies

  • ๐Ÿ” describe_view - Get view definition and dependencies

  • โšก list_triggers - Identify triggers and their business logic

  • ๐Ÿ” describe_trigger - Extract trigger logic and events

  • ๐Ÿ”ง list_functions - List user-defined functions by type (scalar, table-valued, etc.)

โšก Index & Performance Tools (5 tools)

  • ๐Ÿ“Š list_indexes - Comprehensive index usage statistics and recommendations

  • ๐ŸŽฏ find_missing_indexes - Identify potentially missing indexes based on query patterns

  • ๐Ÿ“ˆ analyze_table_stats - Analyze table sizes, row counts, and space usage

  • ๐Ÿ’พ analyze_database_size - Complete database storage analysis

  • ๐Ÿ” analyze_index_usage - Identify unused and underutilized indexes

๐Ÿ”’ Constraint Analysis Tools (5 tools)

  • ๐Ÿ“‹ list_constraints - List all constraints (check, unique, foreign key, etc.)

  • โœ… analyze_check_constraints - Extract business rules from check constraints

  • ๐Ÿ”ง list_default_constraints - Analyze default value patterns

  • ๐Ÿ“ list_user_defined_types - Catalog custom data types

  • ๐Ÿงฎ find_computed_columns - Identify calculated fields and business logic

๐Ÿ“Š Data Pattern Tools (4 tools)

  • ๐Ÿ“ˆ analyze_data_distribution - Analyze data patterns and quality

  • ๐Ÿ” find_lookup_tables - Automatically identify reference/lookup tables

  • โ“ analyze_null_patterns - Find columns with high null percentages

  • ๐Ÿ” detect_audit_columns - Identify audit columns and tracking patterns

๐Ÿš€ Enhanced Stored Procedure Tools (4 tools)

  • ๐Ÿ“„ get_stored_procedure_definition - Get complete SQL source code of a single stored procedure

  • ๐Ÿ“š get_multiple_stored_procedure_definitions - Get SQL definitions for multiple procedures at once

  • ๐Ÿ“ฆ get_all_stored_procedure_definitions - Get complete SQL definitions for all procedures in a schema

  • ๐Ÿ” search_stored_procedures_by_content - Search procedures by text patterns in their SQL definitions

All tools accept an optional connectionName parameter to switch between different databases conversationally.

โœจ Features

  • ๐ŸŽฏ Individual Environment Variables: Cleanest configuration approach - no JSON strings needed

  • ๐Ÿ”„ Multi-Database Support: Switch between different databases conversationally

  • ๐Ÿ” Windows Authentication Support: Full NTLM authentication with domain credentials

  • ๐Ÿ—๏ธ Deep Schema Analysis: Comprehensive database object exploration including stored procedures, views, triggers

  • ๐Ÿ“„ Complete SQL Code Access: Extract full source code from stored procedures for analysis and modernization

  • โšก Performance Tools: Index analysis, missing index detection, table statistics

  • ๐Ÿ”’ Business Logic Extraction: Extract business rules from constraints, computed columns, and database objects

  • ๐Ÿ“Š Data Pattern Analysis: Identify lookup tables, audit columns, and data quality patterns

  • ๐Ÿ” Legacy System Analysis: Specialized tools for Classic ASP to modern stack migration planning

  • ๐Ÿ“Š Data Sampling: Safe data retrieval with configurable limits

  • ๐Ÿ›ก๏ธ Read-Only Security: Built-in query validation and safety restrictions

  • ๐Ÿ”„ Connection Pooling: Efficient connection reuse using tedious

  • ๐ŸŽ›๏ธ Multiple Config Formats: Support for various configuration approaches

๐Ÿ“ฆ Installation

npm install
npm run build

๐Ÿ” Environment Setup

Note: The .env file is for local testing/development only. For production use, configure your MCP client directly with environment variables.

  1. Copy the example environment file:

    cp .env.example .env
  2. Update .env with your credentials:

    # Windows Authentication credentials for NTLM
    MSSQL_USERNAME=your-domain-username
    MSSQL_PASSWORD=your-secure-password
    MSSQL_DOMAIN=your-domain
    
    # Default connection string for your database
    MSSQL_CONNECTION_STRING=Data Source=your-server; Initial Catalog=your-database; Integrated Security=SSPI; TrustServerCertificate=False;
  3. Security Note: The .env file is automatically ignored by Git to prevent committing credentials.

โš™๏ธ Configuration

The cleanest, most professional approach using individual environment variables (no JSON strings required):

{
  "servers": {
    "mssql-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["mssql-mcp-server"],
      "env": {
        // Windows credentials (individual variables - cleanest)
        "WINDOWS_USERNAME": "your-domain-username",
        "WINDOWS_PASSWORD": "your-secure-password",
        "WINDOWS_DOMAIN": "YOUR-DOMAIN",

        // Optional default connection
        "MSSQL_CONNECTION_STRING": "Data Source=main-server; Initial Catalog=MainDB; Integrated Security=SSPI; TrustServerCertificate=False;",

        // Multiple database connections (individual variables)
        "CONNECTION_CRM": "Data Source=crm-server; Initial Catalog=CRM_Database; Integrated Security=SSPI; TrustServerCertificate=False;",
        "CONNECTION_ERP": "Data Source=erp-server; Initial Catalog=ERP_System; Integrated Security=SSPI; TrustServerCertificate=False;",
        "CONNECTION_ANALYTICS": "Data Source=analytics-server; Initial Catalog=DataWarehouse; Integrated Security=SSPI; TrustServerCertificate=False;",
        "CONNECTION_HR": "Data Source=hr-server; Initial Catalog=HumanResources; Integrated Security=SSPI; TrustServerCertificate=False;"
      }
    }
  }
}

๐ŸŽฏ Connection Name Mapping

When using CONNECTION_* variables, connection names are automatically generated:

Environment Variable

Connection Name (for tools)

CONNECTION_CRM

crm

CONNECTION_ERP

erp

CONNECTION_ANALYTICS

analytics

CONNECTION_HR_SYSTEM

hr_system

Usage in conversational queries:

  • "Show me tables in the CRM database" โ†’ uses crm connection

  • "What's in the analytics warehouse?" โ†’ uses analytics connection

  • "Query the HR system for employee data" โ†’ uses hr_system connection

๐Ÿ”ง Alternative Configuration Methods

The server supports multiple configuration approaches for backward compatibility:

  • JSON String Variables: windows_credentials, connections

  • Legacy Variables: MSSQL_WINDOWS_CREDENTIALS, MSSQL_CONNECTIONS

  • Individual Legacy: MSSQL_USERNAME, MSSQL_PASSWORD, MSSQL_DOMAIN

For complete configuration details, file locations, and troubleshooting, see the Configuration Guide.

๐Ÿ” Security Configuration

Global/User Level (Recommended for personal development)

  • Location: %APPDATA%\Claude\claude_desktop_config.json (Windows)

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.config/claude/claude_desktop_config.json

  • Scope: Available in ALL Claude Desktop conversations

  • Use Case: Personal development setup, local databases

Note: Claude Desktop only supports global configuration (no project-level config)

๐Ÿ“ VS Code

Global/User Level (Available in all workspaces)

  • Location: User Settings JSON

    • Windows: %APPDATA%\Code\User\settings.json

    • macOS: ~/Library/Application Support/Code/User/settings.json

    • Linux: ~/.config/Code/User/settings.json

  • Access: Ctrl+Shift+P โ†’ "Preferences: Open User Settings (JSON)"

  • Scope: ALL VS Code workspaces

  • Use Case: Consistent development environment across all projects

Workspace Level (Specific workspace)

  • Location: .vscode/settings.json in workspace root

  • Scope: Specific workspace only

  • Use Case: Workspace-specific database connections

Project/Repository Level (Recommended for teams)

  • Location: .vscode/mcp.json in project root

  • Scope: Specific project/repository only

  • Use Case: Project-specific databases, team collaboration, version control

๐ŸŽฏ Cursor

Global/User Level

  • Location: %APPDATA%\Cursor\User\settings.json (Windows)

  • macOS: ~/Library/Application Support/Cursor/User/settings.json

  • Linux: ~/.config/Cursor/User/settings.json

  • Scope: ALL Cursor workspaces

Workspace/Project Level

  • Location: .vscode/settings.json or .vscode/mcp.json in project root

  • Scope: Specific workspace/project (Cursor uses VS Code format)

๐Ÿข Visual Studio Professional

System Level

  • Location: Windows System Environment Variables

  • Use Case: System-wide credentials and connections

  • Note: VS Professional doesn't have native MCP support yet

Project Level

  • Location: .vs/mcp.json or similar (extension-dependent)

  • Status: Depends on MCP extension implementation

๐ŸŽฏ Configuration Priority Hierarchy

Override Order (highest to lowest priority):

  1. Project/Repository Level: .vscode/mcp.json

  2. Workspace Level: .vscode/settings.json

  3. User/Global Level: User/settings.json or Claude config

  4. System Level: Windows Environment Variables

Example: If you have WINDOWS_USERNAME set both globally and in a project config, the project value will be used for that specific project.

๐Ÿ’ก Best Practices for File Locations

For Individual Developers:

  • Global credentials: Set Windows authentication in system environment variables

  • Global default connection: Configure in Claude Desktop global config or VS Code user settings

  • Project connections: Use .vscode/mcp.json for project-specific databases

For Teams:

  • Shared setup: Document configuration in project README

  • Version control: Include .vscode/mcp.json in repository for team consistency

  • Security: Never commit actual passwords - use environment variable references

For Different Use Cases:

  • Personal projects: Global configuration in Claude Desktop or VS Code user settings

  • Team projects: Project-level .vscode/mcp.json with environment variable references

  • Enterprise: Combination of system environment variables + project-specific configs

๐Ÿ”— Connection String Examples

๐Ÿ” Windows Authentication (Recommended):

Data Source=ServerName; Initial Catalog=DatabaseName; Integrated Security=SSPI; TrustServerCertificate=False;

๐Ÿ”‘ SQL Server Authentication:

Server=localhost,1433;Database=AdventureWorks;User Id=sa;Password=YourPassword123!;Encrypt=true;TrustServerCertificate=false;

โ˜๏ธ Azure SQL Database:

Server=your-server.database.windows.net;Database=your-database;User Id=your-username;Password=your-password;Encrypt=true;

๐Ÿท๏ธ Named Instance:

Server=localhost\\SQLEXPRESS;Database=TestDB;Integrated Security=true;TrustServerCertificate=false;

๐ŸŽ›๏ธ Configuration Options

๐ŸŽฏ Individual Variables (Recommended - Cleanest):

  • WINDOWS_USERNAME: Windows domain username

  • WINDOWS_PASSWORD: Windows domain password

  • WINDOWS_DOMAIN: Windows domain name

  • CONNECTION_*: Individual connection strings (e.g., CONNECTION_CRM, CONNECTION_ANALYTICS)

  • MSSQL_CONNECTION_STRING: Optional default connection string

Connection Mapping: CONNECTION_CRM โ†’ crm, CONNECTION_HR_SYSTEM โ†’ hr_system

๐Ÿ’ก Technical Note: Windows Authentication Requirements

The Windows credentials (WINDOWS_USERNAME, WINDOWS_PASSWORD, WINDOWS_DOMAIN) are required for Windows Authentication because:

  1. MCP Service Context: The server runs as a background process without access to your Windows session

  2. NTLM Authentication: SQL Server Windows Authentication requires explicit credentials for the NTLM handshake

  3. Credential Delegation: The tedious library must authenticate as your domain user to access SQL Server

  4. Security Protocol: This is how NTLM works for service-to-service authentication - credentials must be explicitly provided

This isn't a configuration preference - it's a technical requirement of Windows Authentication in service contexts.

๐Ÿ”„ Alternative Approaches (Backward Compatible):

  • JSON String Variables: windows_credentials, connections

  • Legacy Variables: MSSQL_WINDOWS_CREDENTIALS, MSSQL_CONNECTIONS

  • Individual Legacy: MSSQL_USERNAME, MSSQL_PASSWORD, MSSQL_DOMAIN

๐Ÿ’ก Why Individual Variables?

  • ๐Ÿš€ Cleanest: No JSON strings to escape or parse

  • ๐Ÿ“‹ Clearest: Each setting immediately visible

  • ๐Ÿ”ง Standard: Industry-standard environment variable approach

  • โœ… Error-free: No JSON syntax issues possible

  • ๐Ÿ”„ Compatible: All existing configurations continue to work

๐Ÿ’ฌ Conversational Usage

With multiple connections configured, you can switch between databases naturally in conversation:

User: "What database connections do I have available?"
Assistant: I'll list all your configured database connections...
[Shows: crm, erp, analytics, hr, etc.]

User: "Show me the customer tables in the CRM system"
Assistant: I'll explore the CRM database for customer-related tables...
[Uses connectionName: "crm"]

User: "Now check the analytics warehouse for sales data"
Assistant: Switching to the analytics database to look for sales data...
[Uses connectionName: "analytics"]

User: "Compare employee counts between HR system and ERP"
Assistant: I'll check both databases for employee information...
[Uses connectionName: "hr", then connectionName: "erp"]

๐Ÿ”’ Security Features

  • Read-Only Access: Only SELECT statements allowed

  • Query Validation: Automatic blocking of dangerous operations

  • Result Limiting: Automatic TOP clauses to prevent large data dumps

  • Connection Validation: Secure credential handling

  • Schema-Level Security: Respects database permissions

๐Ÿš€ Usage Examples

Basic Database Exploration

User: "What tables are in my database?"
Assistant: [Lists all tables with descriptions]

User: "Describe the customers table"
Assistant: [Shows column details, data types, constraints]

User: "Show me a sample of customer data"
Assistant: [Returns first 10 rows safely]

Multi-Database Scenarios

User: "List my available connections"
Assistant: [Shows all configured database connections]

User: "Switch to the analytics database and show me the sales tables"
Assistant: [Connects to analytics DB and lists sales-related tables]

User: "Query both CRM and ERP systems for customer overlap"
Assistant: [Queries both systems and compares results]

๐Ÿ—๏ธ Classic ASP Modernization Workflow

This MCP server provides specialized tools for analyzing Classic ASP applications and planning modernization:

Phase 1: Discovery & Assessment

// 1. Analyze stored procedures containing business logic
await mcp.call("list_stored_procedures", {
  schema: "MyApp",
  includeSystemObjects: false,
});

// 2. Extract business rules from database constraints
await mcp.call("analyze_check_constraints", {
  schema: "MyApp",
});

// 3. Identify lookup tables and reference data
await mcp.call("find_lookup_tables", {
  schema: "MyApp",
});

// 4. Analyze performance bottlenecks
await mcp.call("find_missing_indexes", {
  schema: "MyApp",
});

Phase 2: Business Logic Extraction

// Extract detailed stored procedure logic
await mcp.call("describe_stored_procedure", {
  procedureName: "CalculateOrderTotal",
  schema: "MyApp",
  includeDefinition: true,
});

// Get complete SQL source code for analysis
await mcp.call("get_stored_procedure_definition", {
  procedureName: "ProcessOrder",
  schema: "MyApp",
  formatOutput: true,
});

// Bulk extract all stored procedures for modernization
await mcp.call("get_all_stored_procedure_definitions", {
  schema: "MyApp",
  maxResults: 50,
});

// Search for procedures using specific tables or business logic
await mcp.call("search_stored_procedures_by_content", {
  searchText: "Customer",
  schema: "MyApp",
  includeDefinitions: true,
});

// Find computed columns with business rules
await mcp.call("find_computed_columns", {
  schema: "MyApp",
});

// Analyze data validation rules
await mcp.call("analyze_check_constraints", {
  schema: "MyApp",
});

Phase 3: Migration Planning

// Identify audit trails and tracking patterns
await mcp.call("detect_audit_columns", {
  schema: "MyApp",
});

// Analyze data patterns for normalization
await mcp.call("analyze_data_distribution", {
  tableName: "Orders",
  schema: "MyApp",
});

// Plan index strategy for new application
await mcp.call("analyze_index_usage", {
  schema: "MyApp",
});

๐Ÿ’ฌ Advanced Usage Examples

Schema Discovery

User: "I need to understand the business logic in my legacy application database"
Assistant: I'll analyze your database for business logic patterns...

[Uses list_stored_procedures, analyze_check_constraints, find_computed_columns]

User: "What stored procedures handle order processing?"
Assistant: Let me search for order-related procedures...

[Uses search_stored_procedures_by_content with "order", then get_stored_procedure_definition for detailed analysis]

User: "Show me the complete SQL code for the CalculateOrderTotal procedure"
Assistant: I'll retrieve the full stored procedure definition...

[Uses get_stored_procedure_definition with formatOutput: true]

User: "Get all stored procedure code for the sales schema for modernization"
Assistant: I'll extract all stored procedure definitions from the sales schema...

[Uses get_all_stored_procedure_definitions with schema: "sales"]

Performance Analysis

User: "Find performance issues in my database"
Assistant: I'll analyze indexes and table performance...

[Uses find_missing_indexes, analyze_table_stats, analyze_index_usage]

User: "Which tables are growing too fast?"
Assistant: Let me check table sizes and growth patterns...

[Uses analyze_table_stats, analyze_database_size]

Multi-Database Analysis

User: "Compare customer data between our CRM and ERP systems"
Assistant: I'll analyze customer tables in both systems...

[Switches between connectionName: "crm" and connectionName: "erp"]

User: "Find data quality issues across all our databases"
Assistant: Let me check data patterns across your systems...

[Uses analyze_null_patterns, analyze_data_distribution across multiple connections]

๐Ÿ”ง Development

# Development mode
npm run dev

# Build for production
npm run build

# Run tests
npm test

๐Ÿ“ License

MIT License - see LICENSE file for details.

๐Ÿค Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

๐Ÿ“š Additional Resources

Available Tools

33 tools
analyze_check_constraintsAnalyze Check ConstraintsC

Extract and analyze business rules from check constraints

Inputs: schema, tableName, connectionName.

analyze_database_sizeAnalyze Database SizeB

Get comprehensive database size information including data and log file sizes

Inputs: connectionName.

analyze_data_distributionAnalyze Data DistributionC

Get data distribution patterns for columns to understand data quality and patterns

Inputs: tableName (required), schema, columnName, sampleSize, +1 more.

analyze_index_usageAnalyze Index UsageA

Show detailed index usage statistics to identify unused or underutilized indexes

Inputs: schema, tableName, connectionName, showUnusedOnly.

analyze_null_patternsAnalyze NULL PatternsB

Find columns with high null percentages and analyze null patterns

Inputs: schema, connectionName, minNullPercentage.

analyze_table_statsAnalyze Table StatisticsB

Get table row counts, size information, and last update statistics

Inputs: schema, tableName, connectionName.

describe_stored_procedureDescribe Stored ProcedureC

Get detailed information about a specific stored procedure including parameters and definition

Inputs: procedureName (required), schema, connectionName, includeDefinition.

describe_tableDescribe TableA

Get detailed schema information for a specific table including columns, data types, and constraints

Inputs: tableName (required), schema, connectionName.

describe_triggerDescribe TriggerB

Get detailed information about a specific trigger including its definition and events

Inputs: triggerName (required), connectionName, includeDefinition.

describe_viewDescribe ViewC

Get detailed information about a specific view including its definition and dependencies

Inputs: viewName (required), schema, connectionName, includeDefinition.

detect_audit_columnsDetect Audit ColumnsC

Identify common audit trail patterns (created/modified dates, user tracking)

Inputs: schema, connectionName.

execute_queryExecute SQL QueryA

Execute a custom SQL SELECT query with automatic limit (top 20 rows). Disabled unless MSSQL_ENABLE_EXECUTE_QUERY=true.

Inputs: query (required), connectionName.

find_computed_columnsFind Computed ColumnsC

List computed columns and their formulas to understand derived business logic

Inputs: schema, tableName, connectionName.

find_lookup_tablesFind Lookup TablesB

Identify reference/lookup tables automatically based on table patterns

Inputs: schema, maxRows, connectionName.

find_missing_indexesFind Missing IndexesC

Identify potentially missing indexes based on query execution patterns

Inputs: schema, minImpact, connectionName.

get_all_stored_procedure_definitionsGet All Stored Procedure DefinitionsA

Get complete SQL definitions for all stored procedures in a schema

Inputs: schema, maxResults, connectionName, includeSystemProcedures.

get_multiple_stored_procedure_definitionsGet Multiple Stored Procedure DefinitionsB

Get complete SQL definitions for multiple stored procedures at once

Inputs: procedureNames (required), schema, connectionName, includeMetadata.

get_relationshipsGet Table RelationshipsB

Get foreign key relationships between tables in the database

Inputs: schema, connectionName.

get_stored_procedure_definitionGet Stored Procedure DefinitionB

Get the complete SQL query/definition of a stored procedure - this is the actual source code

Inputs: procedureName (required), schema, formatOutput, connectionName.

list_connectionsList Available ConnectionsA

List all available named database connections configured in the server

Inputs: no named parameters.

list_constraintsList All ConstraintsC

List all constraints (check, unique, foreign key, etc.) across tables in the database

Inputs: schema, connectionName, constraintType.

list_databasesList DatabasesB

List all databases available on the SQL Server instance

Inputs: connectionName.

list_default_constraintsList Default ConstraintsA

List all default value constraints and their definitions

Inputs: schema, tableName, connectionName.

list_functionsList User-Defined FunctionsA

List all user-defined functions (scalar, table-valued, etc.)

Inputs: schema, functionType, connectionName.

list_indexesList Table IndexesC

List all indexes on tables with usage statistics and detailed information

Inputs: schema, tableName, connectionName, includeUsageStats.

list_stored_proceduresList Stored ProceduresB

List all stored procedures, functions, and their basic information

Inputs: schema, connectionName, includeSystemObjects.

list_tablesList TablesA

List all tables in the connected database

Inputs: schema, connectionName.

list_triggersList TriggersC

List all triggers in the database with their associated tables

Inputs: schema, tableName, connectionName.

list_user_defined_typesList User-Defined Data TypesA

List all user-defined data types and their definitions

Inputs: schema, connectionName.

list_viewsList ViewsB

List all views in the database with their basic information

Inputs: schema, connectionName, includeSystemViews.

sample_dataSample Table DataA

Retrieve sample data from a table (top 10 rows by default)

Inputs: tableName (required), limit, schema, connectionName.

search_stored_procedures_by_contentSearch Stored Procedures by ContentB

Search for stored procedures containing specific text or patterns in their SQL definition

Inputs: searchText (required), schema, caseSensitive, connectionName, +1 more.

test_connectionTest ConnectionB

Test the database connection and return basic server information

Inputs: connectionName.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    B3.4/5.0

    Scored across 33 tools

    Disambiguation4/5

    Tools are generally distinct in purpose, but there are many analysis and listing tools (e.g., analyze_table_stats vs. describe_table vs. list_tables) that could cause confusion if descriptions are skimmed. However, each tool has a clear focus, so ambiguity is low.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern using snake_case (e.g., list_tables, analyze_index_usage, describe_table). No mixed conventions or irregular names.

    Tool Count4/5

    33 tools is on the high side, but each serves a distinct purpose for database analysis and exploration. The scope is broad but justified; tools like analyze_* and list_* cover different aspects.

    Completeness3/5

    The toolset is heavily skewed toward read-only analysis (schema inspection, statistics, sample data). Missing DDL operations (create, alter, drop) and write operations, which are essential for full database management. Execution of arbitrary queries is disabled by default.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables interaction with Microsoft SQL Server and Azure SQL databases through natural language, supporting queries, schema exploration, stored procedures, and complete database operations with connection pooling and security features.
      14
      655 npm
      15
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides secure, read-only access to Microsoft SQL Server with multi-layer protection, enabling safe query execution, schema discovery, and SQL script analysis through natural language.
      2
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables secure interaction with Microsoft SQL Server databases, allowing schema exploration, metadata retrieval, and read-only query execution through natural language.
      1
      -
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to connect to Microsoft SQL Server for schema discovery, querying, stored procedures, DDL, performance diagnostics, and developer utilities with configurable security modes.
      35
      MIT