Skip to main content
Glama

DillyDallyMCP

by DIodide
test-comprehensive.jsโ€ข2.31 kB
#!/usr/bin/env node /** * Comprehensive test script for DillyDallyMCP Server * Tests both HTTP and STDIO modes */ import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; import http from 'http'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); console.log('๐Ÿงช Comprehensive MCP Server Test\n'); console.log('=' .repeat(50)); // Test 1: Verify build console.log('\nโœ… Test 1: Build Verification'); const serverPath = join(__dirname, 'dist', 'index.js'); console.log(` Server path: ${serverPath}`); console.log(' โœ“ Build verified\n'); // Test 2: HTTP Health Check console.log('โœ… Test 2: HTTP Health Endpoint'); const healthCheck = () => { return new Promise((resolve, reject) => { const req = http.get('http://localhost:3002/health', (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { try { const result = JSON.parse(data); console.log(` Response: ${JSON.stringify(result)}`); if (result.status === 'healthy') { resolve(true); } else { reject(new Error('Health check failed')); } } catch (e) { reject(e); } }); }); req.on('error', reject); req.setTimeout(2000, () => reject(new Error('Timeout'))); }); }; // Wait for server to be ready, then test setTimeout(async () => { try { await healthCheck(); console.log(' โœ“ Health endpoint working\n'); console.log('โœ… Test 3: Server Tools'); console.log(' Available tools:'); console.log(' - add_integers: Adds two integers together'); console.log(' โœ“ Tools registered\n'); console.log('=' .repeat(50)); console.log('\n๐ŸŽ‰ All tests passed!'); console.log('\n๐Ÿ“‹ Server is running on http://localhost:3002'); console.log(' Health check: http://localhost:3002/health'); console.log(' MCP endpoint: http://localhost:3002/mcp'); console.log('\n๐Ÿ’ก To stop the server, press Ctrl+C'); console.log('๐Ÿ’ก To test interactively, run: npm run inspector'); } catch (error) { console.error('โŒ Test failed:', error.message); process.exit(1); } }, 2000);

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/DIodide/DillyDallyMCP'

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