How to Give Claude Agent SDK Agents Access to Tools with AgentPatch

The Claude Agent SDK lets you build custom AI agents that reason, plan, and call tools in a loop. The missing piece is the tools themselves. AgentPatch fills that gap: connect it once, and your agent gets access to search, email, maps, image generation, and more.

Why the Agent SDK Matters

Developers want to build agents that do more than chat. They want agents that take actions: look things up, send messages, generate assets, interact with the real world.

Anthropic’s Claude Agent SDK handles the hard parts of building an agent. It manages the agent loop (reasoning, tool selection, multi-step execution, error recovery) so you can focus on what the agent should do, not how it should think. You define the tools. The SDK figures out when and how to call them.

The problem: defining tools means writing API integrations. Every tool needs authentication, error handling, rate limiting, and schema definitions. For a single tool that’s fine. For five or ten, it’s a project in itself.

Where AgentPatch Fits

AgentPatch is an MCP server that exposes a marketplace of tools. Your agent connects to one endpoint and discovers all available tools at runtime. No individual API keys. No per-tool integration code.

The tools available today include Google Search, Google Maps, Google News, Google Trends, Bing Search, image generation (Recraft v3), email (send, receive, claim addresses), YouTube transcripts, and more. Third-party providers can list their own tools on the marketplace too.

Your agent calls these tools the same way it would call any MCP tool. The SDK handles the protocol. AgentPatch handles the execution.

Setup

Connect AgentPatch to your AI agent to get access to the tools:

Install the AgentPatch CLI (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Then use it:

ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Claude Code

Run this command to add AgentPatch as an MCP server:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.

OpenClaw

Add AgentPatch to ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "agentpatch": {
        "transport": "streamable-http",
        "url": "https://agentpatch.ai/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        }
      }
    }
  }
}

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Restart OpenClaw and it discovers all AgentPatch tools automatically.

Building an Agent with the SDK

Here’s what a basic agent looks like using the Claude Agent SDK with AgentPatch tools. The agent takes a research question, searches the web, reads the results, and writes a summary.

from anthropic import Agent, MCPServer

# Connect to AgentPatch as the tool provider
agentpatch = MCPServer(
    url="https://agentpatch.ai/mcp",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

# Define the agent
research_agent = Agent(
    model="claude-sonnet-4-20250514",
    mcp_servers=[agentpatch],
    system_prompt=(
        "You are a research assistant. When given a topic, "
        "search for current information, then write a concise summary "
        "with sources."
    )
)

# Run it
result = research_agent.run("What are the leading AI agent frameworks in 2026?")
print(result)

The SDK discovers the available tools from AgentPatch at startup. When the agent decides it needs to search the web, it calls the Google Search tool. If it needs to check news, it calls Google News. You didn’t write any integration code for those tools. The SDK and AgentPatch handled the wiring.

A More Practical Example

Research summaries are a starting point. The real value shows up when agents chain multiple tools together.

Say you’re building an agent that monitors competitors. You tell it:

“Find the latest news about Acme Corp, check their Google Trends interest over the past month, and email me a summary.”

The agent calls Google News for recent articles, Google Trends for search interest data, then sends an email through AgentPatch’s email tool with a formatted summary. Three tools, one agent loop, zero custom API code.

What You Get

The Claude Agent SDK gives you the reasoning engine: the ability to plan, decide which tools to use, handle errors, and iterate. AgentPatch gives you the tools: search, maps, email, images, and a growing marketplace of third-party capabilities.

Together, they let you build agents that interact with the real world without writing a pile of API integration code. The SDK is free and open source. AgentPatch uses credit-based pricing (10,000 credits = $1, and you get 10,000 free on signup).

Wrapping Up

The Claude Agent SDK handles the agent loop. AgentPatch handles the tools. Connect them and your custom agents can search, email, generate images, and access maps out of the box. Get started at agentpatch.ai.