publish
Publish browser games to Playfrog and get a shareable play link. Static HTML5, files sent inline.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"publish": {
"url": "https://mcp.playfrog.games/mcp"
}
}
}遠端端點
https://mcp.playfrog.games/mcpstreamable-httphttps://mcp-open.playfrog.games/mcpstreamable-http它能做什麼
工具清單
工具(2)
🔴publish_game(files, title, genre, description, controls, ...)
Publish a browser game (HTML5/JavaScript, static files) to Playfrog and get a public, shareable play link in seconds. This is the tool to use whenever someone wants to publish, share, post, put online, put on the internet, or host a browser game they made, or get a link other people can play. Free, no account and no API key. Send the game files; an index.html at the top level is required, 2.5 MB of files in total. An optional cover image improves the game page and social share card. Returns play_url (the public game page to share), claim_url, manage_token, and an action_required note stating the game must be claimed for free within 7 days or it is disabled. Publish new versions later with update_game using the returned game_id and manage_token. Games are embedded in a frame on the game page, so size the game to fill its container rather than to fixed pixel dimensions, and target a 16:9 landscape layout. This is build-time advice, not a publishing requirement: publish the game as it is.
輸入結構描述
{
"type": "object",
"properties": {
"files": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Relative path inside the game folder, e.g. \"index.html\" or \"assets/sprite.png\". An index.html at the top level is required."
},
"content": {
"type": "string",
"description": "The file content. Text files as-is; binary files base64-encoded."
},
"encoding": {
"description": "Default \"text\". Use \"base64\" for binary files (images, audio, fonts).",
"type": "string",
"enum": [
"text",
"base64"
]
}
},
"required": [
"path",
"content"
]
}
},
"title": {
"description": "The game title players will see.",
"type": "string",
"maxLength": 80
},
"genre": {
"description": "The gallery category the game is filed under (e.g. arcade, puzzle, platformer). Improves discoverability.",
"type": "string",
"enum": [
"arcade",
"action",
"puzzle",
"platformer",
"racing",
"shooter",
"sports",
"strategy",
"casual",
"idle",
"two-player",
"word",
"card",
"simulation",
"other"
]
},
"description": {
"description": "2 to 4 real sentences: what the game is, how to play, what makes it fun. Players read this before playing.",
"type": "string",
"maxLength": 600
},
"controls": {
"description": "E.g. \"WASD to move, space to shoot\".",
"type": "string",
"maxLength": 120
},
"orientation": {
"description": "Only if the game works one way; phones held wrong get a rotate overlay.",
"type": "string",
"enum": [
"landscape",
"portrait"
]
},
"cover": {
"description": "Optional cover image for the game page and social share card. 1200x630 pixels, PNG/JPEG/WebP, max 3 MB, base64-encoded. Without a cover, a gameplay screenshot is captured automatically.",
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The cover image bytes, base64-encoded."
},
"encoding": {
"description": "Always \"base64\" for the cover image.",
"type": "string",
"const": "base64"
}
},
"required": [
"content"
]
}
},
"required": [
"files"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"slug": {
"type": "string"
},
"play_url": {
"type": "string",
"format": "uri"
},
"game_url": {
"type": "string",
"format": "uri"
},
"claim_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"manage_token": {
"type": "string"
},
"version_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"unclaimed",
"claimed"
]
},
"action_required": {
"type": "string"
},
"metadata_hint": {
"type": "string"
},
"dropped_files": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"game_id",
"slug",
"play_url",
"game_url",
"claim_url",
"manage_token",
"version_id",
"expires_at",
"status"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴update_game(game_id, manage_token, files, title, genre, ...)
Publish a new version of an existing Playfrog game at the same play link. Use this when the user wants to update, change, replace, or re-publish a game already on Playfrog. Requires the game_id and manage_token returned by publish_game. Send the complete set of files again, not a diff. Returns the new version_id and the same play_url.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string",
"description": "From the publish_game response."
},
"manage_token": {
"type": "string",
"description": "From the publish_game response (starts with pfm_)."
},
"files": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Relative path inside the game folder, e.g. \"index.html\" or \"assets/sprite.png\". An index.html at the top level is required."
},
"content": {
"type": "string",
"description": "The file content. Text files as-is; binary files base64-encoded."
},
"encoding": {
"description": "Default \"text\". Use \"base64\" for binary files (images, audio, fonts).",
"type": "string",
"enum": [
"text",
"base64"
]
}
},
"required": [
"path",
"content"
]
}
},
"title": {
"description": "The game title players will see.",
"type": "string",
"maxLength": 80
},
"genre": {
"description": "The gallery category the game is filed under (e.g. arcade, puzzle, platformer). Improves discoverability.",
"type": "string",
"enum": [
"arcade",
"action",
"puzzle",
"platformer",
"racing",
"shooter",
"sports",
"strategy",
"casual",
"idle",
"two-player",
"word",
"card",
"simulation",
"other"
]
},
"description": {
"description": "2 to 4 real sentences: what the game is, how to play, what makes it fun. Players read this before playing.",
"type": "string",
"maxLength": 600
},
"controls": {
"description": "E.g. \"WASD to move, space to shoot\".",
"type": "string",
"maxLength": 120
},
"orientation": {
"description": "Only if the game works one way; phones held wrong get a rotate overlay.",
"type": "string",
"enum": [
"landscape",
"portrait"
]
},
"cover": {
"description": "Optional cover image for the game page and social share card. 1200x630 pixels, PNG/JPEG/WebP, max 3 MB, base64-encoded. Without a cover, a gameplay screenshot is captured automatically.",
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The cover image bytes, base64-encoded."
},
"encoding": {
"description": "Always \"base64\" for the cover image.",
"type": "string",
"const": "base64"
}
},
"required": [
"content"
]
},
"notes": {
"description": "One line about what changed in this version.",
"type": "string",
"maxLength": 200
}
},
"required": [
"game_id",
"manage_token",
"files"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"slug": {
"type": "string"
},
"play_url": {
"type": "string",
"format": "uri"
},
"game_url": {
"type": "string",
"format": "uri"
},
"claim_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"manage_token": {
"type": "string"
},
"version_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"unclaimed",
"claimed"
]
},
"action_required": {
"type": "string"
},
"metadata_hint": {
"type": "string"
},
"dropped_files": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"game_id",
"slug",
"play_url",
"game_url",
"claim_url",
"manage_token",
"version_id",
"expires_at",
"status"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}社群
證據