ls-mcp 1.15.2 → 1.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/dist/bin/cli.cjs +1359 -1747
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.cts +1 -1
- package/dist/bin/cli.d.ts +1 -1
- package/dist/bin/cli.mjs +1341 -1733
- package/dist/main.cjs +1002 -1267
- package/dist/main.d.cts +74 -69
- package/dist/main.d.ts +74 -69
- package/dist/main.mjs +985 -1240
- package/package.json +29 -35
- package/src/bin/cli.ts +1 -1
- package/src/components/mcp-server-status.ts +1 -1
- package/src/components/mcp-servers-config-parsable.ts +1 -1
- package/src/main.ts +1 -1
- package/src/services/mcp-config-service.ts +20 -11
- package/src/services/mcp-server-manager-service.ts +5 -5
- package/src/services/render-service.ts +9 -8
- package/src/utils/url-utils.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.cjs","names":["MCPPathRegistry","platform","util","DirectoryBubbleService","fs","MCPConfigParser","path","platform","execSync","path","render","styleText","render","styleText","render","styleText","render","styleText","render","styleText","render","styleText","render","styleText","styleText","styleText","styleText","ColumnNameComponent","TransportComponent","MCPServerStatusComponent","MCPServerSourceComponent","MCPServerNameComponent","MCPServerVersionComponent","FilePathComponent","MCPServersConfigParsableComponent","styleText","styleText"],"sources":["../../src/services/credential-detection-service.ts","../../src/services/mcp-version-detection-service.ts","../../src/utils/url-utils.ts","../../src/services/mcp-config-service.ts","../../src/services/mcp-server-manager-service.ts","../../src/main.ts","../../src/components/transport.ts","../../src/components/column-name.ts","../../src/components/mcp-server-status.ts","../../src/components/mcp-server-name.ts","../../src/components/mcp-server-source.ts","../../src/components/mcp-server-version.ts","../../src/components/file-path.ts","../../src/components/mcp-servers-config-parsable.ts","../../src/components/credential-warning.ts","../../src/components/summary.ts","../../src/services/render-service.ts","../../src/bin/cli.ts"],"sourcesContent":["export class CredentialDetectionService {\n /**\n * Credential patterns grouped by risk level for easier maintenance\n */\n private static readonly CREDENTIAL_PATTERNS = {\n high: [\n // Generic Key and Token patterns (broad matching)\n /.*key.*/i,\n /.*token.*/i,\n\n // Passwords\n /.*password.*/i,\n /.*passwd.*/i,\n /.*pwd.*/i,\n\n // Credentials and Secrets\n /.*credential.*/i,\n /.*creds.*/i,\n /.*secret.*/i\n ],\n low: [\n // Organization and Account IDs\n /org[_-]?id/i,\n /organization[_-]?id/i,\n /account[_-]?id/i,\n /user[_-]?id/i,\n /openai[_-]?org[_-]?id/i\n ]\n }\n\n /**\n * Argument patterns for detecting credentials in command-line arguments\n */\n private static readonly ARGUMENT_PATTERNS = {\n high: [\n // API key arguments\n /--api-key/i,\n /--apikey/i,\n /--key/i,\n\n // Token arguments\n /--token/i,\n /--access-token/i,\n /--auth-token/i,\n /--bearer-token/i,\n\n // Password arguments\n /--password/i,\n /--passwd/i,\n /--pwd/i,\n\n // Secret arguments\n /--secret/i,\n /--client-secret/i,\n\n // Authentication arguments\n /--auth/i,\n /--authorization/i,\n /--credentials/i,\n /--creds/i\n ],\n low: [\n // Organization and account IDs\n /--org-id/i,\n /--organization-id/i,\n /--account-id/i,\n /--user-id/i\n ]\n }\n\n /**\n * Header patterns for detecting credentials in HTTP headers\n */\n private static readonly HEADER_PATTERNS = {\n high: [\n // Authorization headers\n /authorization/i,\n /auth/i,\n\n // API key headers\n /x-api-key/i,\n /api-key/i,\n /apikey/i,\n\n // Token headers\n /x-access-token/i,\n /access-token/i,\n /bearer-token/i,\n /x-auth-token/i,\n /auth-token/i,\n\n // Custom authentication headers\n /x-.*-key/i,\n /x-.*-token/i,\n /x-.*-secret/i,\n\n // Service-specific patterns\n /x-github-token/i,\n /x-openai-key/i,\n /x-anthropic-key/i\n ],\n low: [\n // User identification headers\n /x-user-id/i,\n /x-org-id/i,\n /x-organization-id/i,\n /x-account-id/i\n ]\n }\n\n /**\n * Variable substitution pattern to detect safe variable references\n */\n private static readonly VARIABLE_SUBSTITUTION_PATTERN = /^\\$\\{[^}]+\\}$/\n\n /**\n * Check if a value is a variable substitution pattern (e.g., ${input:token})\n */\n static isVariableSubstitution (value: string): boolean {\n return this.VARIABLE_SUBSTITUTION_PATTERN.test(value)\n }\n\n /**\n * Analyze command-line arguments for potential credentials\n */\n static analyzeArguments (args: string[] | undefined): CredentialAnalysisResult {\n if (!args || !Array.isArray(args) || args.length === 0) {\n return {\n hasCredentials: false,\n credentialVars: [],\n riskLevel: 'none'\n }\n }\n\n const credentialVars: CredentialVariable[] = []\n\n // Check each argument and the next one for credential patterns\n for (let i = 0; i < args.length - 1; i++) {\n const arg = args[i]\n const nextArg = args[i + 1]\n\n // Check if current argument matches a credential flag pattern\n const isHighRiskArg = this.ARGUMENT_PATTERNS.high.some(pattern => pattern.test(arg))\n const isLowRiskArg = this.ARGUMENT_PATTERNS.low.some(pattern => pattern.test(arg))\n\n if (isHighRiskArg || isLowRiskArg) {\n // The next argument should be the value\n if (nextArg && !nextArg.startsWith('-')) {\n credentialVars.push({\n name: arg,\n value: this.maskValue(nextArg),\n riskLevel: isHighRiskArg ? 'high' : 'low',\n source: 'args'\n })\n i++ // Skip the next argument since we've processed it as a value\n }\n }\n }\n\n const hasCredentials = credentialVars.length > 0\n const riskLevel = this.calculateOverallRiskLevel(credentialVars)\n\n return {\n hasCredentials,\n credentialVars,\n riskLevel\n }\n }\n\n /**\n * Analyze HTTP headers for potential credentials\n */\n static analyzeHeaders (headers: Record<string, string> | undefined): CredentialAnalysisResult {\n if (!headers || typeof headers !== 'object') {\n return {\n hasCredentials: false,\n credentialVars: [],\n riskLevel: 'none'\n }\n }\n\n const credentialVars: CredentialVariable[] = []\n\n for (const [name, value] of Object.entries(headers)) {\n // Skip variable substitution patterns (they're safe)\n if (this.isVariableSubstitution(value)) {\n continue\n }\n\n const isHighRiskHeader = this.HEADER_PATTERNS.high.some(pattern => pattern.test(name))\n const isLowRiskHeader = this.HEADER_PATTERNS.low.some(pattern => pattern.test(name))\n\n if (isHighRiskHeader || isLowRiskHeader) {\n credentialVars.push({\n name,\n value: this.maskValue(value),\n riskLevel: isHighRiskHeader ? 'high' : 'low',\n source: 'headers'\n })\n }\n }\n\n const hasCredentials = credentialVars.length > 0\n const riskLevel = this.calculateOverallRiskLevel(credentialVars)\n\n return {\n hasCredentials,\n credentialVars,\n riskLevel\n }\n }\n\n /**\n * Comprehensive analysis of server configuration for credentials\n */\n static analyzeServerConfig (config: {\n env?: Record<string, string>\n args?: string[]\n headers?: Record<string, string>\n }): CredentialAnalysisResult {\n const envResult = this.analyzeEnvironmentVariables(config.env)\n const argsResult = this.analyzeArguments(config.args)\n const headersResult = this.analyzeHeaders(config.headers)\n\n // Combine all credential variables\n const allCredentialVars = [\n ...envResult.credentialVars,\n ...argsResult.credentialVars,\n ...headersResult.credentialVars\n ]\n\n const hasCredentials = allCredentialVars.length > 0\n const riskLevel = this.calculateOverallRiskLevel(allCredentialVars)\n\n return {\n hasCredentials,\n credentialVars: allCredentialVars,\n riskLevel\n }\n }\n\n /**\n * Check if an environment variable name suggests it might contain credentials\n */\n static isPotentialCredential (envVarName: string): boolean {\n return this.CREDENTIAL_PATTERNS.high.some(pattern => pattern.test(envVarName)) ||\n this.CREDENTIAL_PATTERNS.low.some(pattern => pattern.test(envVarName))\n }\n\n /**\n * Analyze environment variables and return credential detection results\n */\n static analyzeEnvironmentVariables (env: Record<string, string> | undefined): CredentialAnalysisResult {\n if (!env || typeof env !== 'object') {\n return {\n hasCredentials: false,\n credentialVars: [],\n riskLevel: 'none'\n }\n }\n\n const credentialVars: CredentialVariable[] = []\n\n for (const [name, value] of Object.entries(env)) {\n // Skip variable substitution patterns (they're safe)\n if (this.isVariableSubstitution(value)) {\n continue\n }\n\n if (this.isPotentialCredential(name)) {\n credentialVars.push({\n name,\n value: this.maskValue(value),\n riskLevel: this.assessRiskLevel(name),\n source: 'env'\n })\n }\n }\n\n const hasCredentials = credentialVars.length > 0\n const riskLevel = this.calculateOverallRiskLevel(credentialVars)\n\n return {\n hasCredentials,\n credentialVars,\n riskLevel\n }\n }\n\n /**\n * Mask sensitive values for display (show only first and last character)\n */\n private static maskValue (value: string): string {\n if (!value || value.length <= 2) {\n return value\n }\n\n const first = value.charAt(0)\n const last = value.charAt(value.length - 1)\n const maskedLength = Math.min(value.length - 2, 8) // Show max 8 asterisks\n\n return `${first}${'*'.repeat(maskedLength)}${last}`\n }\n\n /**\n * Assess risk level for a specific credential variable\n */\n private static assessRiskLevel (name: string): 'low' | 'high' {\n // Check if it matches any high-risk patterns\n if (this.CREDENTIAL_PATTERNS.high.some(pattern => pattern.test(name))) {\n return 'high'\n }\n\n // If it matches low-risk patterns, it's low risk\n if (this.CREDENTIAL_PATTERNS.low.some(pattern => pattern.test(name))) {\n return 'low'\n }\n\n // Default to high risk for any other credential-like variables\n return 'high'\n }\n\n /**\n * Calculate overall risk level based on all credential variables\n */\n private static calculateOverallRiskLevel (credentialVars: CredentialVariable[]): 'none' | 'low' | 'high' {\n if (credentialVars.length === 0) {\n return 'none'\n }\n\n const hasHighRisk = credentialVars.some(v => v.riskLevel === 'high')\n\n if (hasHighRisk) {\n return 'high'\n }\n\n return 'low'\n }\n}\n\nexport interface CredentialVariable {\n name: string\n value: string\n riskLevel: 'low' | 'high'\n source?: 'env' | 'args' | 'headers'\n}\n\nexport interface CredentialAnalysisResult {\n hasCredentials: boolean\n credentialVars: CredentialVariable[]\n riskLevel: 'none' | 'low' | 'high'\n}\n","import { PackageVersionInfo } from '../types/mcp-config-service.types.js'\n\n/**\n * Service for detecting version information from MCP server configurations\n * Specifically handles npx-based server commands to determine if they use\n * pinned versions or implicit latest versions\n */\nexport class MCPVersionDetectionService {\n /**\n * Analyze a server configuration to extract version information\n * @param command - The command used to run the server\n * @param args - Array of arguments passed to the command\n * @returns PackageVersionInfo if analysis is possible, null otherwise\n */\n analyzeServerVersion (command: string, args?: string[]): PackageVersionInfo | null {\n // Only analyze supported package manager commands\n if (!['npx', 'uvx', 'uv'].includes(command)) {\n return null\n }\n\n // Need args to extract package information\n if (!args || args.length === 0) {\n return null\n }\n\n const packageName = this.extractPackageName(command, args)\n if (!packageName) {\n return null\n }\n\n const { name, version } = this.parsePackageVersion(packageName)\n const isPinned = this.isPinnedVersion(version)\n\n return {\n packageName: name,\n version,\n isPinned,\n isLatest: !isPinned\n }\n }\n\n /**\n * Extract the package name based on the command type\n * @param command - The command used to run the server\n * @param args - Array of arguments passed to the command\n * @returns The package name/spec or null if not found\n */\n extractPackageName (command: string, args: string[]): string | null {\n switch (command) {\n case 'npx':\n return this.extractNpxPackageName(args)\n case 'uvx':\n return this.extractUvxPackageName(args)\n case 'uv':\n return this.extractUvPackageName(args)\n default:\n return null\n }\n }\n\n /**\n * Extract the package name from npx arguments\n * @param args - Array of arguments passed to npx\n * @returns The package name/spec or null if not found\n */\n extractNpxPackageName (args: string[]): string | null {\n if (!args || args.length === 0) {\n return null\n }\n\n // Look for -y flag and get the next argument\n const yIndex = args.indexOf('-y')\n if (yIndex !== -1 && yIndex + 1 < args.length) {\n return args[yIndex + 1]\n }\n\n // Look for --yes flag and get the next argument\n const yesIndex = args.indexOf('--yes')\n if (yesIndex !== -1 && yesIndex + 1 < args.length) {\n return args[yesIndex + 1]\n }\n\n // If no -y flag, find the first argument that doesn't start with -\n // Skip over option values (arguments following options that take values)\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n if (!arg.startsWith('-')) {\n // Check if this might be a value for a previous option\n if (i > 0) {\n const prevArg = args[i - 1]\n // Known options that take values\n if (prevArg === '--registry' || prevArg === '-r' || prevArg === '--package' || prevArg === '-p') {\n continue // Skip this as it's an option value\n }\n }\n return arg\n }\n }\n\n return null\n }\n\n /**\n * Extract the package name from uvx arguments\n * @param args - Array of arguments passed to uvx\n * @returns The package name/spec or null if not found\n */\n extractUvxPackageName (args: string[]): string | null {\n if (!args || args.length === 0) {\n return null\n }\n\n // For uvx, the first argument is always the package name\n return args[0]\n }\n\n /**\n * Extract the package name from uv arguments\n * @param args - Array of arguments passed to uv\n * @returns The package name/spec or null if not found\n */\n extractUvPackageName (args: string[]): string | null {\n if (!args || args.length === 0) {\n return null\n }\n\n // Find the 'run' argument and get the next one\n const runIndex = args.indexOf('run')\n if (runIndex !== -1 && runIndex + 1 < args.length) {\n return args[runIndex + 1]\n }\n\n return null\n }\n\n /**\n * Parse a package specification to extract name and version\n * @param packageSpec - Package specification (e.g., \"package@1.0.0\" or \"package\")\n * @returns Object with name and optional version\n */\n parsePackageVersion (packageSpec: string): { name: string; version?: string } {\n if (!packageSpec) {\n return { name: '', version: undefined }\n }\n\n // Handle scoped packages (e.g., @org/package@1.0.0)\n if (packageSpec.startsWith('@')) {\n const parts = packageSpec.split('@')\n if (parts.length === 2) {\n // Just @org/package with no version\n return { name: packageSpec, version: undefined }\n } else if (parts.length === 3) {\n // @org/package@version\n return {\n name: `@${parts[1]}`,\n version: parts[2]\n }\n }\n }\n\n // Handle regular packages (e.g., package@1.0.0)\n const atIndex = packageSpec.lastIndexOf('@')\n if (atIndex > 0) { // atIndex > 0 to avoid matching scoped packages starting with @\n return {\n name: packageSpec.substring(0, atIndex),\n version: packageSpec.substring(atIndex + 1)\n }\n }\n\n // No version specified\n return { name: packageSpec, version: undefined }\n }\n\n /**\n * Determine if a version represents a pinned version\n * @param version - The version string to check\n * @returns true if the version is pinned, false if it's latest/implicit\n */\n isPinnedVersion (version?: string): boolean {\n if (!version) {\n return false // No version = latest\n }\n\n if (version === 'latest') {\n return false // Explicit latest\n }\n\n // Any other version specification is considered pinned\n return true\n }\n}\n","/**\n * Utility functions for URL operations\n */\n\n/**\n * Extract hostname from a URL string\n * @param urlString - The URL string to extract hostname from\n * @returns The hostname if valid URL, or the original string if parsing fails\n */\nexport function extractHostname (urlString: string): string {\n try {\n // Handle URLs without protocol by adding a default one\n let urlToParse = urlString\n if (!urlToParse.includes('://')) {\n urlToParse = `http://${urlToParse}`\n }\n\n const url = new URL(urlToParse)\n return url.hostname\n } catch {\n // If URL parsing fails, return the original string\n return urlString\n }\n}\n","import { platform } from 'node:os'\nimport path from 'node:path'\nimport fs from 'node:fs/promises'\nimport util from 'node:util'\nimport { MCPPathRegistry, MCPConfigParser, DirectoryBubbleService } from 'agent-files'\nimport { CredentialDetectionService } from './credential-detection-service.js'\nimport { MCPVersionDetectionService } from './mcp-version-detection-service.js'\nimport { extractHostname } from '../utils/url-utils.js'\nimport {\n type MCPAppPathsRecord,\n type MCPFilePath,\n type MCPServerInfo,\n type MCPAppMetadata,\n type MCPFileGroupsResultRecord\n} from '../types/mcp-config-service.types.js'\n\nexport interface MCPConfigServiceOptions {\n enableDirectoryBubbling?: boolean\n}\n\ninterface RawMCPServerConfig {\n url?: string\n command?: string\n args?: string[]\n type?: 'sse' | 'http' | 'stdio' | 'streamable-http'\n env?: Record<string, string>\n headers?: Record<string, string>\n}\n\nexport class MCPConfigService {\n private pathRegistry: MCPPathRegistry\n private currentOS: string\n private debug: util.DebugLogger\n private directoryBubbleService: DirectoryBubbleService\n private versionDetectionService: MCPVersionDetectionService\n private enableDirectoryBubbling: boolean\n\n constructor (options: MCPConfigServiceOptions = {}) {\n this.pathRegistry = new MCPPathRegistry()\n this.currentOS = platform()\n this.debug = util.debuglog('ls-mcp')\n this.directoryBubbleService = new DirectoryBubbleService()\n this.versionDetectionService = new MCPVersionDetectionService()\n this.enableDirectoryBubbling = options.enableDirectoryBubbling ?? false\n }\n\n /**\n * Get MCP configuration files for a specific AI application on the current OS\n */\n getConfigFilesPerApp (appName: string): MCPFilePath[] {\n try {\n return this.pathRegistry.getPathsForApp(this.currentOS, appName) as MCPFilePath[]\n } catch (error) {\n throw new Error(`Failed to get config files for app '${appName}': ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get MCP configuration files for all AI applications on the current OS\n */\n getAllConfigFiles (): MCPAppPathsRecord {\n try {\n return this.pathRegistry.getPathsForOS(this.currentOS) as MCPAppPathsRecord\n } catch (error) {\n throw new Error(`Failed to get all config files: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get MCP servers configured for a specific AI application on the current OS\n */\n async getMCPServersPerApp (appName: string): Promise<MCPServerInfo[]> {\n try {\n const appPaths = this.getConfigFilesPerApp(appName)\n const allServers: MCPServerInfo[] = []\n\n for (const filePath of appPaths) {\n const servers = await this.parseConfigFileForServers(filePath.filePath)\n allServers.push(...servers)\n }\n\n return allServers\n } catch (error) {\n throw new Error(`Failed to get MCP servers for app '${appName}': ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get MCP servers configured for all AI applications on the current OS\n */\n async getAllMCPServers (): Promise<Record<string, MCPServerInfo[]>> {\n try {\n const allApps = this.pathRegistry.getSupportedApps(this.currentOS)\n const allServers: Record<string, MCPServerInfo[]> = {}\n\n for (const appName of allApps) {\n try {\n allServers[appName] = await this.getMCPServersPerApp(appName)\n } catch (error) {\n // Log error but continue with other apps\n this.debug(`Failed to get servers for app '${appName}': ${error instanceof Error ? error.message : 'Unknown error'}`)\n allServers[appName] = []\n }\n }\n\n return allServers\n } catch (error) {\n throw new Error(`Failed to get all MCP servers: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get metadata for all supported AI applications on the current OS\n */\n getSupportedApps (): MCPAppMetadata[] {\n try {\n const appNames = this.pathRegistry.getSupportedApps(this.currentOS)\n const appPaths = this.pathRegistry.getPathsForOS(this.currentOS)\n\n return appNames.map(appName => ({\n name: appName,\n friendlyName: this.getFriendlyName(appName),\n paths: (appPaths as MCPAppPathsRecord)[appName] || []\n }))\n } catch (error) {\n throw new Error(`Failed to get supported apps: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get all supported operating systems\n */\n getSupportedOperatingSystems (): string[] {\n return this.pathRegistry.getSupportedOperatingSystems()\n }\n\n /**\n * Validate if a configuration file exists and is parsable\n */\n async validateConfigFile (filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath)\n const parser = this.createParser(filePath)\n return await parser.isValidSyntax()\n } catch {\n return false\n }\n }\n\n /**\n * Create a parser instance (can be overridden for testing)\n */\n protected createParser (filePath: string): MCPConfigParser {\n return new MCPConfigParser(filePath)\n }\n\n /**\n * Get MCP file groups with resolved paths and server information\n */\n async getMCPFileGroups (): Promise<MCPFileGroupsResultRecord> {\n try {\n const appPaths = this.getAllConfigFiles()\n const mcpFilesPathsData: MCPFileGroupsResultRecord = {}\n\n for (const groupName of Object.keys(appPaths)) {\n const paths = appPaths[groupName]\n mcpFilesPathsData[groupName] = {\n name: groupName,\n friendlyName: this.getFriendlyName(groupName),\n paths: [],\n stats: { serversCount: 0 }\n }\n\n const uniqueFilePaths = new Set<string>()\n let totalServersCount = 0\n\n for (const filePathData of paths) {\n let resolvedPath = filePathData.filePath.replace('~', process.env.HOME || '')\n let absolutePath = path.resolve(resolvedPath)\n\n // For local paths, try to bubble up if not found in current directory and if enabled\n if (filePathData.type === 'local' && this.enableDirectoryBubbling) {\n try {\n await fs.access(resolvedPath)\n // File exists in current directory, no need to bubble up\n } catch {\n // File not found in current directory, try to bubble up\n const bubbledPath = await this.directoryBubbleService.findLocalConfigInParentDirectories(\n filePathData.filePath,\n process.cwd()\n )\n\n if (bubbledPath) {\n resolvedPath = bubbledPath\n absolutePath = path.resolve(resolvedPath)\n }\n }\n }\n\n if (uniqueFilePaths.has(absolutePath)) {\n continue\n }\n uniqueFilePaths.add(absolutePath)\n\n try {\n await fs.access(resolvedPath)\n\n const parser = this.createParser(resolvedPath)\n const parsable = await parser.isValidSyntax()\n filePathData.parsable = parsable\n\n if (parsable) {\n const configData = await parser.parseConfigFile()\n const servers = await this.convertToMCPServerInfo(configData.servers || {})\n filePathData.servers = servers\n totalServersCount += servers.length\n }\n\n mcpFilesPathsData[groupName].paths.push(filePathData)\n } catch (error) {\n // File does not exist or is not accessible, continue to next\n this.debug(`Skipping file ${resolvedPath}: ${error instanceof Error ? error.message : 'Unknown error'}`)\n }\n }\n\n if (mcpFilesPathsData[groupName] && mcpFilesPathsData[groupName].stats) {\n mcpFilesPathsData[groupName].stats.serversCount = totalServersCount\n }\n }\n\n return mcpFilesPathsData\n } catch (error) {\n throw new Error(`Failed to get MCP file groups: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Parse custom configuration files provided by the user\n * This method processes files independently of standard app-based discovery\n */\n async parseCustomFiles (filePaths: string[]): Promise<MCPFileGroupsResultRecord> {\n try {\n const mcpFilesPathsData: MCPFileGroupsResultRecord = {\n custom: {\n name: 'custom',\n friendlyName: 'Custom Files',\n paths: [],\n stats: { serversCount: 0 }\n }\n }\n\n let totalServersCount = 0\n\n for (const filePath of filePaths) {\n const resolvedPath = filePath.replace('~', process.env.HOME || '')\n const absolutePath = path.resolve(resolvedPath)\n\n try {\n // Check if file exists\n await fs.access(absolutePath)\n\n const parser = this.createParser(absolutePath)\n const parsable = await parser.isValidSyntax()\n\n const filePathData: MCPFilePath = {\n filePath: absolutePath,\n type: 'local',\n parsable\n }\n\n if (parsable) {\n const configData = await parser.parseConfigFile()\n const servers = await this.convertToMCPServerInfo(configData.servers || {})\n filePathData.servers = servers\n totalServersCount += servers.length\n } else {\n this.debug(`File ${absolutePath} has invalid syntax`)\n filePathData.servers = []\n }\n\n mcpFilesPathsData.custom.paths.push(filePathData)\n } catch (error) {\n // File does not exist or is not accessible\n this.debug(`Skipping file ${absolutePath}: ${error instanceof Error ? error.message : 'Unknown error'}`)\n\n // Still add to paths with parsable=false to show user it was attempted\n mcpFilesPathsData.custom.paths.push({\n filePath: absolutePath,\n type: 'local',\n parsable: false,\n servers: []\n })\n }\n }\n\n if (mcpFilesPathsData.custom.stats) {\n mcpFilesPathsData.custom.stats.serversCount = totalServersCount\n }\n\n return mcpFilesPathsData\n } catch (error) {\n throw new Error(`Failed to parse custom files: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Register a custom app with custom paths for the current OS\n */\n registerCustomApp (appName: string, paths: MCPFilePath[]): void {\n try {\n this.pathRegistry.registerCustomApp(this.currentOS, appName, paths)\n } catch (error) {\n throw new Error(`Failed to register custom app '${appName}': ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Parse a configuration file and return server information\n */\n private async parseConfigFileForServers (filePath: string): Promise<MCPServerInfo[]> {\n try {\n const parser = this.createParser(filePath)\n const configData = await parser.parseConfigFile()\n return await this.convertToMCPServerInfo(configData.servers || {})\n } catch (error) {\n this.debug(`Failed to parse config file ${filePath}: ${error instanceof Error ? error.message : 'Unknown error'}`)\n return []\n }\n }\n\n /**\n * Convert parsed server configs to MCPServerInfo format\n */\n private async convertToMCPServerInfo (servers: Record<string, RawMCPServerConfig>): Promise<MCPServerInfo[]> {\n const serverInfos: MCPServerInfo[] = []\n\n for (const [serverName, serverConfig] of Object.entries(servers)) {\n if (serverConfig && typeof serverConfig === 'object') {\n // Determine the source: extract hostname from URL or use command\n let source: string\n if (serverConfig.url) {\n source = extractHostname(serverConfig.url)\n } else {\n source = serverConfig.command || ''\n }\n\n // Analyze version information for stdio servers\n const versionInfo = this.versionDetectionService.analyzeServerVersion(\n serverConfig.command || '',\n Array.isArray(serverConfig.args) ? serverConfig.args : undefined\n )\n\n serverInfos.push({\n name: serverName,\n command: serverConfig.command || '',\n args: Array.isArray(serverConfig.args) ? serverConfig.args : undefined,\n transport: serverConfig.type === 'streamable-http' ? 'http' : serverConfig.type, // Map streamable-http to http\n type: serverConfig.type,\n source,\n env: serverConfig.env,\n headers: serverConfig.headers,\n status: 'stopped', // Default status, will be updated by server manager\n versionInfo: versionInfo || undefined,\n credentials: CredentialDetectionService.analyzeServerConfig({\n env: serverConfig.env,\n args: serverConfig.args,\n headers: serverConfig.headers\n })\n })\n }\n }\n\n return serverInfos\n }\n\n /**\n * Get friendly name for an app\n */\n private getFriendlyName (appName: string): string {\n const friendlyNames: Record<string, string> = {\n claude: 'Claude Desktop',\n claude_code: 'Claude Code',\n cursor: 'Cursor',\n vscode: 'VS Code',\n cline: 'Cline',\n windsurf: 'Windsurf',\n roo: 'Roo',\n 'intellij-github-copilot': 'IntelliJ GitHub Copilot',\n junie: 'IntelliJ Junie',\n zed: 'Zed',\n gemini: 'Gemini CLI'\n }\n\n return friendlyNames[appName] || appName\n }\n}\n","import path from 'node:path'\nimport { execSync } from 'node:child_process'\nimport { platform } from 'node:os'\nimport { extractHostname } from '../utils/url-utils.js'\n\ninterface MCPServerConfig {\n name: string\n command: string\n args?: string[]\n transport?: 'stdio' | 'sse' | 'http'\n url?: string\n type?: 'sse' | 'http' | 'stdio' | 'streamable-http'\n env?: Record<string, string>\n}\n\ninterface MatchedProcess {\n pid: string\n commandLine: string\n ppid?: string\n parentCommandLine?: string\n estimatedVendor?: string\n estimatedProduct?: string\n}\n\nexport class MCPServerManagerService {\n private name: string\n private command: string\n private args: string[]\n private transport?: 'stdio' | 'sse' | 'http'\n private source?: string\n private env?: Record<string, string>\n private running: boolean = false\n\n constructor (serverConfig: MCPServerConfig) {\n this.name = serverConfig.name\n this.command = serverConfig.command\n this.args = serverConfig.args || []\n this.transport = serverConfig.transport || 'stdio'\n if (serverConfig?.type && serverConfig.type === 'sse') {\n this.transport = 'sse'\n }\n if (serverConfig?.type && (serverConfig.type === 'http' || serverConfig.type === 'streamable-http')) {\n this.transport = 'http'\n }\n if (serverConfig?.type && serverConfig.type === 'stdio') {\n this.transport = 'stdio'\n }\n\n if (serverConfig.url) {\n this.source = extractHostname(serverConfig.url)\n this.transport = 'http' // URLs always use http transport\n } else {\n // Build the full command with arguments\n const fullCommand = [serverConfig.command, ...(serverConfig.args || [])].join(' ')\n this.source = fullCommand\n }\n this.env = serverConfig.env || {}\n }\n\n getName (): string {\n return this.name\n }\n\n getCmd (): string {\n return this.command\n }\n\n getArgs (): string[] {\n return this.args\n }\n\n getTransport (): 'stdio' | 'sse' | 'http' | undefined {\n return this.transport\n }\n\n getSource (): string | undefined {\n return this.source\n }\n\n getEnv (): Record<string, string> | undefined {\n return this.env\n }\n\n isRunning (): boolean | MatchedProcess {\n try {\n let psOutput: string\n\n if (platform() === 'win32') {\n // Windows: Use PowerShell Get-CimInstance to get process info\n psOutput = execSync('powershell -Command \"Get-CimInstance -ClassName Win32_Process | Select-Object ProcessId,Name,CommandLine,ParentProcessId | ConvertTo-Csv -NoTypeInformation\"', {\n encoding: 'utf8',\n timeout: 5000\n })\n } else {\n // Unix/Linux/macOS: Use ps command with pid, ppid, and args\n psOutput = execSync('ps -eao pid,ppid,args', {\n encoding: 'utf8',\n timeout: 5000\n })\n }\n\n const processMap = new Map<string, { ppid: string, commandTokens: string[] }>()\n const processes = psOutput.trim().split('\\n')\n\n for (const processLine of processes) {\n if (!processLine.trim()) continue\n\n let pid: string\n let ppid: string\n let commandLine: string\n\n if (platform() === 'win32') {\n // Parse Windows CSV format: ProcessId,Name,CommandLine,ParentProcessId\n // Skip header line\n if (processLine.startsWith('\"ProcessId\"') || processLine.startsWith('ProcessId')) continue\n\n const parts = this.parseCSVLine(processLine)\n if (parts.length < 4) continue\n pid = parts[0].trim() || ''\n // Skip Name (parts[1])\n commandLine = parts[2].trim() || ''\n ppid = parts[3].trim() || ''\n } else {\n // Parse Unix ps output: PID PPID COMMAND\n const match = processLine.trim().match(/^\\s*(\\d+)\\s+(\\d+)\\s+(.+)$/)\n if (!match) continue\n pid = match[1].trim() || ''\n ppid = match[2].trim() || ''\n commandLine = match[3].trim() || ''\n }\n\n // Parse command line and store in map\n const commandTokens = this.parseCommandLine(commandLine)\n if (commandTokens.length > 0) {\n processMap.set(pid, { ppid, commandTokens })\n }\n }\n\n // Then iterate the map to check for matches\n let mcpServerDetection: MatchedProcess | undefined\n\n for (const [pid, processData] of processMap) {\n const commandMatchLinux = this.isCommandMatch(processData.commandTokens)\n let commandMatchWin32 = false\n if (platform() === 'win32') {\n // for Windows, we need to change commandTokens to also match another pattern\n // where the command starts with `cmd` then follows potentially several command-line\n // flags like /c /d and then the actual command.\n // This is because Claude Desktop on Windows automatically starts MCP Servers like that\n // even if the command specified in the MCP config is just `uvx` or `npx`.\n\n let commandTokensOnWin32 = processData.commandTokens\n if (commandTokensOnWin32.length > 0 && commandTokensOnWin32[0].toLowerCase().startsWith('cmd')) {\n // If the first token is 'cmd', we need to skip it and check the next tokens\n commandTokensOnWin32 = commandTokensOnWin32.slice(1)\n\n // Skip any additional flags like /c, /d, etc.\n while (commandTokensOnWin32.length > 0 && commandTokensOnWin32[0].startsWith('/')) {\n commandTokensOnWin32 = commandTokensOnWin32.slice(1)\n }\n }\n\n commandMatchWin32 = this.isCommandMatch(commandTokensOnWin32)\n }\n\n const commandMatch = commandMatchLinux || commandMatchWin32\n\n if (commandMatch) {\n mcpServerDetection = {\n pid,\n commandLine: processData.commandTokens.join(' '),\n ppid: processData.ppid,\n }\n\n // if we matched the command let's extract the parent command information\n const parentProcess = processMap.get(processData.ppid)\n if (parentProcess) {\n const { estimatedVendor, estimatedProduct } = this.getVendorFromCommand(parentProcess.commandTokens) || {}\n\n if (estimatedProduct || estimatedVendor) {\n mcpServerDetection = {\n ...mcpServerDetection,\n parentCommandLine: parentProcess.commandTokens.join(' '),\n estimatedVendor,\n estimatedProduct\n }\n\n return mcpServerDetection\n }\n }\n }\n }\n\n if (mcpServerDetection) {\n return mcpServerDetection\n }\n\n return false\n } catch {\n return false\n }\n }\n\n private getVendorFromCommand (commandTokens: string[]): { estimatedVendor: string, estimatedProduct: string } | undefined {\n // match based on known vendor patterns in the command string\n const commandString = commandTokens.join(' ').toLowerCase()\n if (commandString.includes('claude.app')) {\n return {\n estimatedVendor: 'anthropic',\n estimatedProduct: 'claude-desktop'\n }\n }\n\n if (commandString.includes('claude')) {\n return {\n estimatedVendor: 'anthropic',\n estimatedProduct: 'claude-desktop'\n }\n }\n\n if (commandString.includes('cursor')) {\n return {\n estimatedVendor: 'cursor',\n estimatedProduct: 'cursor'\n }\n }\n\n if (commandString.includes('visual studio code') || commandString.includes('vscode')) {\n return {\n estimatedVendor: 'vscode',\n estimatedProduct: 'vscode'\n }\n }\n }\n\n private isCommandMatch (commandTokens: string[]): boolean {\n // If no command tokens, cannot match\n if (commandTokens.length === 0) return false\n\n // Extracts the base command from the full command path of the process output list\n // e.g. \"/usr/homebrew/bin/uv\" extracted to \"uv\"\n const baseCommand = this.getBaseCommand(commandTokens[0])\n\n const commandInConfig: string = this.getBaseCommand(this.command)\n\n // Map configured command to actual process command for uvx case\n if (commandInConfig === 'uvx' && baseCommand === 'uv') {\n return this.matchUvxProcess(commandTokens)\n }\n\n // Map configured command to actual process command for npx case\n if (commandInConfig === 'npx' && baseCommand === 'npm') {\n return this.matchNpxProcess(commandTokens)\n }\n\n /*\n example config:\n \"test_server_2\": {\n \"command\": \"uv\",\n \"args\": [\n \"--directory\",\n \"/Users/lirantal/projects/repos/example-python-mcp-server\",\n \"run\",\n \"test-server.py\"\n ]\n },\n */\n if (commandInConfig === 'uv' && baseCommand === 'uv') {\n return this.matchGenericArgsToArgs(commandTokens)\n }\n\n // Python Generic commands matching\n /*\n example config:\n \"test_server\": {\n \"command\": \"/Users/lirantal/projects/repos/example-python-mcp-server/.venv/bin/python\",\n \"args\": [\n \"/Users/lirantal/projects/repos/example-python-mcp-server/test-server.py\"\n ]\n }\n */\n const commandConfigPythonBase: string = this.getBaseCommand(this.command)\n const commandAliasesPython = ['python3', 'python', 'python3.10', 'python3.11', 'python3.12', 'cpython3', 'cpython', 'python3', 'python2']\n if (commandAliasesPython.includes(commandConfigPythonBase) && commandAliasesPython.includes(baseCommand)) {\n return this.matchGenericArgsToArgs(commandTokens)\n }\n\n // Match generic commands with their args, one to one\n // this matches commands like `node`\n const commandGenericBase: string = this.getBaseCommand(this.command)\n const commandGenericProcessBase: string = this.getBaseCommand(commandTokens[0])\n if (commandGenericBase === commandGenericProcessBase) {\n return this.matchGenericArgsToArgs(commandTokens)\n }\n\n return false\n }\n\n private matchGenericArgsToArgs (commandTokens: string[]): boolean {\n if (this.args.length === 0) {\n // If no args configured, we just check if the command matches\n return commandTokens[0] === this.command\n }\n\n if (commandTokens.length < 2) {\n // If there are no command tokens or only the command itself, we cannot match\n return false\n }\n\n // Remove the command from the command tokens\n const commandWithoutArgs = commandTokens.slice(1)\n\n for (let i = 0; i < this.args.length; i++) {\n // If we reach the end of command tokens, we cannot match\n if (i >= commandWithoutArgs.length) return false\n\n const arg = this.args[i].toLowerCase()\n const token = commandWithoutArgs[i].toLowerCase()\n\n // Check if the argument matches the command token\n if (arg !== token && !token.includes(arg)) {\n return false\n }\n }\n\n // If we reached here, we matched all arguments\n return true\n }\n\n private getBaseCommand (fullCommandPath: string): string {\n // Extract base command name from full path\n let baseCommand = path.basename(fullCommandPath)\n // Detect if we're on Windows and if so we omit the .exe extension\n if (platform() === 'win32') {\n baseCommand = path.basename(fullCommandPath, '.exe')\n }\n\n // In any case, we want to return the base command as lowercase\n baseCommand = baseCommand.toLowerCase()\n return baseCommand\n }\n\n /*\n example1:\n ```\n \"command\": \"uvx\",\n \"args\": [\"--from\", \"mcp-alchemy==2025.5.2.210242\", \"--with\", \"oracledb\",\n \"--refresh-package\", \"mcp-alchemy\", \"mcp-alchemy\"],\n ```\n\n example 2:\n ```\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-neo4j-memory@0.1.4\",\n \"--db-url\",\n \"neo4j+s://xxxx.databases.neo4j.io\",\n \"--username\",\n \"<your-username>\",\n \"--password\",\n \"<your-password>\"\n ]\n ```\n\n example 3:\n ```\n \"vefaas\": {\n \"command\": \"uvx\",\n \"args\": [\n \"--from\",\n \"git+https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_vefaas_function\",\n \"mcp-server-vefaas-function\"\n ],\n \"env\": {\n \"VOLC_ACCESSKEY\": \"xxx\",\n \"VOLC_SECRETKEY\": \"xxx\"\n }\n }\n }\n ```\n\n example 4:\n ```\n \"time\": {\n \"command\": \"uvx\",\n \"args\": [\"mcp-server-time\", \"--local-timezone=America/New_York\"]\n }\n ```\n */\n private getUvxMcpServerNameFromArgs (): string | undefined {\n if (this.args.length === 0) return undefined\n\n let mcpServerName\n\n // If total args is 1 we know it is the MCP server name\n if (this.args.length === 1) {\n mcpServerName = this.args[0]\n return mcpServerName\n }\n\n // Extract the MCP server name from --from flag if it exists\n for (let i = 0; i < this.args.length; i++) {\n if (this.args[i] === '--from' && i + 1 < this.args.length) {\n mcpServerName = this.args[i + 1]\n return mcpServerName\n }\n }\n\n // If no use of --from flag, we try to extract the MCP server name from the last argument\n const firstArg = this.args[0]\n if (firstArg.startsWith('-') || firstArg.startsWith('--')) {\n // If the first argument is a flag, take the last argument as the MCP server name\n const lastArg = this.args[this.args.length - 1]\n mcpServerName = lastArg\n return mcpServerName\n }\n\n // If the first argument is not a flag, take it as the MCP server name\n mcpServerName = firstArg\n return mcpServerName\n }\n\n private matchUvxProcess (commandTokens: string[]): boolean {\n if (commandTokens.length === 0) return false\n\n // We already matched the base command as \"uv\" for uvx\n // Let's get the MCP server name from the args in command configuration\n const mcpServerName = this.getUvxMcpServerNameFromArgs()\n if (!mcpServerName) return false\n\n // Check if the command tokens contain the MCP server name\n // const expectedArgs = [mcpServerName, ...this.args]\n return this.findMcpServerNameInProcessArguments(commandTokens, mcpServerName)\n }\n\n private findMcpServerNameInProcessArguments (commandTokens: string[], mcpServerName: string): boolean {\n // Check if the command tokens contain the MCP server name\n for (let i = 0; i < commandTokens.length; i++) {\n const token = commandTokens[i].toLowerCase()\n const normalizedMcpServerName = mcpServerName.toLowerCase()\n\n if (normalizedMcpServerName === token || token.includes(normalizedMcpServerName)) {\n // If we find the MCP server name in the command tokens, we consider it a match\n return true\n }\n }\n return false\n }\n\n private parseCSVLine (line: string): string[] {\n const result: string[] = []\n let current = ''\n let inQuotes = false\n\n for (let i = 0; i < line.length; i++) {\n const char = line[i]\n\n if (char === '\"') {\n if (inQuotes && line[i + 1] === '\"') {\n // Escaped quote\n current += '\"'\n i++ // Skip next quote\n } else {\n // Toggle quote state\n inQuotes = !inQuotes\n }\n } else if (char === ',' && !inQuotes) {\n result.push(current)\n current = ''\n } else {\n current += char\n }\n }\n\n result.push(current)\n return result\n }\n\n private parseCommandLine (commandLine: string): string[] {\n const tokens: string[] = []\n let current = ''\n let inQuotes = false\n let quoteChar = ''\n\n for (let i = 0; i < commandLine.length; i++) {\n const char = commandLine[i]\n\n if (!inQuotes && (char === '\"' || char === \"'\")) {\n inQuotes = true\n quoteChar = char\n } else if (inQuotes && char === quoteChar) {\n inQuotes = false\n quoteChar = ''\n } else if (!inQuotes && char === ' ') {\n if (current.trim()) {\n tokens.push(current.trim())\n current = ''\n }\n } else {\n current += char\n }\n }\n\n if (current.trim()) {\n tokens.push(current.trim())\n }\n\n return tokens\n }\n\n /*\n example to match:\n ```\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://localhost/mydb\"\n ]\n }\n ```\n\n with a process command like:\n ```\n npm exec @modelcontextprotocol/server-postgres postgresql://localhost/mydb\n ```\n */\n private matchNpxProcess (commandTokens: string[]): boolean {\n // npx command pattern: npm exec <package> [args...]\n // Expected command tokens: [\"npm\", \"exec\", package_name, ...args]\n\n if (commandTokens.length < 3) return false\n\n // Check if it's the expected npm exec pattern\n if (commandTokens[1] !== 'exec') return false\n\n let argsToMatch: string[]\n const yIndex = this.args.indexOf('-y')\n\n if (yIndex !== -1 && yIndex + 1 < this.args.length) {\n // Case 1: -y flag is present, extract args after it\n argsToMatch = this.args.slice(yIndex + 1)\n } else {\n // Case 2: No -y flag, match all args directly\n argsToMatch = this.args\n }\n\n // Match the args after \"npm exec\" with the extracted args from config\n // commandTokens: [\"npm\", \"exec\", package_name, ...additional_args]\n // argsToMatch: [package_name, ...additional_args]\n\n if (commandTokens.length - 2 !== argsToMatch.length) {\n // Length mismatch between process args and config args\n return false\n }\n\n // Compare each argument starting from position 2 in commandTokens\n for (let i = 0; i < argsToMatch.length; i++) {\n // Start from index 2 (after \"npm exec\")\n const commandToken = commandTokens[i + 2].toLowerCase()\n const expectedArg = argsToMatch[i].toLowerCase()\n\n if (commandToken !== expectedArg) {\n return false\n }\n }\n\n return true\n }\n}\n","import { MCPConfigService } from './services/mcp-config-service.js'\nimport { MCPServerManagerService } from './services/mcp-server-manager-service.js'\nimport { type MCPFileGroupsResultRecord } from './types/mcp-config-service.types.js'\n\nexport class MCPFiles {\n private mcpConfigService: MCPConfigService\n private customFiles?: string[]\n\n constructor (customFiles?: string[]) {\n // Enable directory bubbling for better DX when running from nested directories\n this.mcpConfigService = new MCPConfigService({ enableDirectoryBubbling: true })\n this.customFiles = customFiles\n }\n\n /**\n * Find and process all MCP configuration files\n * If customFiles are provided, only those files are processed (replaces automatic discovery)\n */\n async findFiles (): Promise<MCPFileGroupsResultRecord> {\n try {\n // If custom files are specified, use them instead of automatic discovery\n if (this.customFiles && this.customFiles.length > 0) {\n const mcpFilesPathsData = await this.mcpConfigService.parseCustomFiles(this.customFiles)\n\n // Process each group to add server status information\n for (const groupName of Object.keys(mcpFilesPathsData)) {\n const group = mcpFilesPathsData[groupName]\n\n for (const filePathData of group.paths) {\n if (filePathData.servers && filePathData.servers.length > 0) {\n // Update server status for each server in this file\n for (const server of filePathData.servers) {\n const serverConfig = {\n name: server.name,\n command: server.command,\n args: server.args,\n transport: server.transport,\n type: server.type,\n env: server.env\n }\n\n const serverManager = new MCPServerManagerService(serverConfig)\n const processDetection = serverManager.isRunning()\n\n // Determine if the server is running\n let isRunning = false\n if (processDetection) {\n if (typeof processDetection === 'object' && processDetection.estimatedProduct === group.name) {\n isRunning = true\n }\n }\n\n server.status = isRunning ? 'running' : 'stopped'\n }\n }\n }\n }\n\n return mcpFilesPathsData\n }\n\n // Get MCP file groups with basic server information\n const mcpFilesPathsData = await this.mcpConfigService.getMCPFileGroups()\n\n // Process each group to add server status information\n for (const groupName of Object.keys(mcpFilesPathsData)) {\n const group = mcpFilesPathsData[groupName]\n\n for (const filePathData of group.paths) {\n if (filePathData.servers && filePathData.servers.length > 0) {\n // Update server status for each server in this file\n for (const server of filePathData.servers) {\n const serverConfig = {\n name: server.name,\n command: server.command,\n args: server.args,\n transport: server.transport, // transport is always populated from type in the data layer\n type: server.type,\n env: server.env\n }\n\n const serverManager = new MCPServerManagerService(serverConfig)\n const processDetection = serverManager.isRunning()\n\n // Determine if the server is running\n let isRunning = false\n if (processDetection) {\n if (typeof processDetection === 'object' && processDetection.estimatedProduct === group.name) {\n isRunning = true\n }\n }\n\n server.status = isRunning ? 'running' : 'stopped'\n }\n }\n }\n }\n\n return mcpFilesPathsData\n } catch (error) {\n throw new Error(`Failed to find MCP files: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error })\n }\n }\n\n /**\n * Get MCP configuration service instance for advanced operations\n */\n getMCPConfigService (): MCPConfigService {\n return this.mcpConfigService\n }\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = text.toUpperCase()\n let data = ''\n\n if (formattedText === 'STDIO') {\n data = styleText(['magenta'], formattedText)\n }\n\n if (formattedText === 'SSE') {\n data = styleText(['blue'], formattedText)\n }\n\n if (formattedText === 'HTTP') {\n data = styleText(['blue'], formattedText)\n }\n\n return data\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = String(text).toUpperCase()\n const data = styleText(['dim'], formattedText)\n\n return data\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = text.toLowerCase()\n let data: string\n if (formattedText === 'running') {\n data = styleText(['green'], '●')\n } else {\n data = styleText(['red'], '●')\n }\n\n return data\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = text.toLowerCase()\n\n const data = styleText(['bold', 'white'], formattedText)\n\n return data\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = String(text).trim()\n\n return styleText(['gray'], formattedText)\n}\n","import { styleText } from 'node:util'\nimport type { PackageVersionInfo } from '../types/mcp-config-service.types.js'\n\nexport default function render (versionInfo?: PackageVersionInfo): string {\n if (!versionInfo) {\n return ''\n }\n\n const version = versionInfo.version || 'LATEST'\n const displayVersion = version === 'latest' ? 'LATEST' : version\n\n if (versionInfo.isPinned) {\n // Green circle for pinned versions (stable/safe)\n return styleText(['green'], '●') + ' ' + displayVersion\n } else {\n // Red circle for latest versions (higher risk)\n return styleText(['red'], '●') + ' ' + 'LATEST'\n }\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = text\n const data = styleText(['underline'], formattedText)\n\n return data\n}\n","import { styleText } from 'node:util'\n\nexport default function render (text: string) {\n const formattedText = text.toUpperCase().replace(/_/g, ' ')\n let data: string\n if (formattedText === 'VALID') {\n data = styleText(['green'], '●')\n } else {\n data = styleText(['red'], '●')\n }\n\n return data\n}\n","import { styleText } from 'node:util'\nimport { type CredentialAnalysisResult } from '../types/mcp-config-service.types.js'\n\nexport default function CredentialWarningComponent (credentials: CredentialAnalysisResult | undefined): string {\n if (!credentials || !credentials.hasCredentials) {\n return ''\n }\n\n const { riskLevel, credentialVars } = credentials\n\n // Color coding based on risk level\n let riskColor: 'red' | 'blue'\n let riskIcon: string\n\n switch (riskLevel) {\n case 'high':\n riskColor = 'red'\n riskIcon = styleText(['red'], '●')\n break\n case 'low':\n riskColor = 'blue'\n riskIcon = styleText(['blue'], '●')\n break\n default:\n riskColor = 'blue'\n riskIcon = styleText(['blue'], '●')\n }\n\n const riskText = styleText([riskColor], `${riskIcon} ${riskLevel.toUpperCase()} RISK`)\n\n // Group credentials by source for better organization\n const credsBySource = credentialVars.reduce((acc, cv) => {\n const source = cv.source || 'env' // Default to env for backward compatibility\n if (!acc[source]) {\n acc[source] = []\n }\n acc[source].push(cv)\n return acc\n }, {} as Record<string, typeof credentialVars>)\n\n // Create summary with source grouping\n const sourceSummaries = Object.entries(credsBySource).map(([source, creds]) => {\n const sourceIcon = getSourceIcon(source)\n const credList = creds.map(cv => `${cv.name}=${cv.value}`).join(', ')\n return `${sourceIcon}${source}: ${credList}`\n })\n\n const credentialSummary = sourceSummaries.join(' | ')\n\n return `${riskText} ${styleText(['dim'], `(${credentialVars.length} creds: ${credentialSummary})`)}`\n}\n\n/**\n * Get an icon/symbol for different credential sources\n */\nfunction getSourceIcon (source: string): string {\n switch (source) {\n case 'env':\n return '🌱 ' // Environment variable\n case 'args':\n return '⚡ ' // Command argument\n case 'headers':\n return '🔗 ' // HTTP header\n default:\n return '📋 ' // Unknown/generic\n }\n}\n","import { styleText } from 'node:util'\n\ninterface SummaryStats {\n totalServers: number\n runningServers: number\n highRiskCredentials: number\n implicitLatestVersions: number\n transportBreakdown: {\n stdio: number\n sse: number\n http: number\n }\n}\n\nexport default function SummaryComponent (stats: SummaryStats): string {\n const { totalServers, runningServers, highRiskCredentials, implicitLatestVersions, transportBreakdown } = stats\n\n // Create progress bars (20 characters wide, following existing convention)\n const runningBar = createProgressBar(runningServers, totalServers, 20, 'green', false)\n const securityBar = createProgressBar(highRiskCredentials, totalServers, 20, 'red', true)\n const versionBar = createProgressBar(implicitLatestVersions, totalServers, 20, 'red', true)\n\n // Format transport breakdown\n const transportText = `stdio: ${transportBreakdown.stdio} | SSE: ${transportBreakdown.sse} | HTTP: ${transportBreakdown.http}`\n\n // Build the summary output\n const lines = [\n 'SUMMARY',\n ` SERVERS ${runningBar} ${runningServers} / ${totalServers} Running`,\n ` SECURITY ${securityBar} ${highRiskCredentials} / ${totalServers} High Risk Credentials`,\n ` VERSION ${versionBar} ${implicitLatestVersions} / ${totalServers} Implicit Latest`,\n ` TRANSPORT ${transportText}`\n ]\n\n return lines.join('\\n')\n}\n\nfunction createProgressBar (count: number, total: number, width: number, color: 'green' | 'red', emptyIsGood: boolean = false): string {\n if (total === 0) {\n const emptyBar = '░'.repeat(width)\n return emptyBar\n }\n\n const progress = Math.min(count / total, 1)\n const filledWidth = Math.round(progress * width)\n const emptyWidth = width - filledWidth\n\n let filled: string\n let empty: string\n\n if (color === 'green') {\n filled = styleText(['greenBright'], '█'.repeat(filledWidth))\n empty = styleText(['green'], '░'.repeat(emptyWidth))\n } else { // red\n filled = styleText(['redBright'], '█'.repeat(filledWidth))\n // If count is 0 and emptyIsGood is true, use green for empty sections (0 issues is good)\n if (count === 0 && emptyIsGood) {\n empty = styleText(['green'], '░'.repeat(emptyWidth))\n } else {\n empty = styleText(['red'], '░'.repeat(emptyWidth))\n }\n }\n\n return `${filled}${empty}`\n}\n","import { styleText } from 'node:util'\nimport TransportComponent from '../components/transport.js'\nimport ColumnNameComponent from '../components/column-name.js'\nimport MCPServerStatusComponent from '../components/mcp-server-status.js'\nimport MCPServerNameComponent from '../components/mcp-server-name.js'\nimport MCPServerSourceComponent from '../components/mcp-server-source.js'\nimport MCPServerVersionComponent from '../components/mcp-server-version.js'\nimport FilePathComponent from '../components/file-path.js'\nimport MCPServersConfigParsableComponent from '../components/mcp-servers-config-parsable.js'\nimport CredentialWarningComponent from '../components/credential-warning.js'\nimport SummaryComponent from '../components/summary.js'\nimport type { MCPServerInfo } from '../types/mcp-config-service.types.js'\n\ninterface GroupMetadata {\n mcpServersRunning?: number\n mcpServersTotal?: number\n}\n\ninterface SummaryStats {\n totalServers: number\n runningServers: number\n highRiskCredentials: number\n implicitLatestVersions: number\n transportBreakdown: {\n stdio: number\n sse: number\n http: number\n }\n}\n\nexport class RenderService {\n // Example mocked data for rendering the servers information\n // const mcpServersDataMock = [\n // { status: '●', name: 'logging-server', type: 'SSE', version: '2.3.0', tools: '6', resources: '2' },\n // { status: '●', name: 'git-logging-server', type: 'SSE', version: '2.3.0', tools: '6', resources: '2' },\n // { status: '○', name: 'mcp-server', type: 'STDIO', version: '2.3.0', tools: '62', resources: '0' }\n // ]\n\n private static getVisibleLength (text: string): number {\n // Calculate visible length by removing ANSI escape codes\n return text.replace(/\\u001b\\[[0-9;]*m/g, '').length\n }\n\n static printMcpServers (data: MCPServerInfo[]) {\n if (data.length === 0) return\n\n const headers = ['STATUS', 'NAME', 'VERSION', 'SOURCE', 'TRANSPORT', 'CREDENTIALS']\n const keys = ['status', 'name', 'versionInfo', 'source', 'transport', 'credentials']\n const centerColumns = [0, 3, 4] // STATUS, SOURCE and TRANSPORT column indices\n const leftPadding = ' ' // 6 characters\n\n // Calculate column widths accounting for styled text\n const columnWidths = headers.map((header, index) => {\n const headerWidth = RenderService.getVisibleLength(ColumnNameComponent(header))\n const dataWidth = Math.max(...data.map(row => {\n let text = String((row as unknown as Record<string, unknown>)[keys[index]])\n\n // Apply the same transformations used in rendering\n if (keys[index] === 'transport') {\n text = TransportComponent(text)\n }\n\n if (keys[index] === 'status') {\n text = MCPServerStatusComponent(text)\n }\n\n if (keys[index] === 'source') {\n text = MCPServerSourceComponent(text)\n }\n\n if (keys[index] === 'name') {\n text = MCPServerNameComponent(text)\n }\n\n if (keys[index] === 'versionInfo') {\n text = MCPServerVersionComponent(row.versionInfo)\n }\n\n if (keys[index] === 'credentials') {\n text = CredentialWarningComponent(row.credentials)\n }\n\n return RenderService.getVisibleLength(text)\n }))\n return Math.max(headerWidth, dataWidth)\n })\n\n // Helper function to center text in a given width\n const centerText = (text: string, width: number): string => {\n const visibleLength = RenderService.getVisibleLength(text)\n const padding = width - visibleLength\n const leftPad = Math.floor(padding / 2)\n const rightPad = padding - leftPad\n return ' '.repeat(leftPad) + text + ' '.repeat(rightPad)\n }\n\n // Helper function to pad text to the right\n const padRight = (text: string, width: number): string => {\n const visibleLength = RenderService.getVisibleLength(text)\n const padding = Math.max(0, width - visibleLength)\n return text + ' '.repeat(padding)\n }\n\n // Calculate total table width for separator line\n const totalWidth = columnWidths.reduce((sum, width) => sum + width, 0) + (columnWidths.length - 1) * 2\n const separator = '─'.repeat(totalWidth)\n\n // Print top separator\n console.log('\\n' + leftPadding + separator)\n\n // Print header\n const headerRow = headers.map((header, index) => {\n const headerText = ColumnNameComponent(header)\n if (centerColumns.includes(index)) {\n return centerText(headerText, columnWidths[index])\n }\n return padRight(headerText, columnWidths[index])\n }).join(' ')\n console.log(leftPadding + headerRow)\n\n // Print separator\n console.log(leftPadding + separator)\n\n // Print data rows\n for (const row of data) {\n const dataRow = keys.map((key, index) => {\n let text = String((row as unknown as Record<string, unknown>)[key])\n\n // Apply styling transformations\n if (key === 'transport') {\n text = TransportComponent(text)\n }\n\n if (key === 'status') {\n text = MCPServerStatusComponent(text)\n }\n\n if (keys[index] === 'source') {\n text = MCPServerSourceComponent(text)\n }\n\n if (key === 'name') {\n text = MCPServerNameComponent(text)\n }\n\n if (key === 'versionInfo') {\n text = MCPServerVersionComponent(row.versionInfo)\n }\n\n if (key === 'credentials') {\n text = CredentialWarningComponent(row.credentials)\n }\n\n // Apply alignment\n if (centerColumns.includes(index)) {\n return centerText(text, columnWidths[index])\n }\n return padRight(text, columnWidths[index])\n }).join(' ')\n console.log(leftPadding + dataRow)\n }\n }\n\n // Example mocked data for rendering the group information\n // const mcpGroupDataMock = [\n // { key: 'PROVIDER', value: 'Claude Desktop', },\n // { key: 'FILE', value: '~/Library/Application Support/Claude/claude_desktop_config.json' },\n // { key: 'STATUS', value: '[✓ VALID] [GLOBAL] [5 MCP SERVERS]' }\n // ]\n\n static printMcpGroup (id: number, data: Array<Record<string, string>>, groupMetadata: GroupMetadata = {}) {\n if (data.length === 0) return\n\n console.log('\\n')\n\n const headers = ['KEY', 'VALUE']\n const keys = ['key', 'value']\n\n // group left padding should include the indicator number\n // and then calculator for the remaining right padding.\n // left padding in total is 6 characters\n const indexText = `[${id}]`\n const leftPaddingGroupLead = indexText + ' '.repeat(6 - indexText.length)\n const leftPaddingGroupData = ' '.repeat(6)\n\n // Append group metadata keys to the data array\n if (Object.keys(groupMetadata).length > 0) {\n const runningCount = groupMetadata.mcpServersRunning || 0\n const totalCount = groupMetadata.mcpServersTotal || 0\n const metadataRow = RenderService.renderProgressBar(runningCount, totalCount, 'Running')\n data.push({ key: 'MCP SERVERS', value: metadataRow })\n }\n\n // Calculate column widths\n const columnWidths = headers.map((header, index) => {\n const dataWidth = Math.max(...data.map(row => {\n const columnText = ColumnNameComponent(row[keys[index]])\n const columnTextLength = RenderService.getVisibleLength(columnText)\n return columnTextLength\n }))\n return Math.max(header.length, dataWidth)\n })\n\n // Print data rows\n for (const [index, row] of data.entries()) {\n const dataRow = keys.map((key, index) => {\n const paddingNormalizer = ColumnNameComponent(row[key]).length - row[key].length\n if (key === 'key') {\n return ColumnNameComponent(row[key]).padEnd(columnWidths[index] + paddingNormalizer)\n }\n\n if (row['key'] === 'FILE') {\n return FilePathComponent(row[key]).padEnd(columnWidths[index] + paddingNormalizer)\n }\n\n if (row['key'] === 'PARSABLE') {\n return MCPServersConfigParsableComponent(row[key]).padEnd(columnWidths[index] + paddingNormalizer)\n }\n\n return String(row[key]).padEnd(columnWidths[index] + paddingNormalizer)\n }).join(' ')\n const leftPadding = index === 0 ? leftPaddingGroupLead : leftPaddingGroupData\n console.log(leftPadding + dataRow)\n }\n }\n\n // draws progress bar components like this\n // \"███████░░░░░░░░░░░░░ 3 / 9 Running\"\n static renderProgressBar (count: number, total: number, label: string, width: number = 20): string {\n if (total === 0) {\n const emptyBar = '░'.repeat(width)\n return `${emptyBar} 0 / 0 ${label}`\n }\n\n const progress = Math.min(count / total, 1)\n const filledWidth = Math.round(progress * width)\n const emptyWidth = width - filledWidth\n\n let filled: string\n let empty: string\n\n if (count > 0) {\n filled = styleText(['greenBright'], '█'.repeat(filledWidth))\n empty = styleText(['green'], '░'.repeat(emptyWidth))\n } else {\n filled = '█'.repeat(filledWidth)\n empty = '░'.repeat(emptyWidth)\n }\n\n return `${filled}${empty} ${count} / ${total} ${label}`\n }\n\n /**\n * Print summary statistics at the end of the output\n */\n static printSummary (stats: SummaryStats): void {\n console.log('\\n')\n console.log(' ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄')\n console.log()\n\n const summaryOutput = SummaryComponent(stats)\n const lines = summaryOutput.split('\\n')\n\n for (const line of lines) {\n if (line === 'SUMMARY') {\n console.log(' ' + line)\n } else {\n console.log(' ' + line)\n }\n }\n\n console.log()\n console.log(' ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄')\n }\n}\n","#!/usr/bin/env node\n\nimport { styleText } from 'node:util'\nimport { MCPFiles } from '../main.ts'\nimport { RenderService } from '../services/render-service.ts'\n\ninterface MCPServerInfo {\n name: string\n command: string\n args?: string[]\n transport?: 'stdio' | 'sse' | 'http'\n type?: 'sse' | 'http' | 'stdio' | 'streamable-http'\n source?: string\n env?: Record<string, string>\n status?: 'running' | 'stopped'\n credentials?: unknown\n}\n\n// Parse command-line arguments\nconst args = process.argv.slice(2)\nconst jsonOutput = args.includes('--json')\nconst showAll = args.includes('--all') || args.includes('-a')\n\n// Parse --files flag\nlet customFiles: string[] | undefined\nconst filesIndex = args.findIndex(arg => arg === '--files')\nif (filesIndex !== -1 && filesIndex < args.length - 1) {\n // Get all arguments after --files until we hit another flag or end of args\n const fileArgs: string[] = []\n for (let i = filesIndex + 1; i < args.length; i++) {\n if (args[i].startsWith('--')) {\n break\n }\n fileArgs.push(args[i])\n }\n\n // Support both comma-separated and space-separated file paths\n customFiles = fileArgs.flatMap(arg =>\n arg.includes(',') ? arg.split(',').map(f => f.trim()) : [arg.trim()]\n ).filter(f => f.length > 0)\n}\n\nasync function init () {\n // Start the CLI with a new line for better readability (only in non-JSON mode)\n if (!jsonOutput) {\n console.log()\n if (customFiles && customFiles.length > 0) {\n console.log('[+] Analyzing specified MCP configuration files...')\n } else {\n console.log('[+] Detecting MCP Server configurations...')\n }\n }\n\n const mcpFilesManager = new MCPFiles(customFiles)\n const mcpFilesList = await mcpFilesManager.findFiles()\n\n if (Object.keys(mcpFilesList).length === 0) {\n exitWithError('No configuration for MCP Server applications found.')\n }\n\n let pathIndex = 0\n let totalServers = 0\n let totalRunning = 0\n let totalHighRiskCredentials = 0\n let totalImplicitLatestVersions = 0\n const transportCounts = { stdio: 0, sse: 0, http: 0 }\n\n for (const groupName of Object.keys(mcpFilesList)) {\n const group = mcpFilesList[groupName]\n\n // Skip groups with zero servers unless --all is specified or in --files mode\n const isCustomFilesMode = customFiles && customFiles.length > 0\n const shouldSkipGroup = !showAll && !isCustomFilesMode && (group.stats?.serversCount === 0)\n if (shouldSkipGroup) {\n continue\n }\n\n if (group.paths.length > 0) {\n // handle file path list of MCP Servers\n for (const filePathData of group.paths) {\n const totalMCPServers = filePathData.servers ? filePathData.servers.length : 0\n\n // Skip file paths with zero servers unless --all is specified or in --files mode\n const shouldSkipFile = !showAll && !isCustomFilesMode && totalMCPServers === 0\n if (shouldSkipFile) {\n continue\n }\n\n pathIndex++\n\n const filePath = filePathData.filePath.replace('~', process.env.HOME || '')\n const filePathValid = filePathData.parsable ? 'VALID' : 'INVALID'\n const filePathDataType = filePathData.type.toUpperCase()\n const mcpServers = filePathData.servers || []\n\n const totalMCPServersRunning = mcpServers.filter((server: MCPServerInfo) => server.status === 'running').length\n\n // Accumulate summary statistics\n totalServers += totalMCPServers\n totalRunning += totalMCPServersRunning\n\n // Count transport types\n for (const server of mcpServers) {\n // transport field is always populated from type field in the data layer\n if (server.transport) {\n const transport = server.transport.toLowerCase()\n if (transport in transportCounts) {\n transportCounts[transport as keyof typeof transportCounts]++\n }\n }\n\n // Count high-risk credentials\n if (server.credentials?.hasCredentials && server.credentials?.riskLevel === 'high') {\n totalHighRiskCredentials++\n }\n\n // Count implicit latest versions\n if (server.versionInfo?.isLatest) {\n totalImplicitLatestVersions++\n }\n }\n\n // Only render in non-JSON mode\n if (!jsonOutput) {\n const mcpGroupData = [\n { key: 'PROVIDER', value: group.friendlyName },\n { key: 'FILE', value: filePath },\n { key: 'TYPE', value: filePathDataType },\n { key: 'PARSABLE', value: filePathValid },\n ]\n\n const groupMetadata = {\n mcpServersTotal: totalMCPServers,\n mcpServersRunning: totalMCPServersRunning,\n }\n\n RenderService.printMcpGroup(pathIndex, mcpGroupData, groupMetadata)\n RenderService.printMcpServers(mcpServers)\n }\n }\n }\n }\n\n if (pathIndex === 0) {\n const isCustomFilesMode = customFiles && customFiles.length > 0\n if (isCustomFilesMode) {\n exitWithError('No MCP servers found in specified configuration files.')\n } else {\n exitWithError('No MCP servers found in known configuration files.')\n }\n }\n\n // Prepare summary statistics\n const summaryStats = {\n totalServers,\n runningServers: totalRunning,\n highRiskCredentials: totalHighRiskCredentials,\n implicitLatestVersions: totalImplicitLatestVersions,\n transportBreakdown: transportCounts\n }\n\n // Output based on mode\n if (jsonOutput) {\n // Filter out providers with zero servers unless --all is specified or in --files mode\n const isCustomFilesMode = customFiles && customFiles.length > 0\n const filteredMcpFiles = Object.fromEntries(\n Object.entries(mcpFilesList)\n .map(([groupName, group]) => {\n // Filter individual file paths with zero servers unless --all or --files mode\n const filteredPaths = group.paths.filter(filePathData => {\n const fileServerCount = filePathData.servers ? filePathData.servers.length : 0\n if (showAll || isCustomFilesMode) {\n return true // Keep all files\n }\n return fileServerCount > 0 // Only keep files with servers\n })\n\n return [groupName, { ...group, paths: filteredPaths }] as const\n })\n .filter((entry): entry is [string, typeof entry[1]] => {\n // After filtering file paths, remove groups with no remaining paths\n const [, group] = entry\n return group.paths.length > 0\n })\n )\n\n const output = {\n mcpFiles: filteredMcpFiles,\n summary: summaryStats\n }\n console.log(JSON.stringify(output, null, 2))\n } else {\n RenderService.printSummary(summaryStats)\n }\n}\n\ninit().then(() => {\n console.log('\\n')\n})\n\nfunction exitWithError (message: string) {\n console.error(`${styleText(['red'], '●')} ${message}\\n`)\n process.exit(1)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa,6BAAb,MAAwC;;;;CAItC,OAAwB,sBAAsB;EAC5C,MAAM;GAEJ;GACA;GAGA;GACA;GACA;GAGA;GACA;GACA;EACF;EACA,KAAK;GAEH;GACA;GACA;GACA;GACA;EACF;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