Skip to main content
Glama
finnestprogrammer111

Pyramid Solver MCP

Pyramid Solver MCP

CI Deploy to Render

4×4 スライディングパズルの対話型ソルバーです。2つのモードで動作します:

  • MCP App として ChatGPT 内でレンダリングされるモード

  • サーバールートでの通常のブラウザアプリとしてのモード

このプロジェクトは、ウィジェットに React、サーバーに公式の Model Context Protocol SDK、そして MCP UI リソースとして返すことができる自己完結型の Vite ビルドを使用しています。

MCP ツール

ツール

機能

open_pyramid_solver

空の対話型ソルバーを開きます。

solve_pyramid

行ごとに指定された16個のタイル位置を解きます。空きスロットには 0 を使用します。

ソルバーは高速な Weighted A* と最適な IDA* のモードを提供します。

Related MCP server: boxoban-mcp

ローカルでの実行

要件: Node.js 20 以降。

npm install
npm run build
npm start

ブラウザモードでは http://localhost:8787 を開きます。Streamable HTTP MCP エンドポイントは次のとおりです:

http://localhost:8787/mcp

テスト

npm test
npm run build
npm run smoke

MCP サーバーは次のコマンドで検査できます:

npx @modelcontextprotocol/inspector@latest

Streamable HTTP を選択し、http://localhost:8787/mcp に接続します。

公開 URL へのデプロイ

最も簡単な方法は、この README の上部にある Deploy to Render ボタンです:

  1. Render にサインインし、この GitHub リポジトリへのアクセスを許可します。

  2. Blueprint 設定を維持し、Deploy Blueprint を選択します。

  3. サービスが Live になるまで待ちます。

  4. 生成された URL(例: https://pyramid-solver-mcp.onrender.com)をコピーします。

  5. <your-url>/health が {"ok":true} を返すことを確認します。

同梱の render.yaml は Dockerfile をビルドし、/health をチェックし、GitHub CI が成功した後にのみ変更をデプロイします。Render の無料サービスは、アイドル状態の後は応答に時間がかかることがあります。

ChatGPT への接続

ChatGPT には公開 HTTPS MCP エンドポイントが必要です。デプロイ後:

  1. ChatGPT で Settings → Security and login → Developer mode を開き、有効にします。

  2. Plugins を開き、+ ボタンを選択します。

  3. Pyramid Solver などの名前と短い説明を入力します。

  4. エンドポイントを /mcp で終わる完全な Render URL に設定します(例: https://pyramid-solver-mcp.onrender.com/mcp)。

  5. 検出されたツールを確認し、プラグインの追加を完了します。

後続のデプロイでツール定義が変更された場合は、プラグインを更新して ChatGPT が新しいメタデータを読み込むようにします。現在のインターフェースについては、OpenAI の Connect your MCP server to ChatGPT ガイドを参照してください。

接続後、Open the Pyramid Solver を試すか、次のようなボードを指定します:

1 2 3 4
5 6 7 8
9 10 11 12
13 14 0 15

便利なチェック:

  • Open the Pyramid Solver.

  • Solve this board with A*: 1 2 3 4 / 5 6 7 8 / 9 10 11 12 / 13 14 0 15.

  • Solve this board optimally with IDA*: 1 2 3 4 / 5 6 7 8 / 9 10 11 12 / 13 14 0 15.

Docker

docker build -t pyramid-solver-mcp .
docker run --rm -p 8787:8787 pyramid-solver-mcp

プロジェクト構造

src/PyramidSolver.jsx  React interface
src/solver.js           A* and IDA* solver engine
src/mcpBridge.js        MCP Apps UI bridge
server.js               Streamable HTTP MCP server
test/solver.test.js     Solver tests

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to solve Rubik's Cube puzzles through systematic manipulation with standard cube notation moves. Features real-time 3D visualization and interactive controls for tracking solving progress.
    4
    34 npm
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to load and solve Boxoban puzzles by providing tools to get game state, list valid moves, and take actions.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Standalone browser automation MCP server supporting both BrowserOS and standard Chrome. Enables 16 MCP tools for browser control including navigation, interaction, and content extraction.
    13 npm
    -