Skip to main content
Glama

Letta Agents MCP Server

by elijahdev0
build.js1.44 kB
#!/usr/bin/env node import { exec } from 'child_process'; import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; // Get proper paths for ES modules const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Ensure dist directory exists if (!fs.existsSync('./dist')) { fs.mkdirSync('./dist'); } // Run TypeScript compiler console.log('Compiling TypeScript...'); exec('npx tsc', (error, stdout, stderr) => { if (error) { console.error('Error compiling TypeScript:', error); console.error(stderr); process.exit(1); } if (stdout) { console.log(stdout); } console.log('TypeScript compilation successful'); // Copy .env.example to dist try { if (fs.existsSync('./.env.example')) { fs.copyFileSync('./.env.example', './dist/.env.example'); console.log('Copied .env.example to dist directory'); } // Create package.json in dist const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8')); packageJson.main = 'server.js'; fs.writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 2)); console.log('Created package.json in dist directory'); console.log('Build completed successfully'); } catch (err) { console.error('Error copying files:', err); process.exit(1); } });

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/elijahdev0/mcp-server'

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