MCP.so
ログイン

🧠 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

基本情報

カテゴリ

開発者ツール

ライセンス

MIT license

ランタイム

c#

トランスポート

stdio

公開者

coredevsushant

設定

以下の設定を使って、このサーバーを 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 stdio transport
  • 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.

コメント

「開発者ツール」の他のコンテンツ