Skip to main content
Glama
test-server.ts1.01 kB
import { startExtensionServer } from './server/index.js'; // Mock workspace path for testing process.env.WORKSPACE_PATH = process.cwd(); // Simple logger function log(message: string, type: 'info' | 'error' | 'warn' = 'info') { const timestamp = new Date().toISOString(); console.log(`[${timestamp}][${type.toUpperCase()}] ${message}`); } async function startServer() { try { // Start server with fixed port for testing const server = await startExtensionServer({ fixedPort: 54321 }); log(`Server started on port ${server.port}`); // Handle cleanup on interrupt process.on('SIGINT', async () => { log('Shutting down server...'); await server.cleanup(); process.exit(0); }); log('Server ready - Press Ctrl+C to stop'); } catch (error) { log(`Failed to start server: ${error}`, 'error'); process.exit(1); } } // Start the server startServer().catch(error => { log(`Unhandled error: ${error}`, 'error'); process.exit(1); });

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/patelnav/my-tools-mcp'

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