HT

hunter-thompson/stardew-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

177 stars 13 forks 品質 45 トレンド 1

Stardew ValleyとAIアシスタントをモデルコンテキストプロトコル(MCP)でつなぐハイブリッドAI制御ゲームMODです。

概要

モデルコンテキストプロトコル(MCP)を介してStardew ValleyとAIアシスタントをつなぐハイブリッドAI制御ゲームモッドです。リアルタイムのゲーム状態同期を通じて、自律型AIエージェントがStardew Valleyを制御・プレイできるようにします。 - Stardew Valley(ゲーム)- SMAPI(Stardew Modding API)v4.0.0+ - .NET 6.0 SDK - Go 1.23+ - GitHub Copilotアクセス(Copilot SDK経由でClaude Sonnet用) これでStardewMCP.dllをコンパイルしてbin/Debug/net6.0/に配置します。 これによりStardew-mcp実行ファイルが生成されます。 1. mod(上記参照)をビルドする 2.mod/StardewMCP/bin/Debug/net6.0/フォルダ全体をStardew Valleyのmodsディレクトリにコピーします: - : %AppData%\StardewValley\Mods\StardewMCP\ - : ~/.config/StardewValley/Mods/StardewMCP/ - : ~/.config/StardewValley/Mods/StardewMCP/ 3.manifest.jsonを同じフォルダにコピーします SMAPI経由でゲームを起動してください。モッドは自動的に ws://localhost:8765/game でWebSocketサーバーを起動します。 このMODはゲームセーブにロードすると有効になります。

概要(AI 翻訳)

モデルコンテキストプロトコル(MCP)を介してStardew ValleyとAIアシスタントをつなぐハイブリッドAI制御ゲームモッドです。リアルタイムのゲーム状態同期を通じて、自律型AIエージェントがStardew Valleyを制御・プレイできるようにします。

建築

前提条件

SMAPI Modのために

  • スターデューバレー(ゲーム)
  • SMAPI(Stardew Modding API)v4.0.0+
  • .NET 6.0 SDK

MCPサーバーのために

  • ゴー 1.23+
  • GitHub Copilotアクセス(Copilot SDK経由でClaude Sonnet用)

建物

1.C#モッドをビルドする

これによりStardewMCP.dllがコンパイルされ、bin/Debug/net6.0/に配置されます。

2.Go MCPサーバーを構築しましょう

これによりstardew-mcp実行ファイルが生成されます。

設置

SMAPI Modをインストールしてください

  1. モッドを組み立てる(上記参照)
  2. mod/StardewMCP/bin/Debug/net6.0/フォルダ全体をStardew Valleyのmodsディレクトリにコピーします:
  • Windows: %AppData%\StardewValley\Mods\StardewMCP\
  • macOS: ~/.config/StardewValley/Mods/StardewMCP/
  • Linux: ~/.config/StardewValley/Mods/StardewMCP/
  1. manifest.jsonを同じフォルダにコピーする

またはSMAPIのmodフォルダ構造を使うこともできます:

使用法

1.SMAPIでスターデューバレーを始める

SMAPI経由でゲームを起動してください。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Stardew Valley MCP Bridge

A hybrid AI-controlled game mod that bridges Stardew Valley with AI assistants via the Model Context Protocol (MCP). Enables autonomous AI agents to control and play Stardew Valley through real-time game state synchronization.

Architecture

┌─────────────────────────────────────────────────────────┐
│ STARDEW VALLEY (Game)                                   │
│   SMAPI Mod (C# .NET 6)                                 │
│     ModEntry → GameStateSerializer                      │
│              → CommandExecutor (w/ Pathfinder)          │
│              → WebSocketServer                          │
└─────────────────────────────────────────────────────────┘
              ↕ ws://localhost:8765/game
┌─────────────────────────────────────────────────────────┐
│ MCP Server (Go)                                         │
│   GameClient: WebSocket connection, state tracking      │
│   StardewAgent: 12 tools + 30 cheats, autonomous loop   │
└─────────────────────────────────────────────────────────┘
              ↕ Copilot SDK
┌─────────────────────────────────────────────────────────┐
│ Claude Sonnet (via GitHub Copilot SDK)                  │
└─────────────────────────────────────────────────────────┘

Prerequisites

For the SMAPI Mod

For the MCP Server

  • Go 1.23+
  • GitHub Copilot access (for Claude Sonnet via Copilot SDK)

Building

1. Build the C# Mod

cd mod/StardewMCP
dotnet build

This compiles StardewMCP.dll and places it in bin/Debug/net6.0/.

2. Build the Go MCP Server

cd mcp-server
go build -o stardew-mcp

This produces the stardew-mcp executable.

Installation

Install the SMAPI Mod

  1. Build the mod (see above)
  2. Copy the entire mod/StardewMCP/bin/Debug/net6.0/ folder to your Stardew Valley mods directory:
    • Windows: %AppData%\StardewValley\Mods\StardewMCP\
    • macOS: ~/.config/StardewValley/Mods/StardewMCP/
    • Linux: ~/.config/StardewValley/Mods/StardewMCP/
  3. Copy manifest.json to the same folder

Or use SMAPI’s mod folder structure:

Mods/
└── StardewMCP/
    ├── manifest.json
    ├── StardewMCP.dll
    └── (other build outputs)

Usage

1. Start Stardew Valley with SMAPI

Launch the game through SMAPI. The mod will automatically start a WebSocket server on ws://localhost:8765/game.

2. Load a Save File

The mod activates once you load into a game save.

3. Run the MCP Server

cd mcp-server
./stardew-mcp                    # Run with default autonomous mode
./stardew-mcp -auto=false        # Connect without starting AI agent
./stardew-mcp -goal "Clear the farm and plant parsnips"
./stardew-mcp -url ws://localhost:8765/game  # Custom WebSocket URL

The server connects to the game via WebSocket and begins the autonomous AI agent loop.

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →