MCP 服务协调目录,负责服务器配置、连接管理、官方 registry 和 Claude.ai 集成。
- 相对路径:
src/services/mcp - 直接文件数:23
- 直接子目录数:0
- 递归文件数:23
- 主要文件类型:
.tsx 22、.tsxx 1
- 该目录最常引用的仓库内目录:
src/utils(75)、src/services/analytics(10)、src/utils/settings(10)、src(8)、utils(7)、src/bootstrap(6)、src/utils/secureStorage(5) - 最常引用该目录的仓库内目录:
src/components/mcp(18)、src/utils(11)、src/hooks(9)、src/services/tools(6)、src/cli/handlers(6)、src/commands/mcp(6)、src(5)
| 文件 | 行数 | 导出/关键符号 | 说明 |
|---|---|---|---|
InProcessTransport.ts |
63 | createLinkedTransportPair |
服务逻辑;导出符号以 createLinkedTransportPair 为主,顶部注释说明:In-process linked transport pair for running an MCP server and client in the same process without spawning a subproce... |
MCPConnectionManager.tsx |
73 | useMcpReconnect, useMcpToggleEnabled, MCPConnectionManager |
资源或生命周期管理器;导出符号以 useMcpReconnect, useMcpToggleEnabled, MCPConnectionManager 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
SdkControlTransport.ts |
136 | SendMcpMessageCallback, SdkControlClientTransport, SdkControlServerTransport |
服务逻辑;导出符号以 SendMcpMessageCallback, SdkControlClientTransport, SdkControlServerTransport 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
auth.ts |
2465 | normalizeOAuthErrorBody, AuthenticationCancelledError, getServerKey, hasMcpDiscoveryButNoToken, revokeServerTokens, clearServerTokensFromLocalStorage |
服务逻辑;导出符号以 normalizeOAuthErrorBody, AuthenticationCancelledError, getServerKey, hasMcpDiscoveryButNoToken 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
channelAllowlist.ts |
76 | ChannelAllowlistEntry, getChannelAllowlist, isChannelsEnabled, isChannelAllowlisted |
服务逻辑;导出符号以 ChannelAllowlistEntry, getChannelAllowlist, isChannelsEnabled, isChannelAllowlisted 为主,顶部注释说明:Approved channel plugins allowlist. --channels plugin:name@marketplace entries only register if {marketplace, plugin}... |
channelNotification.ts |
316 | ChannelMessageNotificationSchema, CHANNEL_PERMISSION_METHOD, ChannelPermissionNotificationSchema, CHANNEL_PERMISSION_REQUEST_METHOD, ChannelPermissionRequestParams, wrapChannelMessage |
服务逻辑;导出符号以 ChannelMessageNotificationSchema, CHANNEL_PERMISSION_METHOD, ChannelPermissionNotificationSchema, CHANNEL_PERMISSION_REQUEST_METHOD 为主,顶部注释说明:Channel notifications — lets an MCP server push user messages into the conversation. A "channel" (Discord, Slack, SMS... |
channelPermissions.ts |
240 | isChannelPermissionRelayEnabled, ChannelPermissionResponse, ChannelPermissionCallbacks, PERMISSION_REPLY_RE, shortRequestId, truncateForPreview |
权限相关逻辑;导出符号以 isChannelPermissionRelayEnabled, ChannelPermissionResponse, ChannelPermissionCallbacks, PERMISSION_REPLY_RE 为主,顶部注释说明:Permission prompts over channels (Telegram, iMessage, Discord). Mirrors BridgePermissionCallbacks — when CC hits a ... |
claudeai.ts |
164 | fetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, markClaudeAiMcpConnected, hasClaudeAiMcpEverConnected |
服务逻辑;导出符号以 fetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, markClaudeAiMcpConnected, hasClaudeAiMcpEverConnected 为主,顶部注释说明:Fetches MCP server configurations from Claude.ai org configs. These servers are managed by the organization via Claud... |
client.ts |
3348 | McpAuthError, McpToolCallError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, isMcpSessionExpiredError, clearMcpAuthCache, createClaudeAiProxyFetch, wrapFetchWithTimeout |
服务逻辑;导出符号以 McpAuthError, McpToolCallError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, isMcpSessionExpiredError, clearMcpAuthCache 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
config.ts |
1578 | getEnterpriseMcpFilePath, unwrapCcrProxyUrl, getMcpServerSignature, dedupPluginMcpServers, dedupClaudeAiMcpServers, filterMcpServersByPolicy |
配置读取或配置定义;导出符号以 getEnterpriseMcpFilePath, unwrapCcrProxyUrl, getMcpServerSignature, dedupPluginMcpServers 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
elicitationHandler.ts |
313 | ElicitationWaitingState, ElicitationRequestEvent, registerElicitationHandler, runElicitationHooks, runElicitationResultHooks |
服务逻辑;导出符号以 ElicitationWaitingState, ElicitationRequestEvent, registerElicitationHandler, runElicitationHooks 为主,顶部注释说明:Configuration for the waiting state shown after the user opens a URL. |
envExpansion.ts |
38 | expandEnvVarsInString |
服务逻辑;导出符号以 expandEnvVarsInString 为主,顶部注释说明:Shared utilities for expanding environment variables in MCP server configurations |
headersHelper.ts |
138 | getMcpHeadersFromHelper, getMcpServerHeaders |
辅助函数集合;导出符号以 getMcpHeadersFromHelper, getMcpServerHeaders 为主,顶部注释说明:Check if the MCP server config comes from project settings (projectSettings or localSettings) This is important for s... |
mcpStringUtils.ts |
106 | mcpInfoFromString, getMcpPrefix, buildMcpToolName, getToolNameForPermissionCheck, getMcpDisplayName, extractMcpToolDisplayName |
通用辅助逻辑;导出符号以 mcpInfoFromString, getMcpPrefix, buildMcpToolName, getToolNameForPermissionCheck 为主,顶部注释说明:Pure string utility functions for MCP tool/server name parsing. This file has no heavy dependencies to keep it lightw... |
normalization.ts |
23 | normalizeNameForMCP |
服务逻辑;导出符号以 normalizeNameForMCP 为主,顶部注释说明:Claude.ai server names are prefixed with this string |
oauthPort.ts |
78 | buildRedirectUri, findAvailablePort |
服务逻辑;导出符号以 buildRedirectUri, findAvailablePort 为主,顶部注释说明:Windows dynamic port range 49152-65535 is reserved |
officialRegistry.ts |
72 | prefetchOfficialMcpUrls, isOfficialMcpUrl, resetOfficialMcpUrlsForTesting |
服务逻辑;导出符号以 prefetchOfficialMcpUrls, isOfficialMcpUrl, resetOfficialMcpUrlsForTesting 为主,顶部注释说明:Fire-and-forget fetch of the official MCP registry. Populates officialUrls for isOfficialMcpUrl lookups. |
types.ts |
258 | ConfigScopeSchema, ConfigScope, TransportSchema, Transport, McpStdioServerConfigSchema, McpSSEServerConfigSchema |
类型定义;导出符号以 ConfigScopeSchema, ConfigScope, TransportSchema, Transport 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
useManageMCPConnections.ts |
1141 | useManageMCPConnections |
服务逻辑;导出符号以 useManageMCPConnections 为主,结合所在目录可判断其服务于 src/services/mcp 这条功能线。 |
utils.ts |
575 | filterToolsByServer, commandBelongsToServer, filterCommandsByServer, filterMcpPromptsByServer, filterResourcesByServer, excludeToolsByServer |
通用辅助逻辑;导出符号以 filterToolsByServer, commandBelongsToServer, filterCommandsByServer, filterMcpPromptsByServer 为主,顶部注释说明:Filters tools by MCP server name @param tools Array of tools to filter @param serverName Name of the MCP server @retu... |
vscodeSdkMcp.ts |
112 | LogEventNotificationSchema, notifyVscodeFileUpdated, setupVscodeSdkMcp |
服务逻辑;导出符号以 LogEventNotificationSchema, notifyVscodeFileUpdated, setupVscodeSdkMcp 为主,顶部注释说明:Sends a file_updated notification to the VSCode MCP server. This is used to notify VSCode when files are edited or wr... |
xaa.ts |
511 | XaaTokenExchangeError, ProtectedResourceMetadata, discoverProtectedResource, AuthorizationServerMetadata, discoverAuthorizationServer, JwtAuthGrantResult |
服务逻辑;导出符号以 XaaTokenExchangeError, ProtectedResourceMetadata, discoverProtectedResource, AuthorizationServerMetadata 为主,顶部注释说明:Cross-App Access (XAA) / Enterprise Managed Authorization (SEP-990) Obtains an MCP access token WITHOUT a browser con... |
xaaIdpLogin.ts |
487 | isXaaEnabled, XaaIdpSettings, getXaaIdpSettings, IdpLoginOptions, issuerKey, getCachedIdpIdToken |
服务逻辑;导出符号以 isXaaEnabled, XaaIdpSettings, getXaaIdpSettings, IdpLoginOptions 为主,顶部注释说明:XAA IdP Login — acquires an OIDC id_token from an enterprise IdP via the standard authorization_code + PKCE flow, the... |
该目录没有直接子目录。