Skip to main content
Glama

Magic Component Platform (MCP)

by 21st-dev
get-content-of-file.ts267 B
export async function getContentOfFile(path: string): Promise<string> { try { const fs = await import("fs/promises"); return await fs.readFile(path, "utf-8"); } catch (error) { console.error(`Error reading file ${path}:`, error); return ""; } }

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/21st-dev/magic-mcp'

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