UNPKG

@civic/mcp-bridge-commander

Version:

Stdio <-> HTTP/SSE MCP bridge with Civic auth handling

46 lines 1.91 kB
/** * config.ts * * Centralizes configuration management, loading environment variables * and providing defaults for all nexus bridge settings. */ import { config } from 'dotenv'; // Load environment variables first config(); // Main configuration - values from environment variables export const REMOTE_MCP_URL = process.env.MCP_REMOTE_URL || 'https://ai.civic.com/api/hub/mcp/sse'; // Authentication configuration export const CIVIC_AUTH_URL = process.env.CIVIC_AUTH_URL || 'https://auth.civic.com/oauth'; // Civic MCP - Public app export const CLIENT_ID = process.env.CIVIC_AUTH_CLIENT_ID || '12220cf4-1a9a-4964-8eb7-7c6d7d049f34'; // If true, bypass login and use CLIENT_ID directly as the bearer token export const NO_LOGIN = process.env.NO_LOGIN === 'true'; // If true, bypass third-party service authorization captures (don't open authorization URLs) export const NO_AUTH_CAPTURE = process.env.NO_AUTH_CAPTURE === 'true'; export const REQUEST_TIMEOUT_MS = parseInt(process.env.REQUEST_TIMEOUT_MS || '60000', 10); // 60 seconds by default, increased from 30s // Callback server configuration export const CALLBACK_PORT = parseInt(process.env.CALLBACK_PORT || '8976', 10); // Info the bridge presents locally to Claude Desktop export const LOCAL_SERVER_INFO = { name: 'CivicBridgeCommander-Local', version: '0.1.0' }; // Info the bridge presents to the remote server export const REMOTE_CLIENT_INFO = { name: process.env.CLIENT_NAME || 'CivicBridgeCommander-Client', version: '0.1.0' }; // Default capabilities the bridge client claims to support export const BRIDGE_CLIENT_CAPABILITIES = { // Define based on expected LLM client needs tools: { listChanged: false }, prompts: { listChanged: false } }; // Token storage configuration export const TOKEN_DIR = '.civic'; export const TOKEN_FILE = 'bridge-config.json'; //# sourceMappingURL=config.js.map