How AI Tools Access External Services

A complete guide to MCP architecture — from your question to Brave Search results and back, explained simply.

STEP 1 — YOU

👤 You Ask a Question

You type a question into Claude Desktop, e.g., "What are the latest AI trends in ITSM for 2026?"
This is just a normal chat message — nothing special yet.

Claude Desktop App
message sent to AI
STEP 2 — AI BRAIN

🧠 Claude AI Processes Your Request

Claude's language model reads your question and decides: "I need to search the web to give a current answer." It knows it has access to tools like Brave Search because the MCP config told it so at startup.

Think of this like the AI checking its toolkit and picking the right tool for the job.

Claude LLM Tool Selection
tool call via JSON-RPC
STEP 3 — MCP PROTOCOL

🔌 MCP Server Receives the Request

The MCP (Model Context Protocol) acts as a universal translator between the AI and external tools.

Claude sends a structured request: "search for: AI trends ITSM 2026" using a standard format called JSON-RPC.

The MCP server (running locally on your machine via uvx) receives this and translates it into the right format for the external service.

MCP Protocol JSON-RPC uvx / npx localhost
API call over HTTPS
STEP 4 — TOOL CONNECTOR

🔧 Tool-Specific Adapter Calls the API

The MCP server for Brave Search knows exactly how to talk to Brave's API. It takes Claude's generic search request and converts it into Brave Search's specific API format, attaches your API key for authentication, and sends the HTTPS request to Brave's servers.

brave-search MCP API Key Auth HTTPS
internet request →
STEP 5 — EXTERNAL SERVICE

🌐 Brave Search Returns Results

Brave Search processes the query on its servers, searches the web, and returns results as structured data (JSON) — titles, URLs, snippets.

This is the same as what happens when you search on Brave's website, but done programmatically.

Brave Search API JSON Response
← results flow back through same path
STEP 6 — AI RESPONDS

✨ Claude Reads Results & Answers You

The search results travel back: Brave → MCP Server → Claude.

Claude reads the raw results, synthesizes them into a clear, natural language answer, and presents it to you in the chat — with sources, summaries, and context.

The entire round-trip takes just a few seconds.

Response Synthesis Natural Language

Layer 1 — User Interface

💬 Claude Desktop 🌐 claude.ai 📱 Claude Mobile
▼   User's question   ▼

Layer 2 — AI Model (The Brain)

🧠 Claude LLM 🎯 Tool Selection Logic 📝 Response Generator
▼   Structured tool call (JSON-RPC)   ▼

Layer 3 — MCP Protocol (The Bridge)

🔌 MCP Standard 📡 stdio / SSE Transport 🛡️ Permission Layer
▼   Translated API calls   ▼

Layer 4 — MCP Servers (Tool Adapters)

🔍 Brave Search 🌊 Tavily 📂 Filesystem 🗃️ Database 📧 Gmail
▼   HTTPS / local access   ▼

Layer 5 — External Services & Data

🌐 Web APIs 💾 Local Files ☁️ Cloud Services 📊 Databases

Key Concepts

🔌

MCP Protocol

A universal standard created by Anthropic. Instead of every AI building custom integrations for every tool, MCP gives one common language that all tools can speak.

🏃

uvx / npx

Lightweight runners that download and execute MCP servers without permanent installation. uvx runs Python servers, npx runs Node.js servers.

📡

JSON-RPC

The messaging format MCP uses — a structured way to say "call this function with these parameters." It's like a standardised ticket format between systems.

🔑

API Keys

Authentication tokens stored in your config. The MCP server attaches these when calling external services — like a badge that proves you're authorised to use the service.

🏠

Runs Locally

MCP servers run on YOUR machine, not in the cloud. Your API keys and data stay local. The AI model in the cloud only sees the final results the MCP server sends back.

🔄

Bidirectional

Data flows both ways — AI sends requests out, and receives results back. Each MCP server is a two-way bridge between the AI and one specific external tool.

The Hotel Concierge Analogy

Imagine you're a guest at a 5-star hotel. You don't speak the local language, but the hotel has a concierge desk that handles everything for you.

🏨 Hotel World

👤 You (the guest)
🏨 Hotel Concierge Desk
📋 Standard Request Form
🧑‍💼 Concierge Staff (speaks local language)
🍽️ Restaurant / 🚕 Taxi / 🎭 Theatre
📞 Phone Call to Restaurant
✅ "Your table is booked at 8 PM"
=======

💻 MCP World

👤 You (asking Claude)
🧠 Claude AI (the brain)
📡 MCP Protocol (JSON-RPC)
🔌 MCP Server (e.g., brave-search)
🌐 Brave / Tavily / Gmail / Slack
📡 HTTPS API Call
✅ "Here are your search results"
The Key Insight: You never need to learn how to call the restaurant yourself. The concierge (MCP) handles the translation. Similarly, Claude never directly calls Brave Search — the MCP server handles all the translation and API communication.

The ITSM Analogy (For IT Interviews)

Since you work in IT service management, here's how MCP maps to ITSM concepts:

End User → You chatting with Claude
Service Desk (L1/L2) → Claude AI (receives request, triages, decides who to involve)
ITSM Platform (ServiceNow) → MCP Protocol (standard process that connects everything)
Resolver Group → MCP Server (specialised team that knows the specific system)
External Vendor / Tool → Brave Search, Gmail, Slack (the actual service doing the work)

Here's what your claude_desktop_config.json actually looks like, and what each part does:

📄 claude_desktop_config.json
{ "mcpServers": { // Each entry = one tool Claude can access "brave-search": { "command": "uvx", // Runner: use uvx to launch it "args": ["mcp-server-brave-search"], // Package name "env": { "BRAVE_API_KEY": "your-key" // Auth token for Brave } }, "tavily": { "command": "npx", // Runner: use npx (Node.js) "args": ["tavily-mcp"], "env": { "TAVILY_API_KEY": "your-key" } } } }

What Happens at Startup

BOOT 1

📖 Claude Desktop Reads Config

On launch, Claude Desktop reads the JSON config file to discover which MCP servers are available.

BOOT 2

🚀 Spawns MCP Server Processes

For each server in the config, it runs the command (e.g., uvx mcp-server-brave-search). This starts a local process on your machine that listens for requests.

BOOT 3

🤝 Handshake & Tool Discovery

Each MCP server tells Claude: "Here are the tools I offer" (e.g., web_search, local_search). Claude now knows what it can do in this session.

READY

✅ Ready for Your Questions

Claude Desktop shows you the chat interface. Behind the scenes, all MCP servers are running and waiting. When you ask something that needs web search, Claude already knows how to reach it.

⚠️ Your Error Explained

"spawn uvx ENOENT" happened at Boot Step 2. Claude Desktop tried to run uvx mcp-server-brave-search but couldn't find the uvx executable. It's like trying to call an employee who doesn't exist yet — the process couldn't even start, so it immediately disconnected.

Click on any question to see a polished interview-ready answer.

How do AI tools like Claude access external services such as web search? MOST ASKED
Answer: AI models like Claude use a protocol called MCP — Model Context Protocol — which is essentially a standardised bridge between the AI and external tools. When I ask Claude a question that needs real-time data, here's what happens: Claude recognises it needs to search the web, sends a structured request via MCP to a locally running server, that server translates it into the specific API call for Brave Search or whatever service, gets the results, and sends them back to Claude, which then synthesises a natural language response.
"Think of MCP as a universal adapter — like how USB-C lets you connect any device to any laptop. MCP lets any AI connect to any tool through one standard protocol."
The beauty is that it's modular — you can plug in Brave Search, Gmail, Slack, databases, or file systems, all through the same protocol. And it runs locally on your machine, so your credentials and data stay secure.
What is MCP and why does it matter? TECHNICAL
Answer: MCP stands for Model Context Protocol, created by Anthropic. Before MCP, every AI integration was custom-built — if you wanted Claude to search the web, you'd build one connector; for Slack, another; for Gmail, another. Each was different. MCP solves this with a single standard. Any developer can build an MCP server for their tool, and any AI that speaks MCP can use it instantly. It uses JSON-RPC for communication — a lightweight request-response format.
"It's like how ITIL standardised IT service management. Before ITIL, every company had different processes. MCP does the same thing for AI-to-tool communication — one standard that everyone follows."
This matters because it makes the AI ecosystem composable. You can mix and match tools, swap them out, add new ones — all without changing the AI itself.
What's the difference between uvx and npx? FOLLOW-UP
Answer: Both are tool runners that download and execute packages on the fly without permanent installation. npx is for the Node.js/JavaScript ecosystem — it comes with npm. When you run npx tavily-mcp, it fetches the Tavily MCP server package (written in JS) and runs it. uvx is for the Python ecosystem — it comes with uv (a fast Python package manager). When you run uvx mcp-server-brave-search, it fetches the Brave Search MCP server (written in Python) and runs it.
"The choice depends on what language the MCP server is written in. It's like choosing between a Windows installer and a Mac installer — same software, different runtime environment."
How is this different from a regular API call? GREAT QUESTION
Answer: A regular API call is point-to-point — your code directly calls Brave's API with specific parameters. You need to know Brave's exact endpoints, authentication method, and response format. With MCP, the AI decides when and how to call the tool. You just ask a question in plain English. Claude figures out it needs a search, formats the right request, calls it through MCP, and interprets the results for you.
"It's the difference between you manually logging into ServiceNow to run a report versus telling an AI assistant 'show me last week's SLA breaches' and it handles everything — the query, the filters, and the summary."
MCP also adds a standardisation layer. Even if Brave changes their API tomorrow, only the MCP server needs updating — the AI side stays the same. That's decoupling in action.
Is this secure? Where does data go? SECURITY
Answer: This is actually one of MCP's strengths. The MCP servers run locally on your machine. Your API keys stay in your local config file and never leave your system. When Claude needs to use a tool, the request goes from the cloud to your local MCP server, which then makes the external API call.
"The AI model in the cloud never sees your API keys. It only sees the results. It's like a VPN model — the intermediary handles the sensitive connection details."
That said, the search query itself does travel to the external service (Brave sees your search terms), and the results travel back to Claude's cloud model. So it's not zero-exposure — but your credentials are protected, and you control which tools are enabled.