Skip to main content
Glama
douglac

Luma Events MCP Server

by douglac
index.ts3.02 kB
import { Hono } from "hono"; import { McpServer, StreamableHttpTransport } from "mcp-lite"; import { z } from "zod"; import axios from "axios"; interface Env { } const mcp = new McpServer({ name: "luma-events-mcp", version: "1.0.0", schemaAdapter: (schema) => z.toJSONSchema(schema as z.ZodType), }); mcp.tool("search_luma_events", { description: "Get tech events from Luma API", inputSchema: z.object({ city: z.string().optional().describe("City name (not used)"), country: z.string().optional().describe("Country name (not used)"), query: z.string().optional().describe("Optional search keyword or topic, like hackathon, AI, etc."), }), handler: async () => { const response = await axios.get( 'https://api2.luma.com/discover/get-paginated-events?latitude=37.7621&longitude=-122.3971&pagination_limit=10&slug=tech', { headers: { 'accept': '*/*', 'accept-language': 'en', 'cache-control': 'no-cache', 'cookie': 'luma.auth-session-key=usr-xoEXGw5aoXmeiFG.x3vtgnpovxnfrn7nq5xk; __stripe_mid=a52c221b-e6c6-4861-b8a1-8ec00da5f06749c8cb; _fbc=fb.1.1759697667442.PAZXh0bgNhZW0CMTEAAafUjKkj3YUMlgzpmzoGutW32X9fsyrTigWFv4brDoSQE0BDADqCjmqsgnugdQ_aem_-XJ59MO0BkOSHsvS9iBhDQ; _fbp=fb.1.1759697667444.693061055574572550; _ga=GA1.1.733842861.1760215421; _ga_539VQSMHJ5=GS2.1.s1760215420$o1$g1$t1760215431$j49$l0$h0; luma.did=32jf5djiitqtar1swzs1jmckg2tx1l; luma.first-page=%2Fe4cdjt3u; luma.native-referrer=https%3A%2F%2Fluma.com%2Fhome%3Fe%3Devt-8Jyq0jNKackVSe0; __cf_bm=0lwmby2Fl1ZBB08WdjBMEeXBnqxv4JRlAU3iEXYU47M-1761272944-1.0.1.1-7p5II69rDTEyhEELiM6PAaMf8rpaQjE8ZOPSoIMPrlOVad5wLtt5a61qHkwI23l9d_mNyhxUcql3KwQgEGwK7XXBsTmSdmtuKZPhx.MRwUU', 'origin': 'https://luma.com', 'pragma': 'no-cache', 'priority': 'u=1, i', 'referer': 'https://luma.com/', 'sec-ch-ua': '"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-site', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36', 'x-luma-client-type': 'luma-web', 'x-luma-client-version': '93d660ee978059c73dd297796bdbad79a6845234', 'x-luma-web-url': 'https://luma.com/tech' } } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }, }); // HTTP transport setup const transport = new StreamableHttpTransport(); const httpHandler = transport.bind(mcp); const app = new Hono<{ Bindings: Env }>(); app.all("/mcp", async (c) => { const response = await httpHandler(c.req.raw); return response; }); app.get("/", (c) => c.text("Luma MCP Server (Apify) – connect via /mcp")); export default app;

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/douglac/mcp-luma-events'

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