This is a Model Context Protocol (MCP) server implementation built with .NET 9.0. The MCP server provides a communication protocol for facilitating interactions between various components in a model-driven system. This implementation demonstrates how to set up a basic MCP server with custom tools and services.
Configure in VS Code with GitHub Copilot, Claude Desktop, or other MCP clients:
{
"inputs": [],
"servers": {
"monkeymcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"jamesmontemagno/monkeymcp"
],
"env": {}
}
}
}
The server exposes several tools that can be invoked by clients:
The server uses Microsoft.Extensions.Hosting (version 9.0.3) which provides:
Several logging providers are available:
dotnet build
"monkeyserver": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"/Users/jamesmontemagno/GitHub/TestMCP/MonkeyMCP/MonkeyMCP.csproj"
]
}
Update the path to the project
To add custom tools:
[McpServerToolType]
attribute[McpServerTool]
attribute[Description]
attributes to provide documentationExample:
[McpServerToolType]
public static class CustomTool
{
[McpServerTool, Description("Description of what the tool does")]
public static string ToolMethod(string param) => $"Result: {param}";
}
The MonkeyMCPSSE
project provides an alternative implementation of the Monkey MCP server using Server-Sent Events (SSE) over HTTP instead of stdio transport. This implementation runs as a web server, making it ideal for web-based clients and scenarios requiring HTTP-based communication.
Read more about SSE best practices for security here
http://localhost:3001
by defaultnpx @modelcontextprotocol/inspector
The SSE implementation uses ASP.NET Core's built-in web server capabilities while maintaining the same monkey data service and tools as the stdio version. This makes it easy to switch between transport methods while keeping the core functionality intact.
This project is available under the MIT License.
{ "mcpServers": { "monkeymcp": { "command": "docker", "args": [ "run", "-i", "--rm", "jamesmontemagno/monkeymcp" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories