Skip to content

How MCP Works

MCP (Model Context Protocol) servers expose tools, prompts, and resources through a standardized protocol that allows Claude to execute functions, access data, and apply templates to extend capabilities beyond text generation.

Official Documentation: For comprehensive details about MCP, visit the Model Context Protocol documentation.

How Claude Sees Available Tools

When Claude starts, each MCP server advertises its capabilities (see Server Concepts for details):

json
{
  "tools": [
    {
      "name": "git_commit",
      "description": "Create a git commit with conventional message",
      "inputSchema": {
        "type": "object", 
        "properties": {
          "message": {"type": "string"},
          "files": {"type": "array"}
        }
      }
    }
  ],
  "resources": [
    {
      "uri": "memory://user-preferences", 
      "name": "User Preferences",
      "description": "Stored user configuration and preferences"
    }
  ]
}

Claude builds an internal catalog of all available capabilities across servers. This follows the MCP Architecture pattern where clients discover and integrate server capabilities.

Tool Selection and Parameter Resolution

Claude selects and configures tools through a multi-step process:

Selection Process

  1. Intent Recognition: Parse user request for specific actions
  2. Schema Matching: Match required parameters with available tool schemas
  3. Context Integration: Factor in current project state and workflow context
  4. Execution Orchestration: Plan sequential and parallel tool coordination

Parameter Resolution

Claude automatically resolves tool parameters from multiple sources:

Implicit Parameters:

User: "Commit these changes"
Claude resolves:
- files: [from git status output]
- message: [generated from diff analysis]
- author: [from git config]

Explicit Parameters:

User: "Commit with message 'fix: resolve auth bug'"
Claude uses:
- files: [from git status]
- message: "fix: resolve auth bug" [from user input]
- author: [from git config]

Interactive Parameters: For high-risk operations, Claude may prompt for confirmation:

User: "Deploy to production"
Claude prompts:
- "Confirm deployment of 5 changed files to production?"
- "Which environment? (staging/production)"

Tool Execution Flow

Built with VitePress and powered by Claude Code