Skip to main content
Glama
josuekongolo

CompanyIQ MCP Server

by josuekongolo
test-mcp-server.jsβ€’1.59 kB
#!/usr/bin/env node // This simulates how Claude runs the MCP server import { spawn } from 'child_process'; console.log('πŸ§ͺ Testing MCP server startup with API key...'); console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'); // Simulate Claude's environment configuration const env = { ...process.env, OPENAI_API_KEY: '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' }; const mcpServer = spawn('node', ['build/index.js'], { env: env, stdio: ['pipe', 'pipe', 'pipe'] }); let output = ''; let errorOutput = ''; mcpServer.stdout.on('data', (data) => { output += data.toString(); }); mcpServer.stderr.on('data', (data) => { errorOutput += data.toString(); console.log('MCP Server:', data.toString()); }); // Wait 3 seconds then send a test command setTimeout(() => { console.log('\nπŸ“ Sending test request to MCP server...\n'); const testRequest = { jsonrpc: '2.0', id: 1, method: 'tools/list', params: {} }; mcpServer.stdin.write(JSON.stringify(testRequest) + '\n'); // Give it time to respond then exit setTimeout(() => { console.log('\nβœ… Test complete!'); if (errorOutput.includes('OPENAI_API_KEY loaded:')) { console.log('βœ… API key is properly loaded in MCP server'); } else { console.log('❌ API key might not be loading properly'); } mcpServer.kill(); process.exit(0); }, 2000); }, 1000);

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/josuekongolo/companyiq-mcp'

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