- Rename local-proxy to mcplocal with HTTP server, LLM pipeline, mcpd discovery - Add LLM pre-processing: token estimation, filter cache, metrics, Gemini CLI + DeepSeek providers - Add mcpd auth (login/logout) and MCP proxy endpoints - Update CLI: dual URLs (mcplocalUrl/mcpdUrl), auth commands, --direct flag - Add tiered health monitoring, shell completions, e2e integration tests - 57 test files, 597 tests passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.4 KiB
TypeScript
34 lines
1.4 KiB
TypeScript
import { z } from 'zod';
|
|
|
|
export const McpctlConfigSchema = z.object({
|
|
/** mcplocal daemon endpoint (local LLM pre-processing proxy) */
|
|
mcplocalUrl: z.string().default('http://localhost:3200'),
|
|
/** mcpd daemon endpoint (remote instance manager) */
|
|
mcpdUrl: z.string().default('http://localhost:3100'),
|
|
/** @deprecated Use mcplocalUrl instead. Kept for backward compatibility. */
|
|
daemonUrl: z.string().optional(),
|
|
/** Active registries for search */
|
|
registries: z.array(z.enum(['official', 'glama', 'smithery'])).default(['official', 'glama', 'smithery']),
|
|
/** Cache TTL in milliseconds */
|
|
cacheTTLMs: z.number().int().positive().default(3_600_000),
|
|
/** HTTP proxy URL */
|
|
httpProxy: z.string().optional(),
|
|
/** HTTPS proxy URL */
|
|
httpsProxy: z.string().optional(),
|
|
/** Default output format */
|
|
outputFormat: z.enum(['table', 'json', 'yaml']).default('table'),
|
|
/** Smithery API key */
|
|
smitheryApiKey: z.string().optional(),
|
|
}).transform((cfg) => {
|
|
// Backward compatibility: if old daemonUrl is set but mcplocalUrl wasn't explicitly changed,
|
|
// use daemonUrl as mcplocalUrl
|
|
if (cfg.daemonUrl && cfg.mcplocalUrl === 'http://localhost:3200') {
|
|
return { ...cfg, mcplocalUrl: cfg.daemonUrl };
|
|
}
|
|
return cfg;
|
|
});
|
|
|
|
export type McpctlConfig = z.infer<typeof McpctlConfigSchema>;
|
|
|
|
export const DEFAULT_CONFIG: McpctlConfig = McpctlConfigSchema.parse({});
|