Number Guessing Game MCP Server

A demonstration Model Context Protocol (MCP) server implemented in TypeScript, showcasing dynamic tool and resource management, stateful HTTP

Remote serverstreamable-httpTypeScript

What is the Number Guessing Game MCP Server?

A demonstration Model Context Protocol (MCP) server implemented in TypeScript, showcasing dynamic tool and resource management, stateful HTTP sessions, and clean

The short version

A demonstration Model Context Protocol (MCP) server implemented in TypeScript. It showcases a dynamic, session-based architecture where each user gets their own set of tools and resources, managed by a central controller. This server hosts a simple number guessing game.

  • True Multi-User Sessions: — Each connecting user gets their own isolated game state and set of MCP entities
  • Dynamic MCP Tools: — Tools (start_game, guess_number, give_up) are enabled or disabled on a per-user basis, reflecting their individual game state
  • Dynamic MCP Resources: — The game_state resource is created and destroyed per-user as they start and end games
  • Clean, Scalable Architecture: —
  • A single global McpServer handles all connections
  • An Express.js controller manages the lifecycle of each user session

What it needs from you

  • Node.js (v18.x or later recommended) - npm or yarn - Access to a Google Cloud project with Firestore enabled.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Configuration

  • Node.js (v18.x or later recommended) - npm or yarn - Access to a Google Cloud project with Firestore enabled.
VariableDescriptionRequired
GCP_PROJECT_IDConfiguration value read at startup.Optional
BASE_URLEndpoint or connection string the server talks to.Yes
OAUTH_ISSUER_URLEndpoint or connection string the server talks to.Yes
DOCS_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Number Guessing Game to Session.”
  • “Use Number Guessing Game to PORT.”
  • “Use Number Guessing Game to GCP PROJECT ID.”

Frequently asked questions

Clients must support OAuth2 (with dynamic client registration), tool notifications, and resource notifications. The Portal One web client and MCP Inspector are mentioned as compatible options.