Skip to main content
Glama

ABSD DevOps MCP Server

by anthonybir
config.ts975 B
import { readFileSync } from 'node:fs'; import { resolve } from 'node:path'; import { ConfigSchema, type Config } from '../types/config.js'; export function loadConfig(configPath?: string): Config { const path = configPath || process.env.ABSD_MCP_CONFIG || resolve(process.cwd(), 'config.json'); try { const raw = readFileSync(path, 'utf-8'); const parsed = JSON.parse(raw); return ConfigSchema.parse(parsed); } catch (error) { if (error instanceof Error && 'code' in error && error.code === 'ENOENT') { throw new Error( `Config file no encontrado: ${path}\n` + 'Crea config.json o establece ABSD_MCP_CONFIG' ); } throw error; } } export function createDefaultConfig(allowedDirs: string[]): Config { return ConfigSchema.parse({ allowedDirectories: allowedDirs, blockedCommands: [ 'rm -rf /', 'dd if=/dev/zero', 'mkfs', 'shutdown', 'reboot', 'init 0', ], }); }

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/anthonybir/ABSD_MCP'

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