We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cscrespo/gaia-health-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
import { EventSource } from "eventsource";
global.EventSource = EventSource as any;
async function main() {
const transport = new SSEClientTransport(
new URL("http://localhost:3000/sse")
);
const client = new Client(
{
name: "example-client",
version: "1.0.0",
},
{
capabilities: {},
}
);
console.log("Connecting to server...");
await client.connect(transport);
console.log("Connected!");
console.log("Listing tools...");
const tools = await client.listTools();
console.log("Tools:", JSON.stringify(tools, null, 2));
// Example: List appointments (will likely fail or return empty if DB not connected/empty)
// console.log("Calling list_appointments...");
// const result = await client.callTool({
// name: "list_appointments",
// arguments: {},
// });
// console.log("Result:", result);
}
main().catch(console.error);