An MCP server that enables coordination of agents through shared finite state machines (puzzles) where clients can create, monitor, and trigger state transitions of stateful resources.
An MCP server that hosts finite state machines as dynamic resources that clients can subscribe to and be updated when their state changes.
Collaboration and coordination are related but different problems. Collaboration is good for non-trivial yet relatively simple tasks. To tackle long horizon efforts, puzzlebox solves for coordination.
Marshalling multiple agents toward a big goal is tougher than just breaking down a request into tasks, assigning them to available agents and enabling collaboration between them.
Just as a few agents can collaborate to complete a small project, several teams of process-aware agents need to operate within distinct project phases to tackle long horizon efforts.
Consider enterprise-level software development processes:
A large software project typically moves through a multi-step, occasionally backtracking path from inception to design to building to testing to documentation to marketing to production.
Different teams are focused on different aspects over time, informed by what's gone before and with an eye toward an ever-changing goal that is refined according to lessons learned.
Even within a phase, teams may cycle through their own phases, like Agile sprints. A certain amount of work is scoped for the sprint, the team works on their parts, and at the end of the sprint they decide what to tackle next. It accepts that each sprint could change the course of future development. These cycles can also be represented as puzzles.
With puzzlebox, members of agentic teams can be made process-aware, but the process itself is not subject to hallucination.
Three agents are working. The current state of their shared puzzle is "Specification".
A puzzle is a finite state machine. It's just easier to say, write, and think about.
Imagine the Rubik's Cube puzzle. It has 43 quintillion states, and to transition between them, you act upon it by rotating the intersecting planes of the mechanism.
{ "initialState": "LOBBY", "states": { "LOBBY": { "name": "LOBBY", "actions": { "START_GAME": { "name": "START_GAME", "targetState": "PLAYING" } } }, "PLAYING": { "name": "PLAYING", "actions": { "END_GAME": { "name": "END_GAME", "targetState": "GAME_OVER" } } }, "GAME_OVER": { "name": "GAME_OVER", "actions": { "RESTART": { "name": "RESTART", "targetState": "PLAYING" } } } } }
Most MCP servers have a one-to-one relationship with the client. Puzzlebox is different.
Puzzlebox is an MCP Server implementation that:
Puzzle Snapshot
resource template to fetch the resource by IDpuzzlebox:/puzzle/{puzzleId}
get_puzzle_snapshot
tool to get the current state and available actions.These functions are exposed to the agents for managing puzzles.
add_puzzle
success
and puzzleId
get_puzzle_snapshot
puzzleId
currentState
and availableActions
arrayperform_action_on_puzzle
puzzleId
and actionName
currentState
and availableActions
arraycount_puzzles
count
of registered puzzlesRunning locally requires Node and npm be installed. Then follow these steps...
cd /path/to/puzzlebox/
npm install
npm run build
/dist/index.js
npm run start
:3001
with endpoint /sse
npm run inspector
Transport Type
is set to SSE
URL
is set to http://localhost:3001/ssenpm run format
prettier
on the code, adjusting formattingnpm run typecheck
tsc
with args to check and report type issuesnpm run lint
eslint
to non-destructively check for and report syntax problemsnpm run lint:fix
eslint
to check for and fix syntax problemsnpm run test
These screenshots show the various MCP tools and resources implemented by the sever.
Testing of the server was done with the official reference client - the MCP Inspector.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!