Skip to main content
Glama
test_date.js1.75 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js"); const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js"); async function main() { const transport = new stdio_js_1.StdioClientTransport({ command: "node", args: ["./build/index.js"], }); const client = new index_js_1.Client({ name: "date-test", version: "1.1.0" }, { capabilities: {} }); await client.connect(transport); console.log("🚀 Connecté au serveur MCP Allociné.\n"); try { const targetDate = "2025-12-24"; console.log(`--- Test: get_cinema_showtimes pour UGC Ciné Cité Les Halles (C0159) le ${targetDate} ---`); const program = await client.callTool({ name: "get_cinema_showtimes", arguments: { cinema_id: "C0159", date: targetDate } }); // @ts-ignore const progData = JSON.parse(program.content[0].text); console.log(`✅ Programmation récupérée: ${progData.movies.length} films à l'affiche.`); const sampleMovie = progData.movies[0]; if (sampleMovie) { console.log(` Film: ${sampleMovie.movieTitle}`); sampleMovie.formats.forEach((f) => { console.log(` Format: ${f.type}`); f.showtimes.forEach((s) => { console.log(` - ${s.startTime} (Date: ${s.date}) ${s.amenities ? `[${s.amenities.join(", ")}]` : ""}`); }); }); } } catch (error) { console.error("❌ Erreur pendant le test:", 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