YS

yidhar/stellaris-mcp

Developer tools

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

12 stars 2 forks 品質 80 トレンド 39MIT

Stellarisのネイティブホックブリッジとモデルコンテキストプロトコル(MCP)サーバー

概要

stellaris-mcp は、クラウドスター用のネイティブゲームブリッジとモデルコンテキストプロトコル(MCP)サーバーです。 AIエージェント(Claude Desktop、Cursor、Antigravityなど)と強化学習フレームワークを有効化し、ネイティブの決定、ゼロOCRレイテンシー、フルスレッドの安全性でStellarrisを解析、再生します。 これは非公式の研究と有能なゲームプロジェクトです。 Paradox Interactive が提携または終了していない。 Bridge は、Windows 上で stellaris.exe に DLL インジェクションを介して動作します。 使用前に保存ファイルを常にバックアップします。 システムは3つの第一次設計条件のまわりで設計されます: 1.: ステラリスは外的な記憶操作のために糸安全ではないです。 橋はIDXGISwapChainを借ります:MinHookを経由して存在します。 ステートクエリとコマンドディスパッションは、スレッドセーフなTaskQueueに埋め込まれ、エンジンのメインレンダリングスレッドでのみ処理されます。 2. :ゲームアクションは、乱雑なマウス/キーボードのクリックでシミュレートしません.

概要(AI 翻訳)

[[stellaris-mcp]は、Stellaris(群星)のネイティブゲームブリッジとモデルコンテキストプロトコル(MCP)サーバーです。 AIエージェント(Claude Desktop、Cursor、Antigravityなど)と強化学習フレームワークを有効化し、ネイティブの決定、ゼロOCRレイテンシー、フルスレッドの安全性でStellarrisを解析、再生します。

[!警告] これは非公式の研究と有能なゲームプロジェクトです。 Paradox Interactive が提携または終了していない。 ブリッジは、Windows 上で stellaris.exe]] にプロセス DLL 注射を介して動作します。 使用前に保存ファイルを常にバックアップします。

お問い合わせ

アーキテクチャの概要

システムは3つの第一次設計条件のまわりで設計されます:

  1. 3つの安全及び安定性:Stellarrisは外的な記憶操作のために糸安全ではないです。 橋のホック IDXGISwapChain::Present を MinHook 経由で。 ステートクエリとコマンドディスパッチは、スレッドセーフ[[TaskQueue]に埋め込まれ、エンジンのメインレンダリングスレッドでのみ処理されます。 2.決定ネイティブコマンド: マウス/キーボードのクリックでゲームアクションをシミュレートしません.

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

README

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

Stellaris MCP Bridge

stellaris-mcp is a native game bridge and Model Context Protocol (MCP) server for Stellaris (群星). It enables AI agents (Claude Desktop, Cursor, Antigravity, etc.) and reinforcement learning frameworks to perceive, analyze, and play Stellaris with native determinism, zero OCR latency, and full thread safety.

[!WARNING] This is an unofficial research and agentic gaming project. It is not affiliated with or endorsed by Paradox Interactive. The Bridge operates via in-process DLL injection into stellaris.exe on Windows. Always back up your save files before use.


Architecture Overview

flowchart LR
    subgraph Agent Layer
        C[MCP ClientClaude Desktop / Cursor / AGY]
    end

    subgraph MCP Server Layer
        S[TypeScript MCP Serverstdio transport]
        P[Named Pipe ClientIPC Client]
        S  P
    end

    subgraph Native Bridge Layer
        N[stellaris_bridge.dll]
        H[DXGI SwapChain HookMinHook]
        Q[Main-Thread Task Queue]
        I[Named Pipe IPC Serverstellaris_bridge_pipe]
        M[Domain ManagersTech / Fleets / Leaders / etc.]
    end

    subgraph Game Process
        G[Stellaris Enginestellaris.exe]
    end

    C |JSON-RPC 2.0 / stdio| S
    P |Windows Named Pipe| I
    I -->|Enqueues Task| Q
    H -->|Frame Render Tick| Q
    Q -->|Executes on Main Thread| M
    M |Direct Memory & Commands| G

The system is engineered around three primary design requirements:

  1. Thread Safety & Stability: Stellaris is not thread-safe for external memory manipulation. The bridge hooks IDXGISwapChain::Present via MinHook. State queries and command dispatches are enqueued into a thread-safe TaskQueue and processed exclusively on the engine’s main rendering thread.
  2. Deterministic Native Commands: Game actions are never simulated through clumsy mouse/keyboard clicks. Instead, they are instantiated as native Clauswitz engine command objects (CPauseCommand, CSelectResearchCommand, CHireLeaderCommand, CReinforceFleetCommand, etc.) and dispatched through the engine’s internal command processor.
  3. Progressive Disclosure Architecture: To prevent context window bloat and token exhaustion, game observation is structured into 3 distinct layers:
    • Layer 1: Global Perception (stellaris_get_status): Compact, high-density snapshot covering date, simulation speed, pause state, empire capacity, all 26 resource flows, and summary indicators.
GitHub で README 全文を見る

インストール

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

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

設定

{ "mcpServers": { "stellaris": { "command": "node", "args": [ "C:\\Users\\<you>\\Documents\\Paradox Interactive\\Stellaris\\plugins\\stellaris-mcp\\mcp-server\\dist\\index.js" ] } } }