We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/udittripathi/MCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
readFile.ts•310 B
import fs from "fs";
import { resolveSafePath, isFile } from "../utils/fileUtils.js";
export function readFile(relativePath: string) {
const fullPath = resolveSafePath(relativePath);
if (!isFile(fullPath)) {
throw new Error("File does not exist");
}
return fs.readFileSync(fullPath, "utf-8");
}