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

Open
#56 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
databases

Research direction

Start in MssqlMcp/dotnet/MssqlMcp/Program.cs at line 37 and compare the existing READONLY handling in MssqlMcp/Node/src/index.ts at line 85. Trace how the Update, Insert, and Drop tools are registered or executed, then verify that setting READONLY to true prevents all three while other tools remain available.

Written by the indexing model from the issue text.

Description

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

Dominant language
HTML
Stars
331
Forks
208
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/SQL-AI-samples

All issues in Azure-Samples/SQL-AI-samples

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.