mcp-janken-server

mcp-janken-server

0

This project provides a server for playing rock-paper-scissors, supporting the Model Context Protocol (MCP). It allows language models to engage in this classic game by providing random moves or direct play against AI. It supports use in various environments such as Claude Desktop, NPX, and VS Code.

Overview

A server that offers a rock-paper-scissors game compatible with the Model Context Protocol (MCP). It enables LLMs to play rock-paper-scissors or obtain random moves.

Components

  • play: Play a rock-paper-scissors game. Input: player's hand (either "rock", "scissors", or "paper"). The AI selects a random hand and returns the game result.
  • random: The AI outputs a random hand ("rock", "scissors", or "paper").

Resources

  • rock-paper-scissors rules : Explains the rules of the game.

Usage

  • Use in Claude Desktop by adding specific configuration to claude_desktop_config.json.
  • Execute directly with NPX: npx mcp-janken-server.
  • Configure for VS Code by adding settings to the user settings JSON file.

Build and Development

  • Install dependencies with npm install
  • Compile TypeScript with npm run build
  • Watch for changes in development mode with npm run dev
  • Run the server with npm run start

Project Structure

  • src/: Contains server initialization, MCP request handlers, game logic, and type definitions.
  • package.json: Project settings
  • tsconfig.json: TypeScript configuration

License

Provided under the MIT License, allowing for free use, modification, and distribution under MIT terms.