Public
Nokia Snake MCP App with SQLite leaderboard
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Nokia-style Snake as an MCP App, with SQLite high scores and a leaderboard.
- Val: https://www.val.town/x/alexmcroberts/snake-mcp
- App home: https://alexmcroberts--28d29b367c8711f18ed61607ee4eb77e.web.val.run/
- MCP endpoint: https://alexmcroberts--28d29b367c8711f18ed61607ee4eb77e.web.val.run/mcp
{ "mcpServers": { "snake": { "url": "https://alexmcroberts--28d29b367c8711f18ed61607ee4eb77e.web.val.run/mcp" } } }
Or with Claude Code:
claude mcp add --transport http snake https://alexmcroberts--28d29b367c8711f18ed61607ee4eb77e.web.val.run/mcp
Then ask: play snake or show the leaderboard.
| Tool | Who | What |
|---|---|---|
play_snake | model | Opens the Snake MCP App |
get_leaderboard | model | Shows top scores (MCP App UI) |
submit_score | app only | Saves name + score after a crash |
Rendering mermaid diagram...
- The host calls
play_snakeand renders the MCP App fromui://snake/mcp-app.html. - Play with arrow keys or the on-screen D-pad.
- On crash, enter a name — the app calls
submit_score. - Scores live in this val's SQLite database.
main.ts— Hono HTTP + Streamable MCP transportmcp.ts— tools + MCP App resourcesdb.ts— SQLite schema / leaderboard helperssnake-app.html— Snake UI (@modelcontextprotocol/ext-apps)index.html— landing page