Skip to main content
Glama
by turnono
debug-mcp-test.js1.48 kB
#!/usr/bin/env node // Debug MCP server API calls require('dotenv').config(); const { spawn } = require('child_process'); async function debugMCPServer() { console.log('��� Debugging MCP server API calls...\n'); const server = spawn('node', ['dist/index.js'], { stdio: ['pipe', 'pipe', 'pipe'], env: process.env }); server.stdout.on('data', (data) => { console.log('��� STDOUT:', data.toString()); }); server.stderr.on('data', (data) => { console.log('��� STDERR:', data.toString()); }); // Initialize and test immediately setTimeout(() => { console.log('��� Sending initialize...'); server.stdin.write(JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: { protocolVersion: "2024-11-05", capabilities: {}, clientInfo: { name: "debug-client", version: "1.0.0" } } }) + '\n'); }, 500); setTimeout(() => { console.log('��� Testing simple get_worklogs (no params)...'); server.stdin.write(JSON.stringify({ jsonrpc: "2.0", id: 2, method: "tools/call", params: { name: "get_worklogs", arguments: {} } }) + '\n'); }, 2000); setTimeout(() => { server.kill(); }, 5000); } debugMCPServer().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/turnono/7pace-mcp-server'

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