This repository contains a template for creating a Model Context Protocol (MCP) applications in .NET.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add model-context-protocol-net-template -- npx @modelcontextprotocol/inspector -e DOTNET_ENVIRONMENT=Production dotnet '$(PWD)/Artefacts/MyAwesomeMCPServer.dll'~/.codex/config.toml
[mcp_servers.model-context-protocol-net-template]
command = "npx"
args = ["@modelcontextprotocol/inspector", "-e", "DOTNET_ENVIRONMENT=Production", "dotnet", "$(PWD)/Artefacts/MyAwesomeMCPServer.dll"]
# codex mcp add model-context-protocol-net-template -- npx @modelcontextprotocol/inspector -e DOTNET_ENVIRONMENT=Production dotnet '$(PWD)/Artefacts/MyAwesomeMCPServer.dll'~/.cursor/mcp.json
{
"mcpServers": {
"model-context-protocol-net-template": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}.vscode/mcp.json
{
"servers": {
"model-context-protocol-net-template": {
"type": "stdio",
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"model-context-protocol-net-template": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"model-context-protocol-net-template": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"model-context-protocol-net-template": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}