Skip to main content
Glama
test-simple.jsโ€ข1.9 kB
#!/usr/bin/env node import { spawn } from 'child_process'; console.log('๐Ÿš€ Testing Solana MCP Server - Basic Functionality\n'); const server = spawn('node', ['dist/index.js'], { stdio: ['pipe', 'pipe', 'pipe'] }); let testCount = 0; let passedTests = 0; server.stdout.on('data', (data) => { const response = JSON.parse(data.toString()); testCount++; if (response.result) { console.log(`โœ… Test ${testCount} passed`); passedTests++; } else if (response.error) { console.log(`โŒ Test ${testCount} failed:`, response.error.message); } }); server.stderr.on('data', (data) => { // Ignore server startup messages }); server.on('close', (code) => { console.log(`\n๐Ÿ“Š Results: ${passedTests}/${testCount} tests passed`); if (passedTests === testCount) { console.log('๐ŸŽ‰ All tests passed! Solana MCP Server is working!'); } process.exit(0); }); // Test commands const tests = [ { jsonrpc: "2.0", id: 1, method: "tools/list", params: {} }, { jsonrpc: "2.0", id: 2, method: "tools/call", params: { name: "create_wallet", arguments: { name: "test-wallet" } } }, { jsonrpc: "2.0", id: 3, method: "tools/call", params: { name: "list_wallets", arguments: {} } }, { jsonrpc: "2.0", id: 4, method: "tools/call", params: { name: "get_network_info", arguments: {} } }, { jsonrpc: "2.0", id: 5, method: "tools/call", params: { name: "get_balance", arguments: { walletName: "test-wallet" } } } ]; // Send tests with delays tests.forEach((test, index) => { setTimeout(() => { console.log(`๐Ÿงช Running test ${index + 1}...`); server.stdin.write(JSON.stringify(test) + '\n'); }, index * 1000); }); // Close after all tests setTimeout(() => { server.kill(); }, tests.length * 1000 + 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/ExpertVagabond/solana-mcp-server'

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