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
Quick Install (Recommended - Coming Soon)
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:
- Clone and build:
git clone https://github.com/Digital-Will-Inc/wortal-mcp.git
cd wortal-mcp
npm install
npm run build- Option A: Use npm link (Easier)
npm linkThen add to Claude Desktop configuration:
{
"mcpServers": {
"wortal": {
"command": "wortal-mcp"
}
}
}- 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 startThe 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 TypeScriptframework: 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 identifierdescription: 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 eventeventValue: Optional valueadditionalData: Optional additional data object
wortal_leaderboard
Generate leaderboard interaction code.
Parameters:
action: "getEntries", "sendEntry", or "getPlayerEntry"leaderboardName: Name of the leaderboardscore: Score to submit (for sendEntry)count: Number of entries to retrieveoffset: 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 posttournamentId: Tournament identifierconfig: 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 featureswortal://docs/getting-started- Integration guidewortal://docs/api-reference- Complete API documentationwortal://examples/ads- Ad implementation exampleswortal://examples/leaderboard- Leaderboard exampleswortal://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 watchAbout 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