We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/roman-vm/ask-me-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
global-setup.ts•1.14 kB
/**
* Global Test Setup
*
* Sets up the test environment for MCP server E2E tests.
* Ensures the server is built and ready for testing.
*/
import { execSync } from 'child_process';
import { join } from 'path';
import { existsSync } from 'fs';
/* eslint-disable */
var __TEARDOWN_MESSAGE__: string;
module.exports = async function () {
console.log('\nSetting up MCP Server E2E Tests...\n');
const rootDir = join(__dirname, '../../..');
const serverDistPath = join(rootDir, 'dist/askme-server/main.js');
try {
// Verify the build exists (build should be done via dependencies)
if (!existsSync(serverDistPath)) {
throw new Error(`Server build not found at: ${serverDistPath}. Please run 'npx nx build askme-server' first.`);
}
console.log('✅ MCP Server is ready for testing');
console.log(`📍 Server path: ${serverDistPath}`);
// Hint: Use `globalThis` to pass variables to global teardown.
globalThis.__TEARDOWN_MESSAGE__ = '\nCleaning up MCP Server E2E Tests...\n';
} catch (error) {
console.error('❌ Failed to set up MCP Server E2E tests:', error);
throw error;
}
};