io.github.jamesmontemagno/monkeymcp
编码与调试by jamesmontemagno
提供多种猴类数据、活动轨迹与位置服务的 MCP server,适用于查询不同猴种信息。
把猴类数据查询、活动轨迹和位置服务统一接入 MCP,做物种检索或研究类应用时省去大量数据整合工作。
什么是 io.github.jamesmontemagno/monkeymcp?
提供多种猴类数据、活动轨迹与位置服务的 MCP server,适用于查询不同猴种信息。
README
Monkey - Model Context Protocol (MCP) Server
Overview
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.
Try it
Quick Install for VS Code & VS
Configure in VS Code with GitHub Copilot, Claude Desktop, or other MCP clients:
Option 1: Remote Azure Functions Server (Recommended)
{
"servers": {
"monkeymcp": {
"url": "https://func-monkeymcp-3t4eixuap5dfm.azurewebsites.net/",
"type": "http"
}
},
"inputs": []
}
Option 2: Docker Container
{
"inputs": [],
"servers": {
"monkeymcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"jamesmontemagno/monkeymcp"
],
"env": {}
}
}
}
Features
Core Components
- MCP Server: Built using the ModelContextProtocol library (version 0.1.0-preview.2)
- Standard I/O Transport: Uses stdio for communication with clients
- Custom Tool Integration: Includes examples of how to create and register MCP tools
Services
-
MonkeyService: A sample service that fetches monkey data from an API endpoint
- Provides methods to retrieve a list of all monkeys or find a specific monkey by name
- Caches results for better performance
-
MonkeyLocationService: A service that generates unique journeys and activities for monkeys
- Creates randomized path points based on monkey species behavior
- Generates species-specific activities (grooming, howling, hot spring bathing, etc.)
- Provides health statistics and movement patterns
- Each journey includes fun activities like eating bananas, cleaning other monkeys, and exploration
Available Tools
The server exposes several tools that can be invoked by clients:
Monkey Tools
- GetMonkeys: Returns a JSON serialized list of all available monkeys
- GetMonkey: Retrieves information about a specific monkey by name
- GetMonkeyJourney: Creates a unique journey path with activities and health stats for a specific monkey
- GetAllMonkeyJourneys: Generates journey paths for all available monkeys
Configuration Options
Hosting Configuration
The server uses Microsoft.Extensions.Hosting (version 9.0.3) which provides:
- Configuration from multiple sources (JSON, environment variables, command line)
- Dependency injection for services
- Logging capabilities
Logging Options
Several logging providers are available:
- Console: Logs to standard output
- Debug: Logs for debugging purposes
- EventLog: Logs to the system event log (when running on Windows)
- EventSource: Provides ETW (Event Tracing for Windows) integration
Getting Started
Prerequisites
- .NET 9.0 SDK or later
- Basic understanding of the Model Context Protocol (MCP)
Running the Server
- Clone this repository
- Navigate to the project directory
- Build the project:
dotnet build - Configure with VS Code or other client:
"monkeyserver": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"/Users/jamesmontemagno/GitHub/TestMCP/MonkeyMCP/MonkeyMCP.csproj"
]
}
Update the path to the project
Extending the Server
To add custom tools:
- Create a class and mark it with the
[McpServerToolType]attribute - Add methods with the
[McpServerTool]attribute - Optionally add
[Description]attributes to provide documentation
Example:
[McpServerToolType]
public static class CustomTool
{
[McpServerTool, Description("Description of what the tool does")]
public static string ToolMethod(string param) => $"Result: {param}";
}
Server-Sent Events Implementation (MonkeyMCPSSE)
Overview
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
Features
- HTTP-based Transport: Runs on
http://localhost:3001by default - Server-Sent Events: Enables real-time, one-way communication from server to client
- ASP.NET Core Integration: Built using ASP.NET Core's web server capabilities
- MCP over HTTP: Implements the Model Context Protocol over HTTP transport
Running the SSE Server
- Navigate to the MonkeyMCPSSE directory
- Build and run the project:
- Connect and run in VS Code or using MCP Inspector
npx @modelcontextprotocol/inspector
Implementation Details
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.
Project Structure
- /MonkeyMCP: Main project directory
- MonkeyService.cs: Implementation of the service to fetch monkey data
- MonkeyTools.cs: MCP tools for accessing monkey data
- Program.cs: Entry point that configures and starts the MCP server
Dependencies
- Microsoft.Extensions.Hosting (9.0.3): Provides hosting infrastructure
- ModelContextProtocol (0.1.0-preview.2): MCP server implementation
- System.Text.Json (9.0.3): JSON serialization/deserialization
License
This project is available under the MIT License.
<!-- mcp-name: io.github.jamesmontemagno/monkeymcp -->MonkeyLocationService Features
The MonkeyLocationService provides rich simulation capabilities:
Monkey Type Configurations
- Baboons: Savanna dwellers with social grooming behaviors and root foraging
- Howler Monkeys: Forest inhabitants known for territorial howling and leaf eating
- Japanese Macaques: Mountain monkeys that enjoy hot springs and snow play
- Proboscis Monkeys: Mangrove specialists that swim and show off their distinctive noses
- Golden Snub-Nosed Monkeys: High-altitude acrobats that huddle for warmth
Journey Components
- Path Points: GPS coordinates showing where the monkey traveled
- Activities: Species-specific behaviors with energy costs/benefits
- Health Stats: Energy, happiness, hunger, social, stress, and health metrics
- Time Tracking: Start/end times and activity durations
- Distance Calculation: Total journey distance using Haversine formula
Unique Activities Include
- Banana finding and eating
- Mutual grooming sessions
- Territory marking
- Hot spring bathing (macaques)
- Swimming (proboscis monkeys)
- Acrobatic displays
- Social interactions
- Foraging and exploration
常见问题
io.github.jamesmontemagno/monkeymcp 是什么?
提供多种猴类数据、活动轨迹与位置服务的 MCP server,适用于查询不同猴种信息。
相关 Skills
前端设计
by anthropics
面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。
✎ 想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。
网页构建器
by anthropics
面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。
✎ 在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。
网页应用测试
by anthropics
用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。
✎ 借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。
相关 MCP Server
GitHub
编辑精选by GitHub
GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。
✎ 这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。
Context7 文档查询
编辑精选by Context7
Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。
✎ 它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。
by tldraw
tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。
✎ 这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。