Skip to main content
Glama
client-ip.ts342 B
import requestIp from 'request-ip'; import Koa from 'koa'; // koa has built-in IP, but maybe not as reliable... see https://github.com/koajs/koa/issues/599 // will check with some real data export async function detectClientIp(ctx: Koa.Context, next: Koa.Next) { ctx.state.clientIp = requestIp.getClientIp(ctx.request); return next(); }

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/systeminit/si'

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