1. Conduid
  2. Science
  3. Mssql Fastmcp Server
MCP server · Science

Mssql Fastmcp Server

A Model Context Protocol (MCP) server for Microsoft SQL Server that enables secure database interactions through a controlled interface. Allows AI assistants to safely list tables, read data, and execute SQL queries while maintaining security and structure.

Unclaimed science
34Low

Scored 6 months ago · breakdown

About Mssql Fastmcp Server

Mssql Fastmcp Server is an MCP server in the Science category: a Model Context Protocol (MCP) server for Microsoft SQL Server that enables secure database interactions through a controlled interface. Allows AI assistants to safely list tables, read data, and execute SQL queries while maintaining security and structure.

Install

From source
git clone https://github.com/Nizarel/mssql_fastmcp_server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (3)

execute_sqlExecute SQL queries with validation and logging

Parameters not published.

get_table_schemaRetrieve detailed table schema information

Parameters not published.

list_databasesEnumerate available databases on the server

Parameters not published.

Ask AI

✦

Ask AI about Mssql Fastmcp Server

Powered by Claude · Grounded in docs

I know everything about Mssql Fastmcp Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Microsoft SQL Server MCP Server

PyPI

A Model Context Protocol (MCP) server for secure SQL Server database access through Claude Desktop, built with FastMCP 2.9.2 for modern async performance and enhanced developer experience.

✨ Key Features

  • 🔍 Database Discovery: List tables, schemas, and databases
  • 📊 SQL Execution: Execute queries with proper validation and security
  • 🔐 Multi-Auth Support: SQL, Windows, and Azure AD authentication
  • 🏢 Platform Support: LocalDB, SQL Server Express, and Azure SQL
  • ⚡ Async Performance: Built on FastMCP 2.9.2 with async/await patterns
  • 🛡️ Security First: SQL injection prevention and query validation
  • 📝 Rich Resources: Discoverable table schemas and data resources
  • 🔌 Flexible Configuration: Environment-based configuration with validation

🚀 Tools & Resources

Tools

  • execute_sql - Execute SQL queries with validation and logging
  • get_table_schema - Retrieve detailed table schema information
  • list_databases - Enumerate available databases on the server

Resources

  • mssql://tables - List all available tables
  • mssql://table/{table_name} - Get specific table data and schema

Quick Start

Install with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mssql": {
      "command": "uvx",
      "args": ["microsoft_sql_server_mcp"],
      "env": {
        "MSSQL_SERVER": "localhost",
        "MSSQL_DATABASE": "your_database",
        "MSSQL_USER": "your_username",
        "MSSQL_PASSWORD": "your_password"
      }
    }
  }
}

Configuration

Basic SQL Authentication

MSSQL_SERVER=localhost          # Required
MSSQL_DATABASE=your_database    # Required
MSSQL_USER=your_username        # Required for SQL auth
MSSQL_PASSWORD=your_password    # Required for SQL auth

Windows Authentication

MSSQL_SERVER=localhost
MSSQL_DATABASE=your_database
MSSQL_WINDOWS_AUTH=true         # Use Windows credentials

Azure SQL Database

MSSQL_SERVER=your-server.database.windows.net
MSSQL_DATABASE=your_database
MSSQL_USER=your_username
MSSQL_PASSWORD=your_password
# Encryption is automatic for Azure

Optional Settings

MSSQL_PORT=1433                 # Custom port (default: 1433)
MSSQL_ENCRYPT=true              # Force encryption

Alternative Installation Methods

Using pip

pip install microsoft_sql_server_mcp

Then in claude_desktop_config.json:

{
  "mcpServers": {
    "mssql": {
      "command": "python",
      "args": ["-m", "mssql_mcp_server"],
      "env": { ... }
    }
  }
}

🔧 Development & Testing

Running Tests

# Run refactoring validation tests
python test_refactor.py

# Run full test suite
python -m pytest tests/

Example Usage

# Copy example environment file
cp .env.example .env

# Edit configuration
nano .env

# Run example usage script
python example_usage.py

🛡️ Security Best Practices

  • Dedicated User: Create a dedicated SQL user with minimal permissions
  • No Admin Access: Never use admin/sa accounts in production
  • Windows Auth: Use Windows Authentication when possible
  • Encryption: Enable encryption for sensitive data connections
  • Query Validation: All queries are validated against injection patterns
  • Secure Logging: Sensitive data is masked in logs

🏗️ Architecture

This server is built with:

  • FastMCP 2.9.2: Modern async MCP framework with context injection
  • Pydantic V2: Configuration validation and data modeling
  • Thread Pool: Async wrapper for synchronous pymssql operations
  • Security Layer: SQL injection prevention and query validation
  • Comprehensive Logging: Detailed logging with context awareness

📝 License

MIT

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Mssql Fastmcp Server

How do I install Mssql Fastmcp Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Mssql Fastmcp Server safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Mssql Fastmcp Server still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.