A fully featured C# implementation of Anthropic's Model Context Protocol (MCP)
{
"mcpServers": {
"mcp-net": {
"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.
A fully featured C# implementation of Anthropic's Model Context Protocol (MCP)
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 21 days ago. 39 stars.
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.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Mcp.Net and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Mcp.Net is a .NET implementation of the Model Context Protocol (MCP) - a standardized way for apps to talk to AI models and execute tools. Think of it as the "HTTP of AI tool usage" - a clean, consistent way for your app to give AI models the ability to:
⚠️ Pre-1.0 Notice
This is version 0.9.0 - the core is stable but some features are still in development. See Current Status for details.
Experience MCP (with web-search, scraping, twilio, various demo tools) with OpenAI or Anthropic models in just two steps:
# 1. Start the server with demo tools
dotnet run --project Mcp.Net.Examples.SimpleServer/Mcp.Net.Examples.SimpleServer.csproj
# 2. In a new terminal, run the LLM chat app (requires OpenAI or Anthropic API key)
dotnet run --project Mcp.Net.LLM/Mcp.Net.LLM.csproj
See the LLM demo documentation for more details.
# For building a server (the thing that provides tools)
dotnet add package Mcp.Net.Server
# For building a client (the thing that talks to AI models)
dotnet add package Mcp.Net.Client
# Terminal 1 — start the demo server (SSE on http://localhost:5000)
dotnet run --project Mcp.Net.Examples.SimpleServer/Mcp.Net.Examples.SimpleServer.csproj
# Terminal 2 — launch the client (performs dynamic registration + PKCE)
dotnet run --project Mcp.Net.Examples.SimpleClient -- --url http://localhost:5000 --auth-mode pkce
ℹ️ The first SSE GET returns
401 Unauthorizedby design. The client follows theWWW-Authenticatechallenge, registers itself at/oauth/register, completes the PKCE handshake, and reconnects with a bearer token. Watch the logs to see resources, prompts, and tools (including the new elicitation flow) being exercised end-to-end. When the Warhammer inquisitor tool runs you’ll be prompted to accept/decline/cancel and optionally override fields via the console handler in the sample client.
The client advertises the elicitation capability only after you register a handler. Call
SetElicitationHandler (or the builder helper) before Initialize:
var client = new McpClientBuilder()
.UseSseTransport(serverUrl)
.WithElicitationHandler(async (context, ct) =>
{
// Render UI, validate against context.RequestedSchema, then respond
return ElicitationClientResponse.Decline();
})
.Build();
await client.Initialize();
Handlers can accept, decline, or cancel and receive strongly typed schema details via
ElicitationRequestContext. The SimpleClient console demo in Mcp.Net.Examples.SimpleClient
shows a full end-to-end implementation.
using Mcp.Net.Core.Attributes;
using Mcp.Net.Server;
using Mcp.Net.Server.ConnectionManagers;
using Mcp.Net.Server.Extensions;
using Microsoft.Extensions.Logging;
// 1. Create a simple stdio server
var server = new McpServer(
new ServerInfo { Name = "QuickStart Server", Version = "1.0" },
new InMemoryConnectionManager(new LoggerFactory())
);
// 2. Define tools using simple attributes a
... [View full README on GitHub](https://github.com/SamFold/Mcp.Net#readme)