Skip to main content
Glama
security-config.ts2.19 kB
import { resolve, normalize } from 'path'; /** * Security configuration for Houtini LM MCP * * These settings control file access permissions and security policies. * Can be overridden via environment variables. */ export const securityConfig = { /** * Get the list of allowed directories from environment variable * NO DEFAULTS - Must be explicitly configured for security * * @returns {string[]} Array of normalized, absolute paths * @throws {Error} If LLM_MCP_ALLOWED_DIRS is not set */ getAllowedDirectories(): string[] { if (!process.env.LLM_MCP_ALLOWED_DIRS) { // TEMPORARY FIX: Use fallback directories for development console.error('WARNING: LLM_MCP_ALLOWED_DIRS not set, using fallback directories'); const fallbackDirs = ['C:\\MCP', 'C:\\DEV']; return fallbackDirs.map(dir => resolve(normalize(dir.trim())).toLowerCase()); } return process.env.LLM_MCP_ALLOWED_DIRS .split(',') .map(dir => resolve(normalize(dir.trim())).toLowerCase()); }, /** * Additional security settings */ security: { /** Maximum file size in bytes (200MB default) */ maxFileSize: 200 * 1024 * 1024, /** Enforce absolute paths */ requireAbsolutePaths: true, /** Log security violations */ logSecurityViolations: true, /** Allowed file extensions */ allowedExtensions: [ '.csv', '.json', '.txt', '.js', '.ts', '.py', '.md', '.log', '.jsx', '.tsx', '.java', '.c', '.cpp', '.rs', '.go', '.php', '.rb', '.swift', '.html', '.css', '.scss', '.sass', '.less', '.xml', '.yml', '.yaml', '.toml', '.ini' ] }, /** * Authentication settings (for future implementation) */ auth: { /** Enable API key authentication */ enableApiKey: false, /** API key header name */ apiKeyHeader: 'X-API-Key', /** Enable rate limiting */ enableRateLimit: false, /** Rate limit window in milliseconds */ rateLimitWindow: 15 * 60 * 1000, // 15 minutes /** Maximum requests per window */ rateLimitMax: 100 } }; // No backwards compatibility exports - security must be explicitly configured

Latest Blog Posts

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/houtini-ai/lm'

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