We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/emilioejus/Windows-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
pathValidator.ts•434 B
import path from "path";
import fs from "fs";
import { DESKTOP_PATH } from "../config/paths.js";
export function validateDesktopPath(targetPath: string): string {
const resolved = path.resolve(targetPath);
if (!resolved.startsWith(DESKTOP_PATH)) {
throw new Error("Ruta fuera del Escritorio de Windows");
}
if (!fs.existsSync(resolved)) {
throw new Error("El archivo o carpeta no existe");
}
return resolved;
}