AI Usage
MCP-Go-MSSQL is designed so that Claude and other AI assistants can work with production databases safely.
Recommended AI-Safe configuration
Section titled “Recommended AI-Safe configuration”MSSQL_READ_ONLY=trueMSSQL_WHITELIST_TABLES=temp_ai,v_temp_iaThis configuration allows the AI to:
- Read any table in the database
- Write only to
temp_aiandv_temp_ia - All other tables remain protected from modification
Typical workflow
Section titled “Typical workflow”- The AI queries production data with
query_database - Processes and transforms the data
- Writes results to whitelisted temporary tables
- The user reviews and promotes the data as appropriate
Temporary tables for AI
Section titled “Temporary tables for AI”Create dedicated tables for the AI to work with:
CREATE TABLE temp_ai ( id INT IDENTITY PRIMARY KEY, created_at DATETIME DEFAULT GETDATE(), data NVARCHAR(MAX));Add them to the whitelist:
MSSQL_WHITELIST_TABLES=temp_aiError protection
Section titled “Error protection”The read-only + whitelist mode protects against:
- Accidental deletion of production data
- Modification of critical tables
- SQL injection attempting to access unauthorized tables via JOIN