Skip to main content
Glama
epicweb-dev

Advanced MCP Features

by epicweb-dev
post-set-playground.js1.02 kB
import { existsSync } from 'node:fs' import { unlink } from 'node:fs/promises' import { join } from 'node:path' import { execa } from 'execa' const playgroundDir = process.env.EPICSHOP_PLAYGROUND_DEST_DIR const seedPath = join(playgroundDir, 'src', 'db', 'seed.ts') // Delete the database file if it exists to prevent EBUSY errors when switching playgrounds const dbPath = join(playgroundDir, 'db.sqlite') if (existsSync(dbPath)) { console.log('Deleting existing database file...') try { await unlink(dbPath) console.log('Database file deleted successfully') } catch (error) { console.warn('Failed to delete database file:', error.message) // Continue anyway - the seed script will also try to delete it } } if (existsSync(seedPath)) { console.log('Running seed script...') try { await execa('npx', ['tsx', seedPath], { cwd: playgroundDir, stdio: 'inherit', }) console.log('Seed script completed successfully') } catch (error) { console.error('Failed to run seed script:', error) } }

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