mcp anthropic

The Art of Building AI Agent Tools: How MCP is Reshaping Software Development

For the past two years, the AI industry has been obsessed with model capabilities—bigger context windows, better reasoning, multimodal understanding. But an uncomfortable truth is emerging: even the most sophisticated models are hamstrung by their isolation from real-world data and tools. The bottleneck isn't intelligence; it's integration.

Enter the Model Context Protocol (MCP), Anthropic's answer to what they call the "USB-C for AI"—a universal standard for connecting language models to the tools and data they need to actually accomplish tasks. But unlike USB-C's relatively straightforward hardware handshake, teaching AI to effectively wield tools requires rethinking fundamental assumptions about how we write software.

The challenge runs deeper than just API design. We're no longer coding for deterministic systems that execute instructions predictably. Instead, we're building for probabilistic reasoners that might approach problems creatively, misunderstand instructions, or discover novel solution paths we never anticipated. It's less like programming a computer and more like designing cognitive scaffolding for a brilliant but occasionally confused colleague who thinks in probability distributions.

The Evolution from Function Calling to MCP

Before MCP, we had function calling—OpenAI's plugins, Anthropic's tool use, various framework-specific approaches. These worked, but they struggled with fundamental problems: context drift when managing many tools, inconsistent error handling across implementations, and the dreaded "M×N integration problem" where each model-tool combination required custom code.

MCP, open-sourced by Anthropic in November 2024, isn't just another integration method. It's a full protocol specification with transport layers, authentication models, and standardized message formats. The protocol supports not just tool calling but also resource access and prompt templates. Anthropic's own API now includes an MCP connector, allowing direct calls to MCP servers without writing a client—a significant commitment to the standard.

The ecosystem is still nascent but growing. The official MCP repository hosts servers for Google Drive, Slack, GitHub, and PostgreSQL. A benchmark called MCP-Bench now evaluates agent performance across standardized MCP tasks, providing empirical grounding for tool design decisions. Early adopters like Block and Apollo are experimenting with MCP in production, though widespread enterprise adoption remains measured as organizations evaluate security implications.

Why Your REST API Makes a Terrible AI Tool

Traditional APIs are contracts between deterministic systems. Call getUser(123) and you'll get user 123's data in exactly the same format every time. Tools for AI agents, however, represent contracts between deterministic systems and non-deterministic reasoners that might approach the same problem differently each run.

Anthropic's recent deep dive into tool design surfaces a counterintuitive insight: the tools that work best for agents often violate principles we hold sacred in traditional API design. Consider their address book example: A REST API might offer a list_contacts endpoint that returns everyone, letting the calling program filter as needed. But when an LLM agent uses such a tool, it must process each contact token-by-token, burning through precious context on irrelevant data. It's like forcing someone to read an entire phone book to find a single number.

The solution isn't just adding search parameters. Effective agent tools consolidate entire workflows. Instead of exposing list_users, list_events, and create_event as separate endpoints, Anthropic recommends implementing a single schedule_event tool that handles availability checking and scheduling atomically. This mirrors how humans actually accomplish tasks—we don't think in CRUD operations.

This design philosophy extends beyond simple consolidation. Tools should return semantically meaningful identifiers rather than UUIDs. They should provide actionable error messages rather than stack traces. They should offer response format options, allowing agents to request concise summaries or detailed data as needed. Every design decision affects whether agents can effectively reason about and use the tool.

The Recursive Improvement Loop

Perhaps the most striking revelation from Anthropic's methodology is their approach to tool optimization: having AI agents help improve the very tools they use. This isn't just clever—it's producing measurably better results than human-designed tools.

The evaluation pipeline works in stages. First, generate realistic test scenarios grounded in actual use cases. For example, instead of "schedule a meeting," use "Schedule a meeting with Jane next week to discuss our latest Acme Corp project. Attach the notes from our last project planning meeting and reserve a conference room." These complex, multi-step tasks stress-test tool combinations and error handling.

Next, run these scenarios through evaluation agents that attempt to solve tasks while outputting structured reasoning. Anthropic recommends instructing agents to produce not just responses but also reasoning blocks explaining their tool choices. This creates rich transcripts of agent-tool interactions, complete with successes, failures, and confusion points.

Here's where it gets meta: feed these transcripts to another AI instance for analysis. The analyzing agent looks for patterns—tools called repeatedly due to poor pagination, parameters consistently misunderstood, workflows that could be consolidated. It then suggests specific improvements: renaming parameters for clarity, adjusting response formats, combining frequently co-occurring operations.

The results are compelling. In Anthropic's evaluations, Claude-optimized tools outperformed the original human-written versions for both Slack and Asana MCP servers. The improvements weren't marginal—they showed significant gains in task completion rates and reductions in token usage.

The Hidden Challenges: Discovery, Coordination, and Evolution

Security concerns around MCP are real—research has found thousands of exposed MCP servers lacking authentication—but they're not the only challenges. More persistent problems plague production agent systems:

Tool Discovery at Scale: When hundreds of tools are available, how does an agent choose? Recent work like ScaleMCP explores dynamic tool retrieval, but the problem remains unsolved. Namespacing helps (grouping tools under prefixes like slack_ or github_), but agents still struggle with tool selection when multiple options could theoretically work.

Multi-Step Coordination: MCP-Bench explicitly tests scenarios requiring multiple tool calls with dependencies. Agents must track state across calls, handle partial failures, and sometimes backtrack when approaches fail. The protocol supports this, but tool design significantly impacts success rates. Tools that maintain session state or provide transaction-like semantics perform better in complex workflows.

Token Economics: Every token consumed by tool responses is unavailable for reasoning. Anthropic's solution—response format parameters allowing "concise" or "detailed" modes—can reduce token usage by 65% or more. But this requires tools to intelligently determine what information is essential versus supplementary, a non-trivial design challenge.

Schema Evolution: Perhaps the least discussed but most critical challenge: how do you evolve tool schemas without breaking agents that have learned to use them? Unlike traditional APIs where you control all clients, you can't force-update every agent's understanding of your tool. The MCP specification is notably light on versioning strategies, leaving this problem largely unsolved.

The Philosophical Shift in Software Design

Beyond technical challenges, MCP and agent tools represent a fundamental shift in how we think about software interfaces. We're moving from instructing computers to enabling artificial colleagues. This requires a different mental model.

Traditional API design optimizes for consistency, predictability, and composability. Agent tool design optimizes for cognitive ergonomics—how naturally an intelligence (artificial or otherwise) can understand and use the capability. This explains why consolidated, workflow-oriented tools outperform granular CRUD operations, despite violating separation of concerns.

Error handling exemplifies this shift. A traditional API might return {"error": "INSUFFICIENT_PERMISSIONS", "code": 403}. An agent-optimized tool returns: "Permission denied. You need 'write' access to modify this document. Request access from the document owner or try using 'suggest_edit' instead." The latter provides not just information but guidance—mentorship encoded in error messages.

This anthropomorphic design philosophy extends throughout successful tools. Parameter names use natural language rather than abbreviations. Response structures mirror how humans would describe the information. Even the choice between JSON and XML can impact agent performance, as models perform better with formats prevalent in their training data.

What This Means for Developers Today

For software engineers, MCP represents both opportunity and challenge. The opportunity is clear: build once, enable everywhere. An MCP server for your service could potentially be used by any AI agent, creating powerful network effects.

But the challenge is profound. We're no longer just coding; we're designing cognitive affordances. Every parameter name, description, and response format affects how well agents can reason about and use our tools. It requires thinking less like a systems programmer and more like a UX designer whose users happen to be probability distributions.

Practical steps for developers entering this space:

  1. Start with prototypes: Build simple MCP servers for your existing services. Test them locally with Claude or other agents to identify rough edges.
  2. Invest in evaluation: Don't just test happy paths. Generate complex, realistic scenarios that chain multiple operations. Use evaluation agents to surface confusion points.
  3. Embrace consolidation: Fight the urge to expose every internal operation. Design tools around complete workflows and user intentions.
  4. Iterate with AI assistance: Use the recursive improvement loop. Let agents analyze their own failures and suggest improvements. The results often surprise even experienced developers.
  5. Plan for evolution: Consider how your tools will change over time. Build in deprecation notices, version negotiation, and graceful degradation from day one.

The Path Forward: Beyond Integration

MCP is just the beginning. The protocol already supports advanced features like sampling (letting servers request LLM completions from clients) and elicitation (enabling servers to request additional information during operations). These capabilities hint at a future where the boundary between tool and agent becomes increasingly fluid.

We're witnessing the emergence of a new layer in the software stack—one where AI agents aren't just consumers of APIs but active participants in distributed systems. Tools become capabilities, capabilities enable strategies, and strategies accomplish goals we might never have explicitly programmed.

The implications extend beyond architecture. As agents become more capable tool users, we'll need new frameworks for governance, audit trails, and policy enforcement. The question isn't whether AI agents will become integral to software systems—that's already happening. The question is how we'll build tools that amplify their capabilities while maintaining human oversight and values.

The real insight from Anthropic's research isn't just about better tool design. It's that we've been thinking about the wrong bottleneck. We thought model intelligence was the limiting factor. In reality, it's the cognitive ergonomics of the tools we provide. Fix that, and suddenly agents can do things we didn't think possible.

The USB-C moment for AI has arrived. But unlike that simple hardware standard, MCP demands we rethink not just how we connect systems, but how we design for intelligence itself. The tools we build today will determine what agents can accomplish tomorrow. The question now is: are we ready to design for minds that think in probabilities rather than procedures?

Unlock the Future of Business with AI

Dive into our immersive workshops and equip your team with the tools and knowledge to lead in the AI era.

Scroll to top