Cubeyay

Cube solver API and MCP server

Try the solver yourself

Cubeyay has a free cube solver API and MCP server for developers and AI agents. Send a scrambled 3x3 puzzle cube, as a scramble or as 54 facelets, and get back a short solution, every move in plain words, how to hold the cube, and a link that replays the solve on a 3D cube. There is no key, no account and no limit for normal use, and nothing you send is stored.

How do I call the cube solver API?

Send a GET request with a scramble:

curl "https://cubeyay.com/api/solve?scramble=R%20U%20R'%20U'%20F2%20D"

Or POST JSON with scramble or cube:

curl -X POST https://cubeyay.com/api/solve -H "content-type: application/json" -d '{"scramble": "R U2 F D2 L B"}'

Calling from Python? Python's built-in urllib needs a User-Agent header, or the request is refused (error 1010): use urllib.request.Request(url, headers={'User-Agent': 'my-agent/1.0'}), or use requests or httpx, which work as they are.

The full description is the OpenAPI file at https://cubeyay.com/openapi.json.

What does the API return?

A JSON object with these fields:

Mistakes get a 400 (bad input) or 422 (a cube that cannot exist, such as a twisted corner) with a friendly message.

How do I write a cube as 54 facelets?

Write 9 letters per side in the order U R F D L B (up, right, front, down, left, back). Read each side row by row as you look straight at it: the top with the back side above it, the bottom with the front side above it, and each side face with the top above it. You can use the face letters U R F D L B or any six symbols, such as Y R B W O G; each is read as the side whose centre has it.

A solved cube is UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB.

How do I connect the MCP server?

Add this remote MCP server (Streamable HTTP) to your agent or app:

https://cubeyay.com/mcp

It has three tools:

  1. solve_cube: solve a 3x3 from a scramble or 54 facelets.
  2. explain_moves: explain moves such as R U R' U' in plain words.
  3. beginner_guide: the 7 beginner steps with their algorithms.

Open https://cubeyay.com/?cube= followed by the 54 face letters and #/solve. The solver fills in that cube and plays its solution. It works for people too: share the link with a friend who is stuck. A 4x4 link uses 96 letters.

Common questions

Is the cube solver API free?

Yes. There is no key and no sign-up. Please keep it to normal use; answers are cached, so asking for the same cube twice is cheap.

Does the API store what I send?

No. Requests are answered and forgotten. There are no accounts, cookies or logs of what you send.

Can the API solve a 4x4?

Not yet; the API solves the 3x3. The 4x4 solver runs in your browser on the 4x4 guide and in the app.

Try the solver yourself