SQL-AI-samples
SQL-AI-samples copied to clipboard
READONLY mode support is needed in dotnet MCP server as implemented in Node version
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
@stuartpa can you please take a look
#64 Man not just READONLY, but the ReadData.cs tool had zero checks and balances unlike the TS one