Installation¶
There are three ways to install dotnet-mcp-server. Choose the one that fits your setup.
Option A — Global .NET Tool (Recommended)¶
The simplest path. Installs the server as a global CLI command.
Prerequisites: .NET 8 SDK
Run the interactive setup wizard to create your config file:
The wizard writes appsettings.json to your user config directory:
| OS | Config location |
|---|---|
| Windows | %APPDATA%\dotnet-mcp-server\appsettings.json |
| Linux / macOS | ~/.config/dotnet-mcp-server/appsettings.json |
Verify everything is wired up correctly:
To update later:
Option B — Clone and Build¶
For contributors or anyone who wants to run from source.
Prerequisites: .NET 8 SDK, Git
Edit the local config file at src/McpServer/appsettings.json:
{
"FileSystem": {
"AllowedPaths": [
"C:\\Users\\YourName\\Documents",
"C:\\Projects"
]
},
"Sql": {
"Connections": {
"MyDB": {
"ConnectionString": "Server=localhost;Database=MyDB;Trusted_Connection=True;",
"Description": "My local database"
}
}
},
"Http": {
"AllowedHosts": [
"api.github.com",
"jsonplaceholder.typicode.com"
]
}
}
Run the server:
When connecting a client in Option B mode, replace "command": "dotnet-mcp-server" with:
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\dotnet-mcp-server\\src\\McpServer"]
Option C — Docker (No .NET Required)¶
Run the server in a container alongside a demo SQL Server. No .NET SDK needed on your machine.
Prerequisites: Docker Desktop
Step 1: Copy the example config and env files:
Step 2: Edit docker/appsettings.json to set your allowed paths, SQL connections, and HTTP hosts. Edit .env to set a strong SQL_SA_PASSWORD.
Step 3: Build and start both services:
Note
The Docker build runs the full test suite. If any test fails, the build is aborted.
For Docker client config, see the Connecting Clients → Claude Desktop section and use the Docker run pattern shown there.
Manual Testing (No Client Needed)¶
You can test the server from any terminal by sending raw JSON-RPC:
Paste these lines one at a time:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"manual-test","version":"1.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"datetime","arguments":{"action":"now"}}}