SQL-AI-samples icon indicating copy to clipboard operation
SQL-AI-samples copied to clipboard

READONLY mode support is needed in dotnet MCP server as implemented in Node version

Open brano opened this issue 6 months ago • 2 comments

Could you please implement support for READONLY mode in dotnet version? So that when env configuration is configured with "READONLY": "true" MCP server will not allow to execute Update/Insert/Drop tools.

"env": {
    "CONNECTION_STRING": "Server=localdev;Database=eCommerce;Integrated Security=True;TrustServerCertificate=True;Encrypt=False",
    "READONLY": "true"
}

dotnet version: https://github.com/Azure-Samples/SQL-AI-samples/blob/5a4ba3f8d62aa5683a497f16e5ff4c26cc600ee0/MssqlMcp/dotnet/MssqlMcp/Program.cs#L37

Node version: https://github.com/Azure-Samples/SQL-AI-samples/blob/5a4ba3f8d62aa5683a497f16e5ff4c26cc600ee0/MssqlMcp/Node/src/index.ts#L85

brano avatar Jul 03 '25 14:07 brano

@stuartpa can you please take a look

AV25242 avatar Jul 07 '25 19:07 AV25242

#64 Man not just READONLY, but the ReadData.cs tool had zero checks and balances unlike the TS one

sitefinitysteve avatar Aug 16 '25 04:08 sitefinitysteve