examples: add arcade example to servers (#399)
This commit is contained in:
parent
2187bd4498
commit
adf0bbd611
7 changed files with 25 additions and 2 deletions
1
.github/workflows/npm-publish.yml
vendored
1
.github/workflows/npm-publish.yml
vendored
|
|
@ -98,6 +98,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
example:
|
example:
|
||||||
|
- arcade-server
|
||||||
- basic-server-preact
|
- basic-server-preact
|
||||||
- basic-server-react
|
- basic-server-react
|
||||||
- basic-server-solid
|
- basic-server-solid
|
||||||
|
|
|
||||||
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
|
|
@ -26,6 +26,7 @@ jobs:
|
||||||
. \
|
. \
|
||||||
./examples/basic-server-react \
|
./examples/basic-server-react \
|
||||||
./examples/basic-server-vanillajs \
|
./examples/basic-server-vanillajs \
|
||||||
|
./examples/arcade-server \
|
||||||
./examples/budget-allocator-server \
|
./examples/budget-allocator-server \
|
||||||
./examples/cohort-heatmap-server \
|
./examples/cohort-heatmap-server \
|
||||||
./examples/customer-segmentation-server \
|
./examples/customer-segmentation-server \
|
||||||
|
|
|
||||||
17
README.md
17
README.md
|
|
@ -176,6 +176,16 @@ To use these examples with MCP clients that support the stdio transport (such as
|
||||||
"--stdio"
|
"--stdio"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"arcade": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": [
|
||||||
|
"-y",
|
||||||
|
"--silent",
|
||||||
|
"--registry=https://registry.npmjs.org/",
|
||||||
|
"@modelcontextprotocol/server-arcade",
|
||||||
|
"--stdio"
|
||||||
|
]
|
||||||
|
},
|
||||||
"budget-allocator": {
|
"budget-allocator": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": [
|
"args": [
|
||||||
|
|
@ -393,6 +403,13 @@ Then configure your MCP client to build and run the local server. Replace `~/cod
|
||||||
"cd ~/code/ext-apps/examples/basic-server-solid && npm run build >&2 && node dist/index.js --stdio"
|
"cd ~/code/ext-apps/examples/basic-server-solid && npm run build >&2 && node dist/index.js --stdio"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"arcade": {
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"cd ~/code/ext-apps/examples/arcade-server && npm run build >&2 && node dist/index.js --stdio"
|
||||||
|
]
|
||||||
|
},
|
||||||
"budget-allocator": {
|
"budget-allocator": {
|
||||||
"command": "bash",
|
"command": "bash",
|
||||||
"args": [
|
"args": [
|
||||||
|
|
|
||||||
BIN
examples/arcade-server/grid-cell.png
Normal file
BIN
examples/arcade-server/grid-cell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 446 KiB |
|
|
@ -35,7 +35,7 @@ export function validateGameId(gameId: string): boolean {
|
||||||
*/
|
*/
|
||||||
export function createServer(port: number): McpServer {
|
export function createServer(port: number): McpServer {
|
||||||
const server = new McpServer({
|
const server = new McpServer({
|
||||||
name: "arcade-mcp-server",
|
name: "Arcade Server",
|
||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const EXTRA_WAIT_MS: Record<string, number> = {
|
||||||
|
|
||||||
// Servers to skip (screenshots maintained manually)
|
// Servers to skip (screenshots maintained manually)
|
||||||
const SKIP_SERVERS = new Set([
|
const SKIP_SERVERS = new Set([
|
||||||
|
"arcade-server", // Loads games from archive.org - screenshots maintained manually
|
||||||
"video-resource", // Uses custom screenshot from PR comment
|
"video-resource", // Uses custom screenshot from PR comment
|
||||||
"qr-server", // Uses custom screenshot from PR comment
|
"qr-server", // Uses custom screenshot from PR comment
|
||||||
"say-server", // TTS model download from HuggingFace can be slow
|
"say-server", // TTS model download from HuggingFace can be slow
|
||||||
|
|
@ -37,6 +38,7 @@ const EXAMPLE_FILTER = process.env.EXAMPLE;
|
||||||
|
|
||||||
// Server configurations (excludes integration-server which is for E2E testing)
|
// Server configurations (excludes integration-server which is for E2E testing)
|
||||||
const ALL_SERVERS = [
|
const ALL_SERVERS = [
|
||||||
|
{ key: "arcade-server", name: "Arcade Server", dir: "arcade-server" },
|
||||||
{
|
{
|
||||||
key: "basic-react",
|
key: "basic-react",
|
||||||
name: "Basic MCP App Server (React)",
|
name: "Basic MCP App Server (React)",
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ const DYNAMIC_MASKS: Record<string, string[]> = {
|
||||||
// Servers that need extra stabilization time (e.g., for tile loading, WebGL init)
|
// Servers that need extra stabilization time (e.g., for tile loading, WebGL init)
|
||||||
const SLOW_SERVERS: Record<string, number> = {
|
const SLOW_SERVERS: Record<string, number> = {
|
||||||
"map-server": 15000, // CesiumJS needs time for tiles to load
|
"map-server": 15000, // CesiumJS needs time for tiles to load
|
||||||
|
"arcade-server": 15000, // Game loading from archive.org can be slow
|
||||||
threejs: 2000, // Three.js WebGL initialization
|
threejs: 2000, // Three.js WebGL initialization
|
||||||
"say-server": 10000, // TTS model download from HuggingFace can be slow
|
"say-server": 10000, // TTS model download from HuggingFace can be slow
|
||||||
};
|
};
|
||||||
|
|
@ -57,7 +58,7 @@ const HOST_MASKS: Record<string, string[]> = {
|
||||||
|
|
||||||
// Servers to skip in CI (require special resources like GPU, large ML models)
|
// Servers to skip in CI (require special resources like GPU, large ML models)
|
||||||
const SKIP_SERVERS = new Set<string>([
|
const SKIP_SERVERS = new Set<string>([
|
||||||
// None currently - say-server view works without TTS model for screenshots
|
"arcade-server", // Loads games from archive.org which may be slow/unreliable in CI
|
||||||
"qr-server", // TODO
|
"qr-server", // TODO
|
||||||
"say-server", // TTS model download from HuggingFace can be slow
|
"say-server", // TTS model download from HuggingFace can be slow
|
||||||
]);
|
]);
|
||||||
|
|
@ -67,6 +68,7 @@ const EXAMPLE_FILTER = process.env.EXAMPLE;
|
||||||
|
|
||||||
// Server configurations (key is used for screenshot filenames, name is the MCP server name, dir is the folder name)
|
// Server configurations (key is used for screenshot filenames, name is the MCP server name, dir is the folder name)
|
||||||
const ALL_SERVERS = [
|
const ALL_SERVERS = [
|
||||||
|
{ key: "arcade-server", name: "Arcade Server", dir: "arcade-server" },
|
||||||
{
|
{
|
||||||
key: "integration",
|
key: "integration",
|
||||||
name: "Integration Test Server",
|
name: "Integration Test Server",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue