MCPClient — claude-code Architecture
Implements the Model Context Protocol for secure external tool communication.
Entity Profile
Relationship Graph
Domain
Functions
- AgentMcpServerSpecSchema()
- AgentPromptDisplay()
- AgentTool.call()
- AgentTool.checkPermissions()
- AgentTool.description()
- AgentTool.getActivityDescription()
- AgentTool.inputSchema()
- AgentTool.isConcurrencySafe()
- AgentTool.isReadOnly()
- AgentTool.mapToolResultToToolResultBlockParam()
- AgentTool.outputSchema()
- AgentTool.prompt()
- AgentTool.toAutoClassifierInput()
- CLAUDE_CODE_GUIDE_AGENT.getSystemPrompt()
- ChannelPermissionNotificationSchema()
- EXPLORE_AGENT.getSystemPrompt()
- LogEventNotificationSchema()
- MCPConnectionManager()
- MIGRATIONS()
- McpHTTPServerConfigSchema()
- McpOAuthConfigSchema()
- McpServerConfigSchema()
- McpWebSocketIDEServerConfigSchema()
- NOOP()
- NOOP_HANDLER()
- NOOP_HELPERS.clearBuffer()
- NOOP_HELPERS.resetHistory()
- NOOP_HELPERS.setCursorOffset()
- NOOP_SNAPSHOT()
- NOOP_SUBSCRIBE()
- NOOP_UNSUB()
- PLAN_AGENT.getSystemPrompt()
- STATUSLINE_SETUP_AGENT.getSystemPrompt()
- SyntheticOutputTool.call()
- SyntheticOutputTool.checkPermissions()
- SyntheticOutputTool.description()
- SyntheticOutputTool.inputSchema()
- SyntheticOutputTool.isConcurrencySafe()
- SyntheticOutputTool.isEnabled()
- SyntheticOutputTool.isOpenWorld()
- SyntheticOutputTool.isReadOnly()
- SyntheticOutputTool.mapToolResultToToolResultBlockParam()
- SyntheticOutputTool.outputSchema()
- SyntheticOutputTool.prompt()
- SyntheticOutputTool.renderToolResultMessage()
- SyntheticOutputTool.renderToolUseErrorMessage()
- SyntheticOutputTool.renderToolUseMessage()
- SyntheticOutputTool.renderToolUseProgressMessage()
- SyntheticOutputTool.renderToolUseRejectedMessage()
- TransportSchema()
- VERIFICATION_AGENT.getSystemPrompt()
- VerboseAgentTranscript()
- _temp2()
- addErrorsToAppState()
- agentToolResultSchema()
- areMcpConfigsEqual()
- buildCodeEditToolAttributes()
- buildForkedMessages()
- buildMcpToolName()
- buildSyntheticOutputTool()
- callIdeRpc()
- callMCPTool()
- callMCPToolWithUrlElicitationRetry()
- claudeInChromeToolRendering()
- clearIdpClientSecret()
- clearMcpAuthCache()
- clearMcpClientConfig()
- clearServerCache()
- clientInformation()
- clientMetadata()
- clientMetadataUrl()
- computerUseWrapper()
- connectToServer()
- constructor()
- constructor()
- constructor()
- contentContainsImages()
- copySnapshotToLocal()
- countToolUses()
- createChannelPermissionCallbacks()
- createClaudeAiProxyFetch()
- createNodeWsClient()
- createPermissionContext()
- createSyntheticOutputTool()
- dedupClaudeAiMcpServers()
- describeMcpConfigFilePath()
- discoverOidc()
- discoverProtectedResource()
- discoveryState()
- ensureConnectedClient()
- ensureTransport()
- exchangeJwtAuthGrant()
- expandEnvVars()
- extractAgentMcpServers()
- extractLastToolInfo()
- extractMcpToolDisplayName()
- extractPartialResult()
- extractToolUseId()
- fetchCommandsForClient()
- fetchResourcesForClient()
- fetchToolsForClient()
- filterIncompleteToolCalls()
- filterToolsForAgent()
- finalizeAgentTool()
- findChannelEntry()
- findChromeClient()
- getAgentColor()
- getAgentSystemPrompt()
- getAutoBackgroundMs()
- getConnectionTimeoutMs()
- getElicitationMode()
- getEnterpriseMcpFilePath()
- getFeedbackGuideline()
- getIdpClientSecret()
- getLastToolUseName()
- getMcpAllowlistSettings()
- getMcpAuthCache()
- getMcpAuthCachePath()
- getMcpClientConfig()
- getMcpHeadersFromHelper()
- getMcpOAuthCallbackPort()
- getMcpPrefix()
- getMcpServerConnectionBatchSize()
- getMcpServerScopeFromToolName()
- getMcpToolTimeoutMs()
- getMcpToolsCommandsAndResources()
- getOverrideSourceLabel()
- getParseError()
- getPathsForSuggestions()
- getPlanV2SystemPrompt()
- getProjectMcpConfigsFromCwd()
- getRemoteMcpServerConnectionBatchSize()
- getScopeFromMetadata()
- getServerCacheKey()
- getServerCommandArray()
- getSnapshotDirForAgent()
- getSnapshotJsonPath()
- getToolNameForPermissionCheck()
- getXaaIdpSettings()
- handleRemoteAuthFailure()
- hasProgressMessage()
- hashMcpConfig()
- hashToId()
- inferCompactSchema()
- initializeAgentMcpServers()
- initializeAgentMemorySnapshots()
- initializeFromSnapshot()
- inputSchema()
- isAgentMemoryPath()
- isChannelsEnabled()
- isCodeEditingTool()
- isCustomAgent()
- isHTTPConfig()
- isIncludedMcpTool()
- isLocalMcpServer()
- isMcpAuthCached()
- isMcpServerDisabled()
- isMcpSessionExpiredError()
- isMcpTool()
- isStdioConfig()
- isSyntheticOutputToolEnabled()
- isToolFromMcpServer()
- loadAgentMemoryPrompt()
- makeXaaFetch()
- mcpBaseUrlAnalytics()
- mcpToolInputToAutoClassifierInput()
- normalizeLanguageForSTT()
- normalizeNameForMCP()
- parseAgentFromMarkdown()
- parseMcpConfig()
- performMCPOAuthFlow()
- performMCPXaaAuth()
- persistBlobToTextBlock()
- prefetchAllMcpResources()
- prefetchOfficialMcpUrls()
- processBatched()
- processMCPResult()
- readClientSecret()
- reconnectMcpServerImpl()
- redactTokens()
- renderGroupedAgentToolUse()
- renderToolResultMessage()
- renderToolUseErrorMessage()
- renderToolUseMessage()
- renderToolUseProgressMessage()
- renderToolUseRejectedMessage()
- renderToolUseTag()
- resetOfficialMcpUrlsForTesting()
- resolveAgentModelDisplay()
- resolveAgentTools()
- runElicitationResultHooks()
- sanitizeAgentTypeForPath()
- saveClientInformation()
- saveIdpClientSecret()
- saveIdpIdToken()
- saveMcpClientSecret()
- scheduledForTaskListId()
- setMcpAuthCacheEntry()
- setupSdkMcpClients()
- shouldAllowManagedMcpServersOnly()
- shouldInjectAgentListInMessages()
- transformMCPResult()
- transformResultContent()
- truncateForPreview()
- unwrapCcrProxyUrl()
- useCanUseTool()
- useExitOnCtrlCD()
- useExitOnCtrlCDWithKeybindings()
- useMainLoopModel()
- useManageMCPConnections()
- useModelMigrationNotifications()
- waitForCallback()
- wrapFetchWithTimeout()
Frequently Asked Questions
What is the MCPClient subdomain?
MCPClient is a subdomain in the claude-code codebase, part of the AgentTooling domain. Implements the Model Context Protocol for secure external tool communication. It contains 0 source files.
Which domain does MCPClient belong to?
MCPClient belongs to the AgentTooling domain.
What functions are in MCPClient?
The MCPClient subdomain contains 213 function(s): AgentMcpServerSpecSchema, AgentPromptDisplay, AgentTool.call, AgentTool.checkPermissions, AgentTool.description, AgentTool.getActivityDescription, AgentTool.inputSchema, AgentTool.isConcurrencySafe, and 205 more.