Skip to main content
Glama

Linear Streamable MCP Server

by iceener
cors.ts854 B
import type { HttpBindings } from '@hono/node-server'; import type { MiddlewareHandler } from 'hono'; export function corsMiddleware(): MiddlewareHandler<{ Bindings: HttpBindings; }> { return async (c, next) => { const requestOrigin = c.req.header('Origin') || c.req.header('origin'); const allowOrigin = requestOrigin || 'http://localhost'; c.header('Access-Control-Allow-Origin', allowOrigin); c.header('Access-Control-Allow-Methods', 'GET, POST, DELETE, OPTIONS'); c.header( 'Access-Control-Allow-Headers', 'Content-Type, Authorization, Mcp-Session-Id, MCP-Protocol-Version, Mcp-Protocol-Version, X-Api-Key, X-Auth-Token', ); c.header('Access-Control-Expose-Headers', 'Mcp-Session-Id, WWW-Authenticate'); if (c.req.method === 'OPTIONS') { return c.text('', 200); } await next(); }; }

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/iceener/linear-streamable-mcp-server'

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