Skip to main content
Glama
bellsanct
by bellsanct
README.md
# MCP放置型ダンジョンゲーム

MCP (Model Context Protocol) サーバーとして実装された放置型ダンジョンクローラーゲームです。ダンジョンを探索し、装備を集め、強くなりましょう - すべて会話を通じて!

## 特徴

- **装備システム**: 4つの装備スロット(武器、盾、防具、アクセサリ)と4つのステータス(攻撃力、防御力、速度、運)
- **ダンジョン探索**: 時間ベースのダンジョン攻略と自動戦闘
- **ドロップシステム**: 様々なレアリティの装備ドロップ(コモン、レア、エピック、レジェンダリ)
- **イベントシステム**: 落とし穴、毒の罠、宝箱などのランダムイベント
- **バトルログ**: 詳細な戦闘記録と統計
- **暗号化セーブデータ**: ローカルに暗号化されたゲーム進行状況
- **サーバー不要**: 完全クライアントサイドで動作

## インストール

```bash
npm install
npm run build
```

## Claude Desktopでの使用方法

Claude Desktopの設定ファイルに以下を追加してください:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "idle-game": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-idle-game/dist/index.js"]
    }
  }
}
```

## 始め方

1. **ゲームの初期化**:
   ```
   パスワード"mysecretpass"で新しいゲームを初期化して
   ```

2. **キャラクター作成**:
   ```
   "勇者"という名前でプレイヤーを作成して
   ```

3. **ステータス確認**:
   ```
   ステータスを見せて
   ```

4. **ダンジョン探索**:
   ```
   利用可能なダンジョンを教えて
   初心者の洞窟を探索開始
   進行状況を確認して
   ```

5. **装備管理**:
   ```
   インベントリを見せて
   鋼の剣を装備して
   ```

## ゲームの仕組み

### ステータス
- **攻撃力**: 戦闘で与えるダメージ
- **防御力**: 受けるダメージを軽減
- **速度**: ダンジョン完了時間を短縮(1ポイントにつき2%、最大50%短縮)
- **運**: クリティカルヒット率、回避率、ドロップ率上昇

### 戦闘
- 自動ターン制戦闘シミュレーション
- クリティカルヒットは2倍ダメージ
- 防御力で受けるダメージを軽減(ランダム要素あり)
- 運は攻撃面(クリティカル)と防御面(回避)の両方に影響

### イベントシステム
- 各階層でランダムイベントが発生
- ポジティブイベント: 宝箱、癒しの泉、隠し通路
- ネガティブイベント: 落とし穴、毒の罠、奇襲攻撃
- 運が高いほど良いイベントが起きやすい

### ドロップ
- 敵ごとに基本ドロップ率設定
- 運がドロップ確率とレアリティに影響
- ボス敵は高いドロップ率
- 装備レアリティがステータスに影響

## セーブデータの保存場所

ゲームデータは以下に保存されます:
- **macOS/Linux**: `~/.mcp-idle-game/`
- **Windows**: `C:\Users\<username>\.mcp-idle-game\`

ファイル:
- `player_data.enc`: 暗号化されたゲームセーブ
- `key.enc`: 暗号化キーデータ

## 開発

```bash
# 開発時の自動ビルド
npm run watch

# ビルド
npm run build

# 直接実行
npm start
```

## セキュリティについて

セーブデータはAES-256-GCMで暗号化され、パスワード派生キー(PBKDF2、100,000回反復)を使用します。パスワードは保存されないため、必ず覚えておいてください!

## ライセンス

MIT

TDQS

B3.4/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have distinct purposes, but there is some overlap between equip_item/equip_holding_item and unequip_item/unequip_holding_item, which could cause confusion about when to use each. However, descriptions clarify that 'holding items' are consumables like herbs and charms, while 'items' are equipment, helping to differentiate them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, such as buy_item, create_player, and view_inventory. There are no deviations in naming conventions, making the set predictable and easy to understand.

Tool Count5/5

With 15 tools, the count is well-suited for a dungeon game server, covering core aspects like character management, dungeon exploration, inventory, and shop interactions without being overwhelming or too sparse.

Completeness4/5

The tool set provides comprehensive coverage for a dungeon game, including initialization, character creation, dungeon selection, exploration, inventory management, and shop interactions. A minor gap is the lack of a tool for saving or loading game progress explicitly, but init_game handles save file creation, and other tools imply ongoing state management.

Maintenance

ActivityInactive
ResponsivenessNo issues