Skip to main content
Glama
index.test.ts1 kB
/** * Unit tests for the main entry point */ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; // ES modules equivalent of __dirname const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); describe('Main Entry Point', () => { it('should have a main function that starts the server', async () => { // Simple test to verify the file exists and has the expected content const indexPath = path.resolve(__dirname, '../index.ts'); const fileExists = fs.existsSync(indexPath); expect(fileExists).toBe(true); // Read the file content const content = fs.readFileSync(indexPath, 'utf8'); // Verify it contains the expected functions and imports expect(content).toContain('async function main()'); expect(content).toContain('import { StdioServerTransport }'); expect(content).toContain('import { OnyxMcpServer }'); expect(content).toContain('main().catch(console.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/lupuletic/onyx-mcp-server'

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