"Code Mode" is not an alternative to MCP but a more efficient way to use it. Instead of multiple sequential tool calls, the model generates a single script that executes multiple actions in a sandbox. MCP still provides the core benefits of authentication, discoverability, and a standardized, LLM-friendly API.

Related Insights

A practical hack to improve AI agent reliability is to avoid built-in tool-calling functions. LLMs have more training data on writing code than on specific tool-use APIs. Prompting the agent to write and execute the code that calls a tool leverages its core strength and produces better outcomes.

To avoid overwhelming an LLM's context with hundreds of tools, a dynamic MCP approach offers just three: one to list available API endpoints, one to get details on a specific endpoint, and one to execute it. This scales well but increases latency and complexity due to the multiple turns required for a single action.

The power of tools like Claude Code comes from giving the AI access to fundamental command-line tools (e.g., `bash`, `grep`). This allows the AI to compose novel solutions and lets product teams define new features using simple English prompts rather than hard-coded logic.

Claude Skills aren't limited to natural language instructions; they can reference and execute Python scripts. This enables developers to enforce consistency for technical tasks like data cleaning or validation, preventing the variability that occurs when the LLM generates code on its own.

As AI generates more code than humans can review, the validation bottleneck emerges. The solution is providing agents with dedicated, sandboxed environments to run tests and verify functionality before a human sees the code, shifting review from process to outcome.

Instead of giving an LLM hundreds of specific tools, a more scalable "cyborg" approach is to provide one tool: a sandboxed code execution environment. The LLM writes code against a company's SDK, which is more context-efficient, faster, and more flexible than multiple API round-trips.

Unlike Claude Projects where the LLM decides how to use tools, Skills execute predefined scripts. This gives users precise control over data analysis and repeatable tasks, ensuring consistent, accurate results and overcoming the common issue of non-deterministic AI outputs.

Using a Supabase MCP gives AI tools like Claude Code direct control over your database. This can be more secure than manual setup, as the AI can correctly configure security rules and identify misconfigurations a human might miss. It's useful for setup and configuration checks.

Exposing a full API via the Model Context Protocol (MCP) overwhelms an LLM's context window and reasoning. This forces developers to abandon exposing their entire service and instead manually craft a few highly specific tools, limiting the AI's capabilities and defeating the "do anything" vision of agents.

For complex, one-time tasks like a code migration, don't just ask AI to write a script. Instead, have it build a disposable tool—a "jig" or "command center”—that visualizes the process and guides you through each step. This provides more control and understanding than a black-box script.