Integrations
Used as the server framework for backend communication with RESTful API endpoints to support the virtual house environment
Powers the multi-player backend server infrastructure that enables real-time server communication in the virtual environment
Connects to an image system that selects and displays images from the server/openai-server/public/image directory on the virtual TV
MCPGame
A multi-player control panel game with Node.js backend featuring a virtual house environment with interactive elements.
Features
- Immersive first-person 3D virtual house with outdoor environment
- Beautifully detailed house with interior and exterior features
- Interactive door to enter and exit the house
- Garden area with trees, plants, and decorative elements
- Interactive TV with image generation capabilities
- Computer terminal for accessing MCP systems
- Realistic movement and collision detection
- Real-time server communication
Setup
- Install dependencies:
- Run the server:
Or for development with auto-restart:
The server will start on port 3002.
Game Controls
- Movement: WASD keys
- Look around: Mouse movement (click on game to enable)
- Interact: Press ENTER when near interactive objects
- Exit interfaces: ESC key
- Exit mouse lock: ESC key
Interactive Elements
Outdoor Environment
- Explore the terrain with trees and garden beds
- Follow the path to the house entrance
- Press ENTER when near the door to enter/exit the house
TV System
- Approach the TV and press ENTER to access the remote control
- Generate images that will display on the TV screen
- Type a prompt for image generation in the terminal interface
MCP Terminal
- Find the computer desk and press ENTER to access the terminal
- Send commands to the MCP system
- Access various virtual tools (email, web search, etc.)
Technical Details
- Built with Three.js for 3D rendering
- First-person camera with pointer lock controls
- Outdoor environment with procedurally placed trees
- Express.js server for backend communication
- Canvas library for image generation
- RESTful API for server communication
MCP Game Image System
This document explains how the image display system works in the MCP Game.
Overview
The system displays existing images from the server/openai-server/public/image
directory on the TV in the virtual house. Instead of generating new images, which was causing 500 Internal Server errors, the system now checks for existing images in the specified directory.
How It Works
- The TV in the virtual house displays images that exist in the
server/openai-server/public/image
directory. - The system checks for new images every 10 seconds.
- When a user requests a new image through the TV remote interface, the system selects a random image from the directory.
Adding New Images
To add new images to the TV:
- Place image files (jpg, jpeg, png, gif, webp) in the
server/openai-server/public/image
directory. - The system will automatically detect and display them.
- Files should be a reasonable size for web display (recommended: 800x450 pixels).
Usage
- Approach the TV in the virtual house.
- Press Enter to access the TV remote control interface.
- Type any command related to displaying images.
- The system will select and display an image from the available ones in the directory.
Troubleshooting
- If no images are displayed, check if the
server/openai-server/public/image
directory exists and contains image files. - Make sure the server is running on the correct port (default: 3002).
- Check the browser console for any error messages related to image loading.
Technical Details
- The system no longer attempts to generate images directly, avoiding the 500 Internal Server errors.
- Images are selected randomly from the directory when requested.
- The system provides appropriate feedback when no images are available.
Connecting to MCP Backend Server
The MCPGame can connect to an external MCP Backend Server to enable advanced AI functionality for the terminal and TV interactions.
Configuration
- Open the
main.js
file and locate the configuration section at the top:
- Update the
MCP_BACKEND_URL
to point to your MCP Backend Server:- For local development:
http://localhost:PORT
(replace PORT with your backend port) - For production: Use the full URL to your deployed backend server
- For local development:
Required API Endpoints
Your MCP Backend Server should implement these endpoints:
GET /api/status
- Returns the status of the MCP systemPOST /api/query
- Accepts user queries and returns AI responses
Response Format
The query endpoint should return JSON in this format:
Testing the Connection
- Start your MCP Backend Server
- Start the MCPGame server (
node server.js
) - Open the game in a browser
- Interact with the computer terminal in the virtual house
- The game will connect to your MCP Backend Server when you use the terminal
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A multiplayer first-person 3D virtual house environment with interactive elements including a TV with image display system and computer terminal for accessing MCP systems.
Related MCP Servers
- AsecurityAlicenseAqualityA command-line tool that enables the use of MCP with the Room protocol, allowing agents to create and interact in peer-to-peer virtual rooms for goal-oriented collaboration.Last updated -565JavaScriptApache 2.0
- -securityAlicense-qualityAn MCP server that generates 2D and 3D game assets from text prompts using AI models from Hugging Face Spaces, allowing developers to easily create game art through Claude Desktop or other MCP clients.Last updated -34JavaScriptMIT License
- -securityAlicense-qualityA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.Last updated -PythonApache 2.0
- AsecurityAlicenseAqualityAn MCP server that creates a virtual traveling environment on Google Maps, allowing users to guide an avatar on journeys with photo reports and SNS integration.Last updated -214011TypeScriptMIT License