JSPM

@wortal/mcp-server

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q28464F
  • License MIT

MCP server for Wortal game development SDK - provides AI assistants with tools to interact with Wortal APIs

Package Exports

  • @wortal/mcp-server
  • @wortal/mcp-server/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wortal/mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Wortal MCP Server

An MCP (Model Context Protocol) server that provides AI assistants with tools and resources for working with the Wortal game distribution SDK across all major gaming platforms.

Features

The Wortal MCP server exposes the comprehensive Wortal SDK functionality through:

Resources

  • Documentation: Overview, getting started guide, and API reference
  • Examples: Code examples for ads, leaderboards, achievements, and more

Tools

  • Code Generation: Generate boilerplate code for any Wortal feature
  • Ad Integration: Generate ad implementation code (interstitial and rewarded)
  • Analytics Tracking: Create event tracking code
  • Leaderboard Management: Generate leaderboard interaction code
  • Achievement System: Create achievement implementation
  • In-App Purchases: Generate IAP code

Installation

Once published to npm, you'll be able to use the server without any installation:

All Platforms - Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "wortal": {
      "command": "npx",
      "args": ["-y", "@wortal/mcp-server"]
    }
  }
}

That's it! No cloning, no building, no path configuration needed.

Local Development Install

For developers or before npm publication:

  1. Clone and build:
git clone https://github.com/Digital-Will-Inc/wortal-mcp.git
cd wortal-mcp
npm install
npm run build
  1. Option A: Use npm link (Easier)
npm link

Then add to Claude Desktop configuration:

{
  "mcpServers": {
    "wortal": {
      "command": "wortal-mcp"
    }
  }
}
  1. Option B: Use absolute path

Windows (%APPDATA%/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wortal": {
      "command": "node",
      "args": ["C:/path/to/wortal-mcp/dist/index.js"]
    }
  }
}

macOS (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wortal": {
      "command": "node",
      "args": ["/Users/username/path/to/wortal-mcp/dist/index.js"]
    }
  }
}

Linux (~/.config/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wortal": {
      "command": "node",
      "args": ["/home/username/path/to/wortal-mcp/dist/index.js"]
    }
  }
}

Usage

With Other MCP Clients

npm start

The server runs on stdio and can be integrated with any MCP-compatible client.

Available Tools

generate_wortal_code

Generate complete code implementations for Wortal features.

Parameters:

  • feature: The feature to generate code for (initialization, ads, analytics, achievements, context, iap, leaderboard, notifications, player, session, stats, tournament)
  • language: JavaScript or TypeScript
  • framework: vanilla, phaser, unity, cocos, gamemaker, construct, defold, gdevelop, playcanvas, babylonjs, or threejs

Example:

// Generate TypeScript leaderboard code
{
  "feature": "leaderboard",
  "language": "typescript",
  "framework": "vanilla"
}

wortal_show_ad

Generate ad display code with proper callbacks.

Parameters:

  • adType: "interstitial" or "rewarded"
  • placement: Ad placement identifier
  • description: Description of when/where the ad is shown

wortal_track_event

Generate analytics tracking code.

Parameters:

  • eventType: "levelStart", "levelEnd", "gameChoice", or "customEvent"
  • eventName: Name of the event
  • eventValue: Optional value
  • additionalData: Optional additional data object

wortal_leaderboard

Generate leaderboard interaction code.

Parameters:

  • action: "getEntries", "sendEntry", or "getPlayerEntry"
  • leaderboardName: Name of the leaderboard
  • score: Score to submit (for sendEntry)
  • count: Number of entries to retrieve
  • offset: Pagination offset

wortal_achievement

Generate achievement system code.

Parameters:

  • action: "unlock", "getAll", or "getProgress"
  • achievementId: ID of the achievement

wortal_stats

Generate stats tracking code.

Parameters:

  • action: "getStats" or "postStats"
  • level: Level identifier (string or number)
  • value: Stat value (for postStats)
  • period: Time period ("alltime", "weekly", "daily")

wortal_tournament

Generate tournament management code.

Parameters:

  • action: "getCurrent", "getAll", "postScore", "create", "share", or "join"
  • score: Score to post
  • tournamentId: Tournament identifier
  • config: Tournament configuration (for create)

wortal_iap

Generate in-app purchase code.

Parameters:

  • action: "getCatalog", "makePurchase", "getPurchases", or "consumePurchase"
  • productId: Product ID for purchase

Available Resources

The server provides access to comprehensive Wortal documentation:

  • wortal://docs/overview - SDK capabilities and features
  • wortal://docs/getting-started - Integration guide
  • wortal://docs/api-reference - Complete API documentation
  • wortal://examples/ads - Ad implementation examples
  • wortal://examples/leaderboard - Leaderboard examples
  • wortal://examples/achievements - Achievement system examples

Example Usage in Claude

Once configured, you can ask Claude:

  • "Show me how to initialize Wortal SDK in TypeScript"
  • "Generate code for showing a rewarded ad"
  • "Create a leaderboard implementation"
  • "Show me the Wortal API reference"
  • "Generate achievement unlock code"
  • "Create an IAP purchase flow"

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode
npm run dev

# Watch for changes
npm run watch

About Wortal

Wortal is a comprehensive SDK for game distribution across all major gaming platforms that provides:

  • Monetization through ads
  • Analytics and tracking
  • Social features (leaderboards, achievements)
  • In-app purchases
  • Notifications
  • Tournament system
  • Support for multiple game frameworks and platforms (web, mobile, social, console, PC)
  • Stats tracking and gameplay session management

Learn more at https://docs.games-api.ai/

License

MIT