🧠 MCP Web API Example with .NET
@coredevsushant
关于 🧠 MCP Web API Example with .NET
Integrate Claude AI with .NET Web API using Model Context Protocol (MCP). This example shows how to connect a .NET MCP server and ASP.NET Core Web API for real-time data exchange. Ideal for developers building Claude AI plugins, assistants, or chatbots with live backend support v
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"weather": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"D:/MCP.example/MCP.Server",
"--no-build"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is 🧠 MCP Web API Example with .NET?
This repository provides a .NET-based MCP Server and Web API integration that demonstrates how to build and connect an API to Claude (Anthropic) using the Model Context Protocol (MCP) via stdio. It consists of two projects: MCP.Server, which acts as the bridge between Claude and a backend, and MCP.WebApi, a simple ASP.NET Core Web API that exposes weather forecast data. This starter template is intended for developers who want to create Claude-interactive backends with .NET.
How to use 🧠 MCP Web API Example with .NET?
Clone the repository, run MCP.WebApi on https://localhost:44394/, and build MCP.Server. Then configure Claude Desktop’s claude_desktop_config.json with a weather MCP server entry that uses dotnet run --project <path-to-MCP.Server>. Restart Claude Desktop and test by asking “Get weather forecast”. Additional commands like creating new weather entries via POST can also be tested.
Key features of 🧠 MCP Web API Example with .NET
- Two .NET 8 projects: MCP.Server (bridge) and MCP.WebApi (ASP.NET Core)
- Demonstrates MCP integration with Claude via
stdiotransport - Exposes weather forecast data through a simple Web API
- Supports GET and POST operations (extendable to PUT, etc.)
- Uses HTTP communication between MCP.Server and MCP.WebApi
- Serves as a starter template for custom Claude-interactive backends
Use cases of 🧠 MCP Web API Example with .NET
- Building Claude‑interactive .NET backends that respond to natural language queries
- Learning how to set up and configure an MCP server for Claude Desktop
- Prototyping an API that Claude can call for weather data management
- Extending the API with CRUD operations and testing them via Claude’s interface
FAQ from 🧠 MCP Web API Example with .NET
What are the requirements to run this server?
You need the .NET 8 SDK and the Claude Desktop app from Anthropic. A Git client and CLI are also required for cloning and running the projects.
How do I configure Claude Desktop to use the MCP server?
Edit the claude_desktop_config.json file (accessible via File → Settings → Developer → Edit Config) and add a weather entry under mcpServers with "type": "stdio", "command": "dotnet", and "args": ["run", "--project", "full path to MCP.Server", "--no-build"]. Restart Claude Desktop afterward.
Can I extend the Web API with additional endpoints?
Yes. You can add POST, PUT, or other HTTP methods to MCP.WebApi. If those endpoints are described in the OpenAPI spec, Claude will automatically discover and use them.
What transport does the MCP server use?
The MCP server communicates with Claude Desktop via stdio (standard input/output) and with the Web API over HTTP.
Is this only a demonstration or can I use it for production?
The README presents it as a starter template and example. It is not described as production‑ready but provides a foundation to build upon for your own Claude‑interactive backends.
开发工具 分类下的更多 MCP 服务器
test
prysmaticlabsGo implementation of Ethereum proof of stake

Sentry
modelcontextprotocolModel Context Protocol Servers
Deepwiki MCP Server
regenrek📖 MCP server for fetch deepwiki.com and get latest knowledge in Cursor and other Code Editors
Smithery CLI
smithery-aiInstall, manage and develop MCP servers and skills for agents
FastAPI-MCP
tadata-orgExpose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
评论