MyFirstMCP - Model Context Protocol Server Example

by iamgauravn

1 stars
116 downloads
Not rated
GitHub

About

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.

Details

Author
iamgauravn
GitHub stars
1
Downloads
116
Categories
Other

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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MyFirstMCP - Model Context Protocol Server Example
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "myfirstmcp - model context protocol server example": {
            "weather": {
                "command": "dotnet",
                "args": [
                    "run",
                    "--project",
                    "F:\\MyFirstMCP\\MyFirstMCP.csproj",
                    "--no-build"
                ]
            }
        }
    }
}

McpServers

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

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.

Prerequisites

- .NET 9.0 SDK
- Visual Studio Code or Visual Studio 2022

Project Structure

MyFirstMCP/
├── Model/
│   └── Selling.cs
├── Service/
│   ├── MonkeyService.cs
│   └── SellingService.cs
├── Tools/
│   ├── EchoTool.cs
│   ├── MonkeyTools.cs
│   └── SellingTool.cs
└── Program.cs

Configuration

To use this MCP server with Visual Studio Code, add the following configuration to your ./claude/claude_desktop_config.json:

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

Make sure to update the project path to match your local environment.

Features

- MonkeyService: Fetches monkey data from an external API
- SellingService: Manages selling records
- MCP Tools: Provides command interfaces for the services

Getting Started

1. Clone the repository
2. Open the project in Visual Studio Code
3. Restore NuGet packages
4. Run the project

References

For more information about Model Context Protocol:

- Building an MCP Server in C#
- MCP Server Quick Start Guide

Dependencies

- Microsoft.Data.Sqlite (9.0.4)
- Microsoft.Extensions.Hosting (9.0.4)
- ModelContextProtocol (0.1.0-preview.7)

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.