{
"mcpServers": {
"csharp-mcp-server-template": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP Server Template in .NET/C#
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 79 days ago.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Csharp Mcp Server Template and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A comprehensive .NET template for creating Model Context Protocol (MCP) servers using ASP.NET Core. This template provides a robust foundation for building MCP servers that can integrate with AI assistants and other MCP clients.
The Model Context Protocol (MCP) is an open standard for enabling AI assistants to securely access external resources and tools. MCP servers provide three main capabilities:
Install the template:
dotnet new install ./
Create a new MCP server:
dotnet new mcp-server -n MyCompany.McpServer
cd MyCompany.McpServer
Run the server:
dotnet run
The server will start on http://localhost:5000 by default.
--ServerName: Display name for your MCP server (default: "My MCP Server")--Port: Port number for the server (default: 5000)--Framework: Target framework (default: net8.0)Example:
dotnet new mcp-server -n Acme.WeatherServer --ServerName "Acme Weather Service" --Port 8080
├── .template.config/ # Template configuration
│ └── template.json
├── Extensions/ # Utility extensions
│ └── HttpClientExtensions.cs
├── Tools/ # MCP tools implementation
│ └── ExampleTools.cs
├── Prompts/ # MCP prompts implementation
│ └── ExamplePrompts.cs
├── Resources/ # MCP resources implementation
│ └── ExampleResources.cs
├── Program.cs # Application entry point
├── appsettings.json # Configuration
├── Dockerfile # Docker configuration
└── README.md # This file
Tools are functions that AI assistants can call to perform actions. Here's how to create them:
using System.ComponentModel;
using ModelContextProtocol.Server;
namespace YourNamespace.Tools;
[McpServerToolType]
public class MyTools
{
[McpServerTool, Description("Performs a custom operation")]
public static string MyTool([Description("Input parameter")] string input)
{
// Your tool logic here
return $"Processed: {input}";
}
}
[McpServerTool, Description("Fetches data from an API")]
public static async Task<string> FetchData(
HttpClient httpClient, // Injected dependency
[Description("API endpoint")] string endpoint)
{
var response = await httpClient.GetStringAsync(endpoint);
return response;
}
[McpServerTool, Description("Gets user information")]
public static string GetUserInfo([Description("User ID")] int userId)
{
var user = new { Id = userId, Name = "John Doe", Email = "john@example.com" };
return JsonSerializer.Serialize(user, new JsonSerializerOptions { WriteIndented = true });
}
Prompts are reusable templates for AI interactions:
using Microsoft.Extensions.AI;
using ModelContextProtocol.Server;
namespace YourNamespace.Prompts;
[McpServerPromptType]
public class MyPrompts
{
[McpServerPrompt, Description("Creates a prompt for data analysis")]
public static ChatMessage AnalyzeData(
[Description("Data to analyze")] string data,
[Description("Analysis type")] string analysisType = "summary")
{
return new ChatMessage(ChatRole.User,
$"Please perform a {analysisType} analysis of this data: {data}");
}
}
Resources provide read-only access to data:
using ModelContextProtocol.Protoco
... [View full README on GitHub](https://github.com/TheEagleByte/csharp-mcp-server-template#readme)