{"openapi":"3.0.1","info":{"title":"Gerege AI Nexus MCP Platform","description":"Gerege AI Nexus MCP Platform - Universal MCP & AI Backend API for ChatGPT, Gemini, and Claude","version":"1.0.0"},"servers":[{"url":"https://mcp.gerege.mn","description":"Gerege MCP Nexus Server Host"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"paths":{"/api/v1/tools/host_status":{"post":{"summary":"Get detailed telemetry, resource usage, CPU/RAM/Disk stats, and OS health of the host server.","operationId":"host_status","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"detailed":{"type":"boolean","description":"Include detailed process and network metrics"}}}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}},"/api/v1/tools/execute_command":{"post":{"summary":"Runs an allowlisted diagnostic command on the host without a shell. Pipes, redirection, chaining and globs are unavailable by design. Pass either 'command' (a plain string) or 'argv' (an explicit argument array).","operationId":"execute_command","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","description":"Command line, e.g. 'df -h /'. Tokenized without a shell."},"argv":{"type":"array","items":{"type":"string"},"description":"Explicit argv array, e.g. ['df','-h','/']. Preferred over 'command'."},"cwd":{"type":"string","description":"Working directory; must sit inside security.allowedCwdRoots."}}}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}},"/api/v1/tools/search_memory":{"post":{"summary":"Search the platform's memory store for past solutions, preferences, and knowledge insights.","operationId":"search_memory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Natural language query or keywords"},"limit":{"type":"number","description":"Max results to return (default 5)"}},"required":["query"]}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}},"/api/v1/tools/record_insight":{"post":{"summary":"Explicitly record a learned rule, solution, or insight into long-term memory.","operationId":"record_insight","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","description":"Category or topic tag (e.g. 'troubleshooting', 'rebranding')"},"content":{"type":"string","description":"The knowledge statement or rule to remember"},"confidence":{"type":"number","description":"Confidence score between 0.1 and 1.0"}},"required":["topic","content"]}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}},"/api/v1/tools/rebrand_system":{"post":{"summary":"Dynamically rebrands the platform name, logo, enterprise details, language, and system prompts.","operationId":"rebrand_system","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Full system title (e.g. 'Gerege Enterprise AI')"},"shortName":{"type":"string","description":"Short application title"},"organization":{"type":"string","description":"Organization name"},"logo":{"type":"string","description":"Logo image URL"},"language":{"type":"string","description":"Primary language code ('mn' or 'en')"},"systemPromptMN":{"type":"string","description":"Mongolian language system prompt"},"systemPromptEN":{"type":"string","description":"English language system prompt"}}}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}},"/api/v1/tools/synthesize_skill":{"post":{"summary":"Registers a new runtime tool from a command template. The template is tokenized at registration time and '{{param}}' is substituted as a single argument, so a caller cannot inject extra commands. Templates are subject to the same allowlist as execute_command.","operationId":"synthesize_skill","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skillName":{"type":"string","description":"Unique snake_case skill name"},"description":{"type":"string","description":"Description of what this new tool does"},"commandTemplate":{"type":"string","description":"Command template, e.g. 'git log -n {{param}}'"}},"required":["skillName","description","commandTemplate"]}}}},"responses":{"200":{"description":"Successful tool execution response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"error":{"type":"string"}}}}}}}}}}}