UNPKG

@templation/mcp-server

Version:

Enhanced MCP server for Templation - Advanced GitHub repository search, AI-powered template conversion, and comprehensive template management directly in Cursor

19 lines 592 B
import fetch from 'node-fetch'; const SERVER_URL = process.env.SERVER_URL || 'http://localhost:8000'; export async function validateApiKey(apiKey) { try { const response = await fetch(`${SERVER_URL}/api/auth/validate`, { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json', }, }); return response.ok; } catch (error) { console.error('API key validation failed:', error); return false; } } //# sourceMappingURL=auth.js.map