Skip to main content
Glama
wilforlan

Suncture Healthcare MCP Server

by wilforlan
test-sse-client.js1.47 kB
#!/usr/bin/env node // Simple test client for the SSE server import fetch from 'node-fetch'; const PORT = process.env.PORT || 3001; const SERVER_URL = `http://localhost:${PORT}`; // Test connectivity to the server async function testSSEConnection() { console.log(`Testing connection to ${SERVER_URL}/sse`); try { // First test if the server is running with a simple fetch const response = await fetch(`${SERVER_URL}/sse`); console.log(`Server response status: ${response.status}`); if (response.status === 200) { console.log('Connection successful! Server is responding correctly.'); console.log('Set up an EventSource to test real-time updates:'); // In a browser, you'd use: // const eventSource = new EventSource('http://localhost:3001/sse'); // eventSource.onmessage = (event) => { // console.log('Received message:', event.data); // }; // eventSource.onerror = (error) => { // console.error('EventSource error:', error); // }; } else { console.error(`Server returned unexpected status: ${response.status}`); } } catch (error) { console.error('Error connecting to server:', error); console.log('\nPossible issues:'); console.log('1. Ensure the server is running (npm run dev)'); console.log('2. Check if another process is using port 3001'); console.log('3. Verify network settings and firewall rules'); } } testSSEConnection();

Latest Blog Posts

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/wilforlan/suncture-mcp'

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