mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
- Updated formatting and indentation for consistency in SelectFieldGenerator.ts and SchemaConverter.ts. - Enhanced logging messages for better debugging in generateAllFieldsSelect and findModelClass functions. - Simplified error handling and fallback mechanisms in generateAllFieldsSelect. - Improved type definitions and structure in Zod schema conversion functions. - Added tests for server initialization and tool management to ensure proper functionality and error handling.
31 lines
857 B
TypeScript
31 lines
857 B
TypeScript
/**
|
|
* Server Configuration
|
|
* Centralized configuration for the MCP server
|
|
*/
|
|
|
|
import { Host, HttpProtocol } from "Common/Server/EnvironmentConfig";
|
|
|
|
// Application name used across the server
|
|
export const APP_NAME: string = "mcp";
|
|
|
|
// MCP Server information
|
|
export const MCP_SERVER_NAME: string = "oneuptime-mcp";
|
|
export const MCP_SERVER_VERSION: string = "1.0.0";
|
|
|
|
// Route prefixes for the MCP server
|
|
export const ROUTE_PREFIXES: string[] = [`/${APP_NAME}`, "/"];
|
|
|
|
// API URL configuration
|
|
export function getApiUrl(): string {
|
|
return Host ? `${HttpProtocol}${Host}` : "https://oneuptime.com";
|
|
}
|
|
|
|
// Session header name
|
|
export const SESSION_HEADER: string = "mcp-session-id";
|
|
|
|
// API key header names
|
|
export const API_KEY_HEADERS: string[] = ["x-api-key", "authorization"];
|
|
|
|
// Response formatting limits
|
|
export const LIST_PREVIEW_LIMIT: number = 5;
|