Skip to main content
Glama

StreamerSongList MCP Server

by vuvuvu
test-server.jsโ€ข3.27 kB
#!/usr/bin/env node /** * Test script for StreamerSongList MCP Server * Verifies that the server starts correctly and responds to MCP protocol requests */ const { spawn } = require('child_process'); const path = require('path'); async function testMCPServer() { console.log('๐Ÿงช Testing StreamerSongList MCP Server...\n'); const serverPath = path.join(__dirname, 'src', 'server.js'); // Check if server file exists const fs = require('fs'); if (!fs.existsSync(serverPath)) { console.log('โŒ Server file not found:', serverPath); process.exit(1); } console.log('๐Ÿ“ Server file found:', serverPath); const server = spawn('node', [serverPath], { stdio: ['pipe', 'pipe', 'pipe'] }); let output = ''; let errorOutput = ''; server.stdout.on('data', (data) => { output += data.toString(); console.log('๐Ÿ“ค Server response:', data.toString().trim()); }); server.stderr.on('data', (data) => { errorOutput += data.toString(); console.log('๐Ÿ“ข Server status:', data.toString().trim()); }); // Send a list tools request const listToolsRequest = JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list", params: {} }) + '\n'; console.log('๐Ÿ“จ Sending tools/list request...'); server.stdin.write(listToolsRequest); // Wait for response await new Promise((resolve) => { const timeout = setTimeout(() => { server.kill(); resolve(); }, 3000); server.stdout.on('data', (data) => { const response = data.toString(); if (response.includes('"tools"') && response.includes('getStreamerByName')) { console.log('โœ… Received valid tools response!'); // Parse and display tools try { const jsonResponse = JSON.parse(response); const tools = jsonResponse.result.tools; console.log(`\n๐Ÿ›  Found ${tools.length} tools:`); tools.forEach((tool, index) => { console.log(` ${index + 1}. ${tool.name} - ${tool.description}`); }); } catch (e) { console.log('๐Ÿ“‹ Tools response received (parsing skipped)'); } server.kill(); clearTimeout(timeout); resolve(); } }); server.on('exit', () => { clearTimeout(timeout); resolve(); }); }); // Check results if (errorOutput.includes('StreamerSongList MCP Server running on stdio')) { console.log('\n๐ŸŽ‰ Test Results:'); console.log('โœ… Server starts successfully'); console.log('โœ… Server responds to MCP protocol'); console.log('โœ… All tools are properly defined'); console.log('\n๐Ÿš€ Your MCP server is ready to use!'); console.log('\n๐Ÿ“‹ Next steps:'); console.log('1. Add to Claude Desktop config'); console.log('2. Restart Claude Desktop'); console.log('3. Ask Claude to use StreamerSongList tools'); } else { console.log('\nโŒ Test failed'); console.log('Server output:', output); console.log('Server errors:', errorOutput); process.exit(1); } } // Handle errors process.on('unhandledRejection', (error) => { console.error('โŒ Test error:', error); process.exit(1); }); testMCPServer().catch(console.error);

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/vuvuvu/streamersonglist-mcp'

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