
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server exposing tools for SQL Server database analysis, object discovery, and data manipulation.
MCPQL - SQL Server MCP is cataloged as an MCP server attributed to hendrickcastro. A Model Context Protocol server exposing tools for SQL Server database analysis, object discovery, and data manipulation. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCPQL - SQL Server MCP are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No, modification and stored procedure execution controls default to false for security.
SQL Server, Windows, and Azure Active Directory authentication.
README.md · 05ad4446fc2b · Fetched 2026-11-13 11:05:25 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A comprehensive Model Context Protocol (MCP) server for SQL Server database operations. This server provides 10 powerful tools for database analysis, object discovery, and data manipulation through the MCP protocol.
No installation needed! Just configure your MCP client:
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "sql",
"DB_SERVER": "your_server",
"DB_NAME": "your_database",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"DB_PORT": "1433",
"DB_ENCRYPT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
For Cursor IDE:
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "sql",
"DB_SERVER": "your_server",
"DB_NAME": "your_database",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"DB_PORT": "1433",
"DB_ENCRYPT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
git clone https://github.com/hendrickcastro/MCPQL.git
cd MCPQL
npm install
npm run build
.env file with your database credentials:# Basic SQL Server connection
DB_AUTHENTICATION_TYPE=sql
DB_SERVER=localhost
DB_NAME=MyDatabase
DB_USER=sa
DB_PASSWORD=YourPassword123!
DB_PORT=1433
DB_ENCRYPT=false
DB_TRUST_SERVER_CERTIFICATE=true
{
"mcpServers": {
"mcpql": {
"command": "node",
"args": ["path/to/MCPQL/dist/server.js"]
}
}
}
MCPQL provides 11 comprehensive tools for SQL Server database operations:
mcp_table_analysisComplete table structure analysis including columns, keys, indexes, and constraints.
mcp_sp_structureAnalyze stored procedure structure including parameters, dependencies, and source code.
mcp_preview_dataPreview table data with optional filtering and row limits.
mcp_get_column_statsGet comprehensive statistics for a specific column.
mcp_execute_procedureExecute stored procedures with parameters and return results.
mcp_execute_queryExecute custom SQL queries with full error handling.
mcp_quick_data_analysisQuick statistical analysis including row count, column distributions, and top values.
mcp_search_comprehensiveSearch across database objects by name and definition with configurable criteria.
mcp_get_dependenciesGet dependencies for database objects (tables, views, stored procedures, etc.).
mcp_get_sample_valuesGet sample values from a specific column in a table.
mcp_get_security_statusGet current security configuration and status for database operations.
// Get complete table structure
const analysis = await mcp_table_analysis({
table_name: "dbo.Users"
});
// Get quick data overview
const overview = await mcp_quick_data_analysis({
table_name: "dbo.Users",
sample_size: 500
});
// Preview table data with filters
const data = await mcp_preview_data({
table_name: "dbo.Users",
filters: { "Status": "Active", "Department": "IT" },
limit: 25
});
// Find all objects containing "User"
const objects = await mcp_search_comprehensive({
pattern: "User",
search_in_names: true,
search_in_definitions: false
});
// Find procedures that query a specific table
const procedures = await mcp_search_comprehensive({
pattern: "FROM Users",
object_types: ["PROCEDURE"],
search_in_definitions: true
});
// Get complete stored procedure analysis
const spAnalysis = await mcp_sp_structure({
sp_name: "dbo.usp_GetUserData"
});
// Execute a stored procedure
const result = await mcp_execute_procedure({
sp_name: "dbo.usp_GetUserById",
params: { "UserId": 123, "IncludeDetails": true }
});
// Get column statistics
const stats = await mcp_get_column_stats({
table_name: "dbo.Users",
column_name: "Age"
});
// Get sample values from a column
const samples = await mcp_get_sample_values({
table_name: "dbo.Users",
column_name: "Department",
limit: 15
});
MCPQL supports multiple SQL Server connection types with comprehensive configuration options:
Set DB_AUTHENTICATION_TYPE to one of:
sql - SQL Server Authentication (default)windows - Windows Authenticationazure-ad - Azure Active Directory Authentication| Variable | Description | Default | Required For |
|---|---|---|---|
| Basic Connection | |||
DB_AUTHENTICATION_TYPE | Authentication type (sql/windows/azure-ad) | sql | All |
DB_SERVER | SQL Server hostname/IP | - | All |
DB_NAME | Database name | - | All |
DB_PORT | SQL Server port | 1433 | All |
DB_TIMEOUT | Connection timeout (ms) | 30000 | All |
DB_REQUEST_TIMEOUT | Request timeout (ms) | 30000 | All |
| SQL Server Authentication | |||
DB_USER | SQL Server username | - | SQL Auth |
DB_PASSWORD | SQL Server password | - | SQL Auth |
| Windows Authentication | |||
DB_DOMAIN | Windows domain | - | Windows Auth |
DB_USER | Windows username | current user | Windows Auth |
DB_PASSWORD | Windows password | - | Windows Auth |
| Azure AD Authentication | |||
DB_USER | Azure AD username | - | Azure AD (Password) |
DB_PASSWORD | Azure AD password | - | Azure AD (Password) |
DB_AZURE_CLIENT_ID | Azure AD App Client ID | - | Azure AD (Service Principal) |
DB_AZURE_CLIENT_SECRET | Azure AD App Client Secret | - | Azure AD (Service Principal) |
DB_AZURE_TENANT_ID | Azure AD Tenant ID | - | Azure AD (Service Principal) |
| SQL Server Express | |||
DB_INSTANCE_NAME | Named instance (e.g., SQLEXPRESS) | - | Express instances |
| Security Settings | |||
DB_ENCRYPT | Enable encryption | false | All |
DB_TRUST_SERVER_CERTIFICATE | Trust server certificate | false | All |
DB_ENABLE_ARITH_ABORT | Enable arithmetic abort | true | All |
DB_USE_UTC | Use UTC for dates | true | All |
| Connection Pool | |||
DB_POOL_MAX | Maximum connections | 10 | All |
DB_POOL_MIN | Minimum connections | 0 | All |
DB_POOL_IDLE_TIMEOUT | Idle timeout (ms) | 30000 | All |
| Advanced Settings | |||
DB_CANCEL_TIMEOUT | Cancel timeout (ms) | 5000 | All |
DB_PACKET_SIZE | Packet size (bytes) | 4096 | All |
DB_CONNECTION_STRING | Complete connection string | - | Alternative to individual settings |
| Security Controls | |||
DB_ALLOW_MODIFICATIONS | Allow DML/DDL operations | false | All |
DB_ALLOW_STORED_PROCEDURES | Allow stored procedure execution | false | All |
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "sql",
"DB_SERVER": "localhost",
"DB_NAME": "MyDatabase",
"DB_USER": "sa",
"DB_PASSWORD": "YourPassword123!",
"DB_PORT": "1433",
"DB_ENCRYPT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "sql",
"DB_SERVER": "localhost",
"DB_INSTANCE_NAME": "SQLEXPRESS",
"DB_NAME": "MyDatabase",
"DB_USER": "sa",
"DB_PASSWORD": "YourPassword123!",
"DB_ENCRYPT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "windows",
"DB_SERVER": "MYSERVER",
"DB_NAME": "MyDatabase",
"DB_DOMAIN": "MYDOMAIN",
"DB_USER": "myuser",
"DB_PASSWORD": "mypassword",
"DB_ENCRYPT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "azure-ad",
"DB_SERVER": "myserver.database.windows.net",
"DB_NAME": "MyDatabase",
"DB_USER": "user@domain.com",
"DB_PASSWORD": "userpassword",
"DB_PORT": "1433",
"DB_ENCRYPT": "true",
"DB_TRUST_SERVER_CERTIFICATE": "false"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_AUTHENTICATION_TYPE": "azure-ad",
"DB_SERVER": "myserver.database.windows.net",
"DB_NAME": "MyDatabase",
"DB_AZURE_CLIENT_ID": "your-client-id",
"DB_AZURE_CLIENT_SECRET": "your-client-secret",
"DB_AZURE_TENANT_ID": "your-tenant-id",
"DB_PORT": "1433",
"DB_ENCRYPT": "true",
"DB_TRUST_SERVER_CERTIFICATE": "false"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_CONNECTION_STRING": "Server=localhost;Database=MyDatabase;User Id=sa;Password=YourPassword123!;Encrypt=false;TrustServerCertificate=true;"
}
}
}
}
MCPQL includes comprehensive security controls to prevent accidental database modifications, especially important in production environments.
DB_ALLOW_MODIFICATIONS: Controls DML/DDL operations (INSERT, UPDATE, DELETE, ALTER, DROP, CREATE)DB_ALLOW_STORED_PROCEDURES: Controls stored procedure executionfalse for maximum securityUse mcp_get_security_status to check current security configuration:
const status = await mcp_get_security_status({});
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_SERVER": "localhost",
"DB_NAME": "MyDatabase",
"DB_USER": "sa",
"DB_PASSWORD": "YourPassword123!",
"DB_ALLOW_MODIFICATIONS": "true",
"DB_ALLOW_STORED_PROCEDURES": "true"
}
}
}
}
{
"mcpServers": {
"mcpql": {
"command": "npx",
"args": ["-y", "hendrickcastro/mcpql"],
"env": {
"DB_SERVER": "prod-server",
"DB_NAME": "ProductionDB",
"DB_USER": "readonly_user",
"DB_PASSWORD": "secure_password",
"DB_ALLOW_MODIFICATIONS": "false",
"DB_ALLOW_STORED_PROCEDURES": "false"
}
}
}
}
When operations are blocked, MCPQL provides clear guidance:
Error: Modification operations are disabled for security.
To enable modifications, configure: DB_ALLOW_MODIFICATIONS=true
Error: Stored procedure execution is disabled for security.
To enable stored procedures, configure: DB_ALLOW_STORED_PROCEDURES=true
These operations are always permitted regardless of security settings:
For complete security documentation, see SECURITY.md.
DB_AUTHENTICATION_TYPE=windowsDB_INSTANCE_NAMEDB_TRUST_SERVER_CERTIFICATE=trueDB_TIMEOUT or check network connectivityDB_INSTANCE_NAME=SQLEXPRESS for default Express installationsserver.database.windows.net for server nameDB_ENCRYPT=true and DB_TRUST_SERVER_CERTIFICATE=falseRun the comprehensive test suite:
npm test
The test suite includes comprehensive testing of all 10 tools with real database testing and complete coverage.
MCPQL/
├── src/
│ ├── __tests__/ # Comprehensive test suite
│ ├── tools/ # Modular tool implementations
│ │ ├── tableAnalysis.ts # Table analysis tools
│ │ ├── storedProcedureAnalysis.ts # SP analysis tools
│ │ ├── dataOperations.ts # Data operation tools
│ │ ├── objectSearch.ts # Search and discovery tools
│ │ ├── types.ts # Type definitions
│ │ └── index.ts # Tool exports
│ ├── db.ts # Database connection management
│ ├── server.ts # MCP server setup and handlers
│ ├── tools.ts # Tool definitions and schemas
│ └── mcp-server.ts # Tool re-exports
├── dist/ # Compiled JavaScript output
└── package.json # Dependencies and scripts
dbo.Users, api.Idiomas)git checkout -b feature/amazing-feature)npm test)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Database: sql-server azure-sql database-analysis database-tools mssql t-sql database-management database-administration database-operations data-analysis
MCP & AI: model-context-protocol mcp-server mcp-tools ai-tools claude-desktop cursor-ide anthropic llm-integration ai-database intelligent-database
Technology: typescript nodejs npm-package cli-tool database-client sql-client database-sdk rest-api json-api database-connector
Features: table-analysis stored-procedures data-preview column-statistics query-execution database-search object-dependencies schema-analysis data-exploration database-insights
Deployment: docker azure-deployment cloud-ready enterprise-ready production-ready scalable secure authenticated encrypted configurable
Use Cases: database-development data-science business-intelligence database-migration schema-documentation performance-analysis data-governance database-monitoring troubleshooting automation
🎯 MCPQL provides comprehensive SQL Server database analysis and manipulation capabilities through the Model Context Protocol. Perfect for database administrators, developers, and anyone working with SQL Server databases! 🚀
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCPQL - SQL Server MCP from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcpql)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.