A viral r/AI_Agents post titled 'Stop Building MCP Servers' argued MCP loads all tools at once, wasting context. That was true for early implementations, but Claude Code now loads tools on demand. This tutorial shows how to verify this behavior and optimize your MCP configuration.
Prerequisites
- Claude Code installed
- At least one MCP server configured
- Scavio API key (optional, for testing)
Walkthrough
Step 1: Add Scavio MCP server
Register Scavio as an MCP server to test with.
claude mcp add scavio https://mcp.scavio.dev/mcp \
--header 'x-api-key: YOUR_SCAVIO_KEY'Step 2: Check registered MCP servers
Verify your MCP servers are registered.
claude mcp list
# Should show scavio and any other MCP servers
# Each server lists its available toolsStep 3: Test on-demand loading with a non-search prompt
Ask Claude something that does not require search. Check if Scavio tools were loaded.
# Ask Claude a code question (no search needed):
# 'Write a Python function that reverses a linked list'
#
# Then check context usage:
# Type: /context
#
# You should see that Scavio tools were NOT loaded
# because they were not needed for the taskStep 4: Test on-demand loading with a search prompt
Ask Claude something that requires search. Verify Scavio tools load.
# Ask Claude a search question:
# 'What is the current pricing for Tavily API?'
#
# Then check context usage:
# Type: /context
#
# Now you should see Scavio tools ARE loaded
# because Claude needed search to answer the questionStep 5: Optimize your MCP configuration
Separate high-frequency and low-frequency MCP servers.
# In .mcp.json, group by frequency:
# High-frequency: search, file operations, git
# Low-frequency: database, deployment, monitoring
#
# Claude Code loads what it needs per task
# You do NOT need to manually unregister servers
# to save context -- on-demand loading handles itPython Example
# This tutorial is CLI-focused, not code-focused.
# The key insight: Claude Code loads MCP tools on demand.
# You can register many MCP servers without context waste.
# Verify with /context after different types of prompts.JavaScript Example
// MCP configuration in .mcp.json:
// {"mcpServers": {"scavio": {"url": "https://mcp.scavio.dev/mcp",
// "headers": {"x-api-key": "YOUR_KEY"}}}}
// Tools load only when Claude decides search is needed.Expected Output
Verified that Claude Code loads MCP tools on demand. Non-search prompts do not load Scavio tools. Search prompts load them automatically. No context waste from unused MCP servers.