iamgauravn/mcp_server
If you are the rightful owner of mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is a simple C# implementation of a Model Context Protocol (MCP) server using .NET 9.
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
- Clone the repository
- Open the project in Visual Studio Code
- Restore NuGet packages
- Run the project
References
For more information about Model Context Protocol:
Dependencies
- Microsoft.Data.Sqlite (9.0.4)
- Microsoft.Extensions.Hosting (9.0.4)
- ModelContextProtocol (0.1.0-preview.7)