MCP.so
登录

Number Guessing Game MCP Server

@portal-labs-infrastructure

关于 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 architectural patterns.

基本信息

分类

媒体与设计

许可证

MIT

运行时

node

传输方式

stdio

发布者

portal-labs-infrastructure

配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Number Guessing Game MCP Server?

A demonstration Model Context Protocol (MCP) server built in TypeScript that hosts a simple number guessing game. It showcases a dynamic, session-based architecture where each connecting user receives their own isolated set of tools and resources managed by a central Express.js controller. Designed as a learning resource and practical example for building dynamic, multi-user MCP applications.

How to use Number Guessing Game MCP Server?

Run the server locally via npm run dev (development) or npm start (production). Clients must support OAuth2 with dynamic client registration, tool notifications, and resource notifications. The live server is accessible at https://mcp.number-guessing-game.portal.one/mcp. For local access, use http://localhost:8083/mcp or expose with ngrok.

Key features of Number Guessing Game MCP Server

  • True multi‑user sessions with isolated game state per user.
  • Dynamic MCP tools (start_game, guess_number, give_up) enabled/disabled per user based on game state.
  • Dynamic MCP resource (game_state) created and destroyed per session.
  • Firestore integration for persistent game state and high scores.
  • Clean, scalable architecture with state pattern (Lobby, Playing) and lifecycle management.

Use cases of Number Guessing Game MCP Server

  • Learning how to build dynamic, session‑scoped MCP servers with TypeScript.
  • Demonstrating stateful user sessions over a stateless HTTP transport.
  • Showcasing Firestore‑backed MCP tools and resources that scale horizontally.

FAQ from Number Guessing Game MCP Server

What clients support this server?

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.

What runtime does the server require?

Node.js v18.x or later, with npm or yarn. Google Cloud Firestore access is needed for state persistence.

How are tools and resources managed per user?

A central Express.js controller creates a unique set of MCP tools and resources for each user upon session initialization and destroys them on close, using transport lifecycle hooks (onsessioninitialized, onclose).

Where is game state stored?

Game state and high scores are persisted in Google Cloud Firestore, making the server stateless and horizontally scalable.

What transport does the server use?

It uses StreamableHTTPServerTransport to handle incoming requests at the /mcp endpoint.

评论

媒体与设计 分类下的更多 MCP 服务器