MCP.so
Sign In

MyFirstMCP - Model Context Protocol Server Example

@iamgauravn

About 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.

Basic information

Category

Other

Runtime

c#

Transports

stdio

Publisher

iamgauravn

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

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.

Comments

More Other MCP servers