Skip to main content
Glama

Memory Bank MCP Server

path-security-validator.ts639 B
import { InvalidParamError } from "../presentation/errors/index.js"; import { Validator } from "../presentation/protocols/validator.js"; export class PathSecurityValidator implements Validator { constructor(private readonly fieldName: string) {} validate(input?: any): Error | null { if (!input || !input[this.fieldName]) { return null; } const value = input[this.fieldName]; if ( typeof value === "string" && (value.includes("..") || value.includes("/")) ) { return new InvalidParamError( `${this.fieldName} contains invalid path segments` ); } return null; } }

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/alioshr/memory-bank-mcp'

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