Problem
When multiple MCP servers are connected, ALL tool definitions from ALL servers are injected into the system prompt of EVERY conversation.
With 9 MCP servers connected (project-tools, supabase, agent-browser, chrome-devtools, playwright, memory, context7, sequential-thinking, fetch), this results in ~40,000-70,000 tokens of tool definitions loaded upfront — even if the user only needs 2-3 tools.
Users paying per-token to LLM providers (Anthropic, OpenAI, etc.) bear this cost on every single message.
Current behavior
- 9 MCP servers = ~250+ tool definitions
- Each tool definition = 50-200 tokens
- Total overhead: ~40-70k tokens per conversation
- User pays for ALL tools in EVERY message, even unused ones
Proposed solutions
- Lazy tool loading — Only inject tool definitions when context suggests they are needed (e.g., if user mentions "deploy", load Supabase tools)
- Tool profiles — Let users configure preset profiles (e.g., "dev", "deploy", "debug") with only relevant MCP servers
- Tiered loading — Load essential tools (project-tools, bash, read, write) by default, load others on-demand via a
/tools command
Impact
- Reduces token cost by 30-50k tokens per conversation
- No behavior change for users who want all tools available
- Better UX for cost-conscious users
Environment
- OpenCode version: latest
- OS: Windows
- MCP servers: 9 connected
Problem
When multiple MCP servers are connected, ALL tool definitions from ALL servers are injected into the system prompt of EVERY conversation.
With 9 MCP servers connected (project-tools, supabase, agent-browser, chrome-devtools, playwright, memory, context7, sequential-thinking, fetch), this results in ~40,000-70,000 tokens of tool definitions loaded upfront — even if the user only needs 2-3 tools.
Users paying per-token to LLM providers (Anthropic, OpenAI, etc.) bear this cost on every single message.
Current behavior
Proposed solutions
/toolscommandImpact
Environment