Skip to main content
Glama
file.ts582 B
import path from "path"; /** * 根据文件路径获取 MIME 类型 * @param filePath 文件路径 */ export function getMimeType(filePath: string): string { const ext = path.extname(filePath).toLowerCase(); const mimeTypes: Record<string, string> = { ".md": "text/markdown", ".txt": "text/plain", ".json": "application/json", ".js": "text/javascript", ".ts": "text/typescript", ".html": "text/html", ".css": "text/css", ".xml": "text/xml", ".yaml": "text/yaml", ".yml": "text/yaml", }; return mimeTypes[ext] || "text/plain"; }

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/GHjiejie/mcp-server'

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