← Back to search

io.github.daedalus/mcp-server-mssql

daedalus Scanned 18d ago

MCP server for Microsoft SQL Server using mssql-python

B
88 / 100

Versions

0.1.0latest
first seen May 19, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 21

connect_tool
annotations: none low

Connect to Microsoft SQL Server using the provided connection string. Args: connection_string: SQL Server connection string in semicolon-delimited key=value format (e.g., "SERVER=tcp:localhost;DATABASE=mydb;Authentication=ActiveDirectoryInteractive;Encrypt=yes;") Returns: Dictionary containing connection_id and server info. The connection_id should be used for subsequent operations. Example: >>> connect_tool("SERVER=localhost;DATABASE=TestDB;UID=sa;PWD=password;") {"connection_id": "abc123", "server_name": "localhost", "database": "TestDB"}

connection_string str
close_connection
annotations: none low

Close an existing database connection. Args: connection_id: The ID returned from connect_tool Returns: Dictionary with status confirmation. Example: >>> close_connection("abc123") {"status": "closed", "connection_id": "abc123"}

connection_id str
list_connections
annotations: none low

List all active connections. Returns: List of connection info dictionaries. Example: >>> list_connections() [{"connection_id": "abc123", "server": "localhost", "database": "TestDB"}]

execute_query
annotations: none low

Execute a SQL query and return results. Args: connection_id: The ID returned from connect_tool sql: SQL statement to execute params: Optional list of parameters for parameterized query Returns: List of row dictionaries. Example: >>> execute_query("abc123", "SELECT * FROM users WHERE active = 1") [{"id": 1, "name": "John", "active": true}, {"id": 2, "name": "Jane", "active": true}]

sql str params string connection_id str
execute_scalar
annotations: none low

Execute a SQL query and return a single value. Args: connection_id: The ID returned from connect_tool sql: SQL statement that returns a single value Returns: The single value from the query result. Example: >>> execute_scalar("abc123", "SELECT COUNT(*) FROM users") 42

sql str connection_id str
fetch_results
annotations: none low

Fetch results from an existing cursor. Args: connection_id: The ID returned from connect_tool cursor_id: The cursor ID from execute_query mode: Fetch mode - "one", "many", or "all" (default: "all") size: Number of rows for "many" mode Returns: List of row dictionaries. Example: >>> fetch_results("abc123", "cursor123", mode="many", size=10) [{"id": 1, "name": "John"}, {"id": 2, "name": "Jane"}]

mode str size string cursor_id str connection_id str
call_procedure
annotations: none low

Call a stored procedure. Args: connection_id: The ID returned from connect_tool procedure_name: Name of the stored procedure params: Optional list of parameters Returns: Dictionary with procedure results. Example: >>> call_procedure("abc123", "sp_GetUsers", [1]) {"result": [{"id": 1, "name": "John"}]}

params string connection_id str procedure_name str
commit
annotations: none low

Commit the current transaction. Args: connection_id: The ID returned from connect_tool Returns: Dictionary with status confirmation. Example: >>> commit("abc123") {"status": "committed", "connection_id": "abc123"}

connection_id str
rollback
annotations: none low

Rollback the current transaction. Args: connection_id: The ID returned from connect_tool Returns: Dictionary with status confirmation. Example: >>> rollback("abc123") {"status": "rolled_back", "connection_id": "abc123"}

connection_id str
set_autocommit
annotations: none low

Set autocommit mode for a connection. Args: connection_id: The ID returned from connect_tool enabled: Whether to enable autocommit Returns: Dictionary with status confirmation. Example: >>> set_autocommit("abc123", True) {"status": "set", "autocommit": true}

enabled bool connection_id str
bulk_copy
annotations: none low

Perform a bulk copy operation to load data into a table. Args: connection_id: The ID returned from connect_tool table_name: Target table name data: List of tuples or lists representing rows to insert column_mappings: Optional list of column mappings batch_size: Batch size for bulk copy (0 = all at once) keep_identity: Whether to keep identity values check_constraints: Whether to check constraints keep_nulls: Whether to keep NULL values fire_triggers: Whether to fire triggers Returns: Dictionary with bulk copy result. Example: >>> bulk_copy("abc123", "users", [("John", 25), ("Jane", 30)]) {"status": "completed", "rows_copied": 2}

data list batch_size int keep_nulls bool table_name str connection_id str fire_triggers bool keep_identity bool column_mappings string check_constraints bool
get_tables
annotations: none low

Get list of tables from the database. Args: connection_id: The ID returned from connect_tool catalog: Optional catalog filter schema: Optional schema filter Returns: List of table information dictionaries. Example: >>> get_tables("abc123") [{"table_name": "users", "table_type": "TABLE"}, {"table_name": "orders", "table_type": "TABLE"}]

schema string catalog string connection_id str
get_columns
annotations: none low

Get list of columns for a table. Args: connection_id: The ID returned from connect_tool table_name: Name of the table catalog: Optional catalog filter schema: Optional schema filter Returns: List of column information dictionaries. Example: >>> get_columns("abc123", "users") [{"column_name": "id", "data_type": "int", "is_nullable": false}, {"column_name": "name", "data_type": "varchar", "is_nullable": true}]

schema string catalog string table_name str connection_id str
get_procedures
annotations: none low

Get list of stored procedures from the database. Args: connection_id: The ID returned from connect_tool catalog: Optional catalog filter schema: Optional schema filter Returns: List of procedure information dictionaries. Example: >>> get_procedures("abc123") [{"procedure_name": "sp_GetUsers", "procedure_schema": "dbo"}]

schema string catalog string connection_id str
get_foreign_keys
annotations: none low

Get foreign keys for a table. Args: connection_id: The ID returned from connect_tool table_name: Name of the table catalog: Optional catalog filter schema: Optional schema filter Returns: List of foreign key information dictionaries. Example: >>> get_foreign_keys("abc123", "orders") [{"foreign_key_name": "FK_orders_users", "column_name": "user_id", "referenced_table": "users", "referenced_column": "id"}]

schema string catalog string table_name str connection_id str
get_primary_keys
annotations: none low

Get primary keys for a table. Args: connection_id: The ID returned from connect_tool table_name: Name of the table catalog: Optional catalog filter schema: Optional schema filter Returns: List of primary key information dictionaries. Example: >>> get_primary_keys("abc123", "users") [{"column_name": "id", "key_name": "PK_users"}]

schema string catalog string table_name str connection_id str
parse_connection_string
annotations: none low

Parse a SQL Server connection string into components. Args: connection_string: SQL Server connection string Returns: Dictionary of connection string components. Example: >>> parse_connection_string("SERVER=localhost;DATABASE=TestDB;UID=sa;") {"SERVER": "localhost", "DATABASE": "TestDB", "UID": "sa"}

connection_string str
build_connection_string
annotations: none low

Build a SQL Server connection string from components. Args: server: Server hostname or IP address database: Database name user: Username for SQL authentication password: Password for SQL authentication driver: ODBC driver name (default: ODBC Driver 18 for SQL Server) encrypt: Enable encryption (yes/no) trust_cert: Trust server certificate (yes/no) authentication: Authentication method Returns: Connection string. Example: >>> build_connection_string(server="localhost", database="TestDB") "SERVER=localhost;DATABASE=TestDB;DRIVER={ODBC Driver 18 for SQL Server};"

user string driver string server string encrypt string database string password string trust_cert string authentication string
set_connection_timeout
annotations: none low

Set the connection timeout for a connection. Args: connection_id: The ID returned from connect_tool timeout: Timeout in seconds Returns: Dictionary with status confirmation. Example: >>> set_connection_timeout("abc123", 30) {"status": "set", "timeout": 30}

timeout int connection_id str
set_login_timeout
annotations: none low

Set the login timeout for a connection. Args: connection_id: The ID returned from connect_tool timeout: Timeout in seconds Returns: Dictionary with status confirmation. Example: >>> set_login_timeout("abc123", 15) {"status": "set", "timeout": 15}

timeout int connection_id str
get_connection_info
annotations: none low

Get information about a connection. Args: connection_id: The ID returned from connect_tool Returns: Dictionary with connection information. Example: >>> get_connection_info("abc123") {"server_name": "localhost", "database": "TestDB", "driver_name": "ODBC Driver 18"}

connection_id str

Permissions 0

No permissions indexed yet.

Scan Findings 47

low
Tool 'connect_tool' has no annotations annotation_checker · 100%
low
Tool 'close_connection' has no annotations annotation_checker · 100%
low
Tool 'list_connections' has no annotations annotation_checker · 100%
low
Tool 'execute_query' has no annotations annotation_checker · 100%
low
Tool 'execute_scalar' has no annotations annotation_checker · 100%
low
Tool 'fetch_results' has no annotations annotation_checker · 100%
low
Tool 'call_procedure' has no annotations annotation_checker · 100%
low
Tool 'commit' has no annotations annotation_checker · 100%
low
Tool 'rollback' has no annotations annotation_checker · 100%
low
Tool 'bulk_copy' has no annotations annotation_checker · 100%
low
Tool 'get_tables' has no annotations annotation_checker · 100%
low
Tool 'get_columns' has no annotations annotation_checker · 100%
low
Tool 'get_procedures' has no annotations annotation_checker · 100%
low
Tool 'get_foreign_keys' has no annotations annotation_checker · 100%
low
Tool 'get_primary_keys' has no annotations annotation_checker · 100%
low
Tool 'parse_connection_string' has no annotations annotation_checker · 100%
low
Tool 'build_connection_string' has no annotations annotation_checker · 100%
low
Tool 'set_connection_timeout' has no annotations annotation_checker · 100%
low
Tool 'set_login_timeout' has no annotations annotation_checker · 100%
low
Tool 'set_autocommit' has no annotations annotation_checker · 100%
low
Tool 'get_connection_info' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: connect_tool manifest_parser · 90%
info
Tool: close_connection manifest_parser · 90%
info
Tool: list_connections manifest_parser · 90%
info
Tool: execute_query manifest_parser · 90%
info
Tool: execute_scalar manifest_parser · 90%
info
Tool: fetch_results manifest_parser · 90%
info
Tool: call_procedure manifest_parser · 90%
info
Tool: commit manifest_parser · 90%
info
Tool: rollback manifest_parser · 90%
info
Tool: bulk_copy manifest_parser · 90%
info
Tool: get_tables manifest_parser · 90%
info
Tool: get_columns manifest_parser · 90%
info
Tool: get_procedures manifest_parser · 90%
info
Tool: get_foreign_keys manifest_parser · 90%
info
Tool: get_primary_keys manifest_parser · 90%
info
Tool: parse_connection_string manifest_parser · 90%
info
Tool: build_connection_string manifest_parser · 90%
info
Tool: set_connection_timeout manifest_parser · 90%
info
Tool: set_login_timeout manifest_parser · 90%
info
Tool: set_autocommit manifest_parser · 90%
info
Tool: get_connection_info manifest_parser · 90%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
info
No dependency files found for SBOM generation sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%