Skip to main content
Glama

ManaMurah MCP Server

by manamurah
test-mcp-simple.js•3.09 kB
#!/usr/bin/env node /** * Simple MCP Server Test * Quick test of the ManaMurah MCP Server functionality */ const MCP_SERVER_URL = 'https://manamurah-mcp-server.agagroup.workers.dev'; async function testMCPServer() { console.log('šŸš€ Testing ManaMurah MCP Server\n'); // Test 1: Server Info console.log('1. Testing server info...'); try { const response = await fetch(`${MCP_SERVER_URL}/`); const data = await response.json(); console.log(`āœ… Server operational: ${data.name} v${data.version}`); console.log(`šŸ“Š Available tools: ${data.tools.length}`); } catch (error) { console.log('āŒ Server info failed:', error.message); return; } // Test 2: Tools List console.log('\n2. Testing tools list...'); try { const response = await fetch(`${MCP_SERVER_URL}/mcp`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' }) }); const data = await response.json(); console.log(`āœ… Found ${data.result.tools.length} tools:`); data.result.tools.forEach(tool => { console.log(` • ${tool.name}: ${tool.description}`); }); } catch (error) { console.log('āŒ Tools list failed:', error.message); return; } // Test 3: Price Search console.log('\n3. Testing price search...'); try { const response = await fetch(`${MCP_SERVER_URL}/mcp`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 2, method: 'tools/call', params: { name: 'get_malaysian_prices', arguments: { query: 'rice prices in Kuala Lumpur' } } }) }); const data = await response.json(); if (data.result && data.result.content) { console.log('āœ… Price search successful'); const text = data.result.content[0].text; console.log('šŸ“Š Response preview:', text.substring(0, 150) + '...'); } else { console.log('āŒ Price search failed:', data.error?.message); } } catch (error) { console.log('āŒ Price search failed:', error.message); } // Test 4: SSE Endpoint console.log('\n4. Testing SSE endpoint...'); try { const response = await fetch(`${MCP_SERVER_URL}/sse`, { headers: { 'Accept': 'text/event-stream' } }); console.log(`āœ… SSE endpoint accessible (${response.status})`); console.log(`šŸ“Š Content-Type: ${response.headers.get('content-type')}`); } catch (error) { console.log('āŒ SSE endpoint failed:', error.message); } console.log('\nšŸŽ‰ MCP Server test completed!'); console.log('\nšŸ“ Claude Desktop Setup:'); console.log('Add this to your Claude Desktop MCP configuration:'); console.log(` { "manamurah": { "command": "node", "args": ["${process.cwd()}/tests/mcp-client.js"], "env": { "MCP_SERVER_URL": "${MCP_SERVER_URL}/sse" } } }`); } // Run the test 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/manamurah/mcp-server'

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