Skip to main content
Glama
list_showing.ts859 B
import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; async function main() { const transport = new StdioClientTransport({ command: "node", args: ["./build/index.js"], }); const client = new Client({ name: "test", version: "1.0.0" }, { capabilities: {} }); await client.connect(transport); try { const result = await client.callTool({ name: "get_movies_now_showing", arguments: {}, }); // @ts-ignore const movies = JSON.parse(result.content[0].text); console.log(`Films à l'affiche (${movies.length} trouvés, affichage de 20) :`); movies.slice(0, 20).forEach((m: any) => console.log(`- ${m.title}`)); } catch (error) { console.error(error); } finally { await client.close(); } } main();

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/Racimy/Allocin-MCP'

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