Skip to main content
Glama
joelmnz

Article Manager MCP Server

by joelmnz
auth.ts651 B
const AUTH_TOKEN = process.env.AUTH_TOKEN; if (!AUTH_TOKEN) { throw new Error('AUTH_TOKEN environment variable is required'); } export function authenticate(request: Request): boolean { const authHeader = request.headers.get('Authorization'); if (!authHeader) { return false; } const token = authHeader.replace('Bearer ', ''); return token === AUTH_TOKEN; } export function requireAuth(request: Request): Response | null { if (!authenticate(request)) { return new Response(JSON.stringify({ error: 'Unauthorized' }), { status: 401, headers: { 'Content-Type': 'application/json' } }); } return null; }

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/joelmnz/mcp-markdown-manager'

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