MCP.so
ログイン

MyFirstMCP - Model Context Protocol Server Example

@iamgauravn

MyFirstMCP - Model Context Protocol Server Example について

This is a simple C# implementation of a Model Context Protocol (MCP) server using .NET 9. The project demonstrates how to create an MCP server with basic functionality including monkey and selling services.

基本情報

カテゴリ

その他

ランタイム

c#

トランスポート

stdio

公開者

iamgauravn

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "weather": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "F:\\MyFirstMCP\\MyFirstMCP.csproj",
        "--no-build"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MyFirstMCP?

MyFirstMCP is a simple C# implementation of a Model Context Protocol (MCP) server using .NET 9. It demonstrates basic MCP functionality including monkey data fetching and selling record management.

How to use MyFirstMCP?

Install the .NET 9.0 SDK, clone the repository, and open it in Visual Studio Code. Restore NuGet packages and run the project. For integration with VS Code, add the provided configuration to your claude_desktop_config.json, updating the project path to match your local environment.

Key features of MyFirstMCP

  • Fetches monkey data from an external API
  • Manages selling records
  • Provides MCP command interfaces via tools
  • Built with .NET 9 and the ModelContextProtocol package

Use cases of MyFirstMCP

  • Learning how to build an MCP server in C#
  • Prototyping services that retrieve external monkey data
  • Managing a simple selling record system through MCP tools
  • Demonstrating the Model Context Protocol with a concrete example

FAQ from MyFirstMCP

What .NET version is required?

.NET 9.0 SDK must be installed to build and run the server.

How do I configure the server with Visual Studio Code?

Add an entry to your claude_desktop_config.json with command: "dotnet", args: ["run", "--project", "<path>", "--no-build"], replacing <path> with your local project file location.

What are the main dependencies?

The project uses Microsoft.Data.Sqlite (9.0.4), Microsoft.Extensions.Hosting (9.0.4), and ModelContextProtocol (0.1.0-preview.4).

What services does the server provide?

A MonkeyService that fetches monkey data from an external API, a SellingService that manages selling records, and MCP tools that expose command interfaces for these services.

Where can I learn more about MCP servers?

Refer to the Microsoft blog post "Building an MCP Server in C#" and the official MCP Server Quick Start Guide, both linked in the README.

コメント

「その他」の他のコンテンツ