Skip to main content
Glama
epicweb-dev

Advanced MCP Features

by epicweb-dev
run.js1 kB
// This script spawns the `dev:mcp` script of the app ID and defaults to the playground import { getApps, isPlaygroundApp } from '@epic-web/workshop-utils/apps.server' import { execa } from 'execa' async function main() { const apps = await getApps() const appParts = process.argv[2] let selectedApp = null if (appParts) { let [givenExercise, givenStep, givenType = 'solution'] = appParts.split('.') selectedApp = apps.find((app) => { return ( app.exerciseNumber === Number(givenExercise) && app.stepNumber === Number(givenStep) && app.type.includes(givenType) ) }) } else { selectedApp = apps.find(isPlaygroundApp) } if (!selectedApp) { console.error('No app found') return } console.error('Running MCP server for', selectedApp.relativePath) await execa('npm', ['--prefix', selectedApp.fullPath, 'run', 'dev:mcp'], { cwd: selectedApp.fullPath, stdio: 'inherit', env: { ...process.env, PORT: selectedApp.dev.portNumber, }, }) } await main()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/epicweb-dev/advanced-mcp-features'

If you have feedback or need assistance with the MCP directory API, please join our Discord server