io.github.jamesmontemagno/monkeymcp

MCP server providing monkey data, journeys, and location services for various monkey species.

123MITdevtools

Install

Config snippet generator goes here (5 client tabs)

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

[![Install Remote Server in VS Code](https://img.shields.io/badge/VS_Code-Install_Remote_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=monkeymcp&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Ffunc-monkeymcp-3t4eixuap5dfm.azurewebsites.net%2F%22%7D) [![Install Remote Server in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Remote_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=monkeymcp&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Ffunc-monkeymcp-3t4eixuap5dfm.azurewebsites.net%2F%22%7D&quality=insiders)

[![Install Docker Container in VS Code](https://img.shields.io/badge/VS_Code-Install_Docker_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=monkeymcp&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22jamesmontemagno%2Fmonkeymcp%22%5D%2C%22env%22%3A%7B%7D%7D) [![Install Docker Container in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Docker_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=monkeymcp&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22jamesmontemagno%2Fmonkeymcp%22%5D%2C%22env%22%3A%7B%7D%7D&quality=insiders)

[![Install Remote Server in Visual Studio](https://img.shields.io/badge/Visual_Studio-Install_Remote_Server-C16FDE?logo=visualstudio&logoColor=white)](https://vs-open.link/mcp-install?%7B%22name%22%3A%22monkeymcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Ffunc-monkeymcp-3t4eixuap5dfm.azurewebsites.net%2F%22%7D) [![Install Docker Container in Visual Studio](https://img.shields.io/badge/Visual_Studio-Install_Docker_Server-C16FDE?logo=visualstudio&logoColor=white)](https://vs-open.link/mcp-install?%7B%22name%22%3A%22monkeymcp%22%2C%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22jamesmontemagno%2Fmonkeymcp%22%5D%2C%22env%22%3A%7B%7D%7D)

Configure in VS Code with GitHub Copilot, Claude Desktop, or other MCP clients:

### Option 1: Remote Azure Functions Server (Recommended)
```json
{
    "servers": {
        "monkeymcp": {
            "url": "https://func-monkeymcp-3t4eixuap5dfm.azurewebsites.net/",
            "type": "http"
        }
    },
    "inputs": []
}
```

### Option 2: Docker Container
```json
{
    "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 a