npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jeu-plaza-mcp-server

v1.0.4

Published

MCP server for Jeu Plaza game management

Downloads

11

Readme

Jeu Plaza MCP Server

An MCP (Model Context Protocol) server for managing games in the Jeu Plaza platform. This server allows users to create, update, and manage their canvas-based games using their wallet address through secure API endpoints.

Features

  • create_game: Create a new game for a wallet address
  • update_game: Update an existing game with new requirements
  • list_games: List all games owned by a wallet address
  • get_game: Retrieve a specific game's code and details

Security

This MCP server uses secure API endpoints instead of direct database access:

  • All requests are authenticated using API keys
  • Communication happens through your application's REST API
  • No direct database credentials are exposed to users
  • Rate limiting and validation handled by your main application

Installation

cd mcp-server
npm install

Development

npm run dev

Build

npm run build
npm start

Environment Variables

Create a .env file in the mcp-server directory:

# Base URL of your running Jeu Plaza application
# For production: https://crossfi-v0.vercel.app/
# For development: http://localhost:3000
API_BASE_URL=https://crossfi-v0.vercel.app/

# Secure API key (must match MCP_API_KEY in your main app's .env.local)
API_KEY=jeu-plaza-mcp-secure-key-2024

Usage with MCP Client

Tool: create_game

Creates a new game for a wallet address with integrated AI generation. This tool combines game creation and AI code generation into a single streamlined operation.

Parameters:

  • walletAddress (string): The wallet address of the game owner
  • gameName (string): The name of the game to create
  • gamePrompt (string): Description of the game to generate

Example:

{
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "gameName": "Space Invaders",
  "gamePrompt": "Create a space invaders game with moving aliens and a player ship that can shoot"
}

Process:

  1. Creates a new game record in the database
  2. Automatically generates game code using AI based on the provided prompt
  3. Saves the generated code as the first checkpoint
  4. Returns the complete game information including the AI-generated description

Note: This streamlined approach eliminates the need for separate game creation and code generation steps, making the process more efficient and user-friendly.

Tool: update_game

Updates an existing game with new requirements. The server automatically retrieves the current game code and generates an updated version based on the provided prompt.

Parameters:

  • walletAddress (string): The wallet address of the game owner
  • gameName (string): The name of the game to update
  • updatePrompt (string): Description of changes to make

Example:

{
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "gameName": "Space Invaders",
  "updatePrompt": "Add power-ups that increase fire rate and add particle effects when aliens are destroyed"
}

Process:

  1. Validates the game exists and is owned by the wallet address
  2. Automatically retrieves the latest game code from checkpoints
  3. Generates updated code using AI with the current code as context
  4. Saves the updated code as a new checkpoint

Tool: list_games

Lists all games for a wallet address.

Parameters:

  • walletAddress (string): The wallet address to list games for

Tool: get_game

Retrieves a specific game's complete code and details.

Parameters:

  • walletAddress (string): The wallet address of the game owner
  • gameName (string): The name of the game to retrieve

Integration with Main App

This MCP server communicates with your Jeu Plaza application through secure REST API endpoints:

  • POST /api/games - Create new games
  • PUT /api/games/[gameName] - Update existing games
  • GET /api/games - List games by wallet address
  • GET /api/games/[gameName] - Get specific game details

Games created or updated through the MCP server are immediately available in the web interface since they use the same backend API.

API Endpoints

The main application includes these new API routes for MCP integration:

  • Authentication: All requests require Authorization: Bearer <API_KEY> header
  • Validation: Request data is validated using Zod schemas
  • AI Integration: Uses your existing generateGameCode flow for game creation/updates
  • Error Handling: Proper HTTP status codes and error messages

Setup Instructions

Option 1: Production API (Recommended)

Use the live production deployment at https://crossfi-v0.vercel.app/

Add to your MCP client configuration:

{
  "mcpServers": {
    "jeu-plaza": {
      "command": "npx",
      "args": ["jeu-plaza-mcp-server@latest"],
      "env": {
        "API_BASE_URL": "https://crossfi-v0.vercel.app/",
        "API_KEY": "jeu-plaza-mcp-secure-key-2024"
      },
      "disabled": false,
      "autoApprove": ["list_games", "get_game"]
    }
  }
}

Benefits:

  • No need to run the main application locally
  • Always up-to-date with the latest features
  • Production-grade performance and reliability
  • Immediate access to the live game database

Option 2: Local Development

For development and testing with your local instance:

  1. Start your main Jeu Plaza application:
npm run dev  # Main app should be running on http://localhost:3000
  1. Add to your MCP client configuration:
{
  "mcpServers": {
    "jeu-plaza": {
      "command": "npx",
      "args": ["jeu-plaza-mcp-server@latest"],
      "env": {
        "API_BASE_URL": "http://localhost:3000",
        "API_KEY": "jeu-plaza-mcp-secure-key-2024"
      },
      "disabled": false,
      "autoApprove": ["list_games", "get_game"]
    }
  }
}

Option 3: Local MCP Server Development

For advanced development where you want to modify the MCP server itself:

  1. Configure MCP server:
cd mcp-server
cp .env.example .env
# Edit .env with your API_BASE_URL and API_KEY
  1. Install and run MCP server:
npm install
npm run build
npm start
  1. Add to your MCP client configuration:
{
  "mcpServers": {
    "jeu-plaza": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "./mcp-server",
      "env": {
        "API_BASE_URL": "https://crossfi-v0.vercel.app/",
        "API_KEY": "jeu-plaza-mcp-secure-key-2024"
      },
      "disabled": false,
      "autoApprove": ["list_games", "get_game"]
    }
  }
}

Notes

  • Uses your existing AI flow from ai/flows/generate-game-code.ts
  • All games are canvas-based following the platform's architecture
  • Wallet addresses are used as the primary ownership mechanism
  • Secure API communication with proper authentication
  • No direct database access - all operations go through your app's API layer