じゃんけんMCPサーバー
Model Context Protocol(MCP)に対応したじゃんけんゲームを提供するサーバーです。このサーバーを使うと、LLMはじゃんけん(グー・チョキ・パー)で遊んだり、ランダムな手を取得したりすることができます。
コンポーネント
ツール
-
play
- じゃんけんをプレイする
- 入力:
hand(string): プレイヤーの手("グー"、"チョキ"、"パー"のいずれか) - AIがランダムな手を選び、じゃんけんの結果を返します
-
random
- AIがランダムな手を出す
- 入力: なし
- AIがランダムに選んだ手("グー"、"チョキ"、"パー"のいずれか)を返します
リソース
- じゃんけんのルール (
janken://rules)- じゃんけんのルールを説明するテキスト
設定
Claude Desktopでの使用
Claude Desktopアプリでこのサーバーを使用するには、claude_desktop_config.jsonの「mcpServers」セクションに以下の設定を追加してください:
{
"mcpServers": {
"janken": {
"command": "npx",
"args": [
"-y",
"mcp-janken-server"
]
}
}
}
NPXでの直接実行
npx mcp-janken-server
VS Codeでの使用
VS Codeでこのサーバーを使用するには、ユーザー設定(JSON)ファイルに以下のJSONブロックを追加します。これはCtrl + Shift + Pを押してPreferences: Open User Settings (JSON)と入力することで行えます。
オプションで、.vscode/mcp.jsonという名前のファイルに追加することもできます。これにより、設定を他の人と共有できます。
{
"mcp": {
"servers": {
"janken": {
"command": "npx",
"args": [
"-y",
"mcp-janken-server"
]
}
}
}
}
ビルドと開発
# 依存関係をインストール
npm install
# TypeScriptをコンパイル
npm run build
# 開発モード(ファイル変更を監視)
npm run dev
# サーバーを実行
npm run start
プロジェクト構造
mcp-janken-server/
├── src/
│ ├── index.ts - サーバー初期化と起動
│ ├── handlers.ts - MCPリクエストハンドラ
│ ├── game.ts - じゃんけんゲームロジック
│ └── types.ts - 型定義と定数
├── index.ts - エントリーポイント
├── package.json - プロジェクト設定
└── tsconfig.json - TypeScript設定
ライセンス
このMCPサーバーはMITライセンスの下で提供されています。これは、MITライセンスの条件に従って、ソフトウェアを自由に使用、変更、および配布できることを意味します。詳細については、プロジェクトリポジトリのLICENSEファイルを参照してください。
Recommend MCP Servers 💡
youtube-mcp-server
A FastMCP server providing unified access to YouTube video/channel/playlist information and management tools for memo agents and automation.
midjourney-mcp
A MCP server implementation for generating images with Midjourney
exia-scenario-generator
exiaノベルゲームエンジン向けのシナリオ生成MCPサーバで、指定お題の琴葉姉妹解説形式シナリオを生成しexiaで表示します
mcp-tic-tac-toe
Play tic-tac-toe against an LLM via MCP
@amurshak/podbeanmcp
An MCP server for managing your podcast through the Podbean API
Unity-MCP
AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.