Pyramid Solver MCP

Pyramid Solver MCP

Interactive 4x4 sliding puzzle solver with MCP tools to open the widget and solve puzzles via A* or IDA*, plus a browser mode.

Category
Visit Server

README

Pyramid Solver MCP

CI Deploy to Render

An interactive solver for the 4×4 sliding puzzle. It works in two modes:

  • as an MCP App rendered inside ChatGPT;
  • as a regular browser app at the server root.

The project uses React for the widget, the official Model Context Protocol SDK for the server, and a self-contained Vite build that can be returned as an MCP UI resource.

MCP tools

Tool What it does
open_pyramid_solver Opens the blank interactive solver.
solve_pyramid Solves 16 tile positions supplied row by row. Use 0 for the empty slot.

The solver offers fast Weighted A* and optimal IDA* modes.

Run locally

Requirements: Node.js 20 or newer.

npm install
npm run build
npm start

Open http://localhost:8787 for browser mode. The Streamable HTTP MCP endpoint is:

http://localhost:8787/mcp

Test

npm test
npm run build
npm run smoke

You can inspect the MCP server with:

npx @modelcontextprotocol/inspector@latest

Choose Streamable HTTP and connect to http://localhost:8787/mcp.

Deploy to a public URL

The quickest path is the Deploy to Render button at the top of this README:

  1. Sign in to Render and allow it to access this GitHub repository.
  2. Keep the Blueprint settings and choose Deploy Blueprint.
  3. Wait for the service to become Live.
  4. Copy the generated URL, such as https://pyramid-solver-mcp.onrender.com.
  5. Check that <your-url>/health returns {"ok":true}.

The included render.yaml builds the Dockerfile, checks /health, and deploys changes only after GitHub CI passes. Render's free service can take longer to answer after being idle.

Connect it to ChatGPT

ChatGPT requires a public HTTPS MCP endpoint. After deployment:

  1. In ChatGPT, open Settings → Security and login → Developer mode and enable it.
  2. Open Plugins and select the + button.
  3. Enter a name such as Pyramid Solver and a short description.
  4. Set the endpoint to your complete Render URL ending in /mcp, for example https://pyramid-solver-mcp.onrender.com/mcp.
  5. Review the discovered tools and finish adding the plugin.

If tool definitions change after a later deployment, refresh the plugin so ChatGPT loads the new metadata. See OpenAI's Connect your MCP server to ChatGPT guide for the current interface.

Once connected, try Open the Pyramid Solver or provide a board such as:

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

Useful checks:

  • 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

Project structure

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

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured