Microsoft SQL Server MCP Server
Microsoft SQL Server MCP-сервер
Сервер Model Context Protocol (MCP), который обеспечивает безопасное взаимодействие с базами данных Microsoft SQL Server. Этот сервер позволяет помощникам ИИ перечислять таблицы, читать данные и выполнять SQL-запросы через контролируемый интерфейс, делая исследование и анализ базы данных более безопасными и структурированными.
Функции
Список доступных таблиц SQL Server в качестве ресурсов
Прочитать содержимое таблицы
Выполнять SQL-запросы с правильной обработкой ошибок
Безопасный доступ к базе данных через переменные среды
Комплексное ведение журнала
Автоматическая установка системных зависимостей
Related MCP server: MCP SQL Server
Установка
Пакет автоматически установит необходимые системные зависимости (например, FreeTDS) при установке через MCP:
pip install mssql-mcp-serverКонфигурация
Установите следующие переменные среды:
MSSQL_SERVER=localhost
MSSQL_USER=your_username
MSSQL_PASSWORD=your_password
MSSQL_DATABASE=your_databaseИспользование
С Клодом Десктопом
Добавьте это в ваш claude_desktop_config.json :
{
"mcpServers": {
"mssql": {
"command": "uv",
"args": [
"--directory",
"path/to/mssql_mcp_server",
"run",
"mssql_mcp_server"
],
"env": {
"MSSQL_SERVER": "localhost",
"MSSQL_USER": "your_username",
"MSSQL_PASSWORD": "your_password",
"MSSQL_DATABASE": "your_database"
}
}
}
}Как автономный сервер
# Install dependencies
pip install -r requirements.txt
# Run the server
python -m mssql_mcp_serverРазработка
# Clone the repository
git clone https://github.com/RichardHan/mssql_mcp_server.git
cd mssql_mcp_server
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytestСоображения безопасности
Никогда не фиксируйте переменные среды или учетные данные
Используйте пользователя базы данных с минимальными необходимыми правами.
Рассмотрите возможность внедрения белого списка запросов для использования в производственной среде.
Мониторинг и регистрация всех операций с базой данных
Лучшие практики безопасности
Для работы этого сервера MCP требуется доступ к базе данных. Для безопасности:
Создайте выделенный логин SQL Server с минимальными правами доступа
Никогда не используйте учетные данные sa или административные учетные записи.
Ограничьте доступ к базе данных только необходимыми операциями
Включить ведение журнала для целей аудита
Регулярные проверки безопасности доступа к базе данных
Подробные инструкции см. в Руководстве по настройке безопасности SQL Server :
Создание ограниченного входа в SQL Server
Установка соответствующих разрешений
Мониторинг доступа к базе данных
Лучшие практики безопасности
⚠️ ВАЖНО: Всегда следуйте принципу наименьших привилегий при настройке доступа к базе данных.
Лицензия
Лицензия MIT — подробности см. в файле LICENSE.
Внося вклад
Форк репозитория
Создайте ветку функций (
git checkout -b feature/amazing-feature)Зафиксируйте свои изменения (
git commit -m 'Add some amazing feature')Отправить в ветку (
git push origin feature/amazing-feature)Открыть запрос на извлечение
Available Tools
1 toolexecute_sqlC
Execute an SQL query on the SQL Server
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no risk of confusion or overlap.
With a single tool, naming is trivially consistent to itself.
A single SQL execution tool is insufficient for the typical scope of SQL Server operations, which usually requires multiple tools for schema exploration, query execution, and data manipulation.
The tool set is severely incomplete; it lacks fundamental operations such as listing tables, describing schemas, or managing databases, limiting useful agent workflows.
Maintenance
Related MCP Connectors
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.63MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI assistants with comprehensive access to SQL databases, enabling schema inspection, query execution, and database operations with enterprise-grade security.33 npm9MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides comprehensive access to Microsoft SQL Server databases, enabling Language Models to inspect schemas, execute queries, manage database objects, and perform advanced database operations.8-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI agents to interact with Microsoft SQL Server databases through secure, intelligent database operations. This server provides comprehensive CRUD capabilities, schema introspection, stored procedure execution, transaction management, and bulk opera1,042 npm48MIT