Introducing the AgentPatch CLI
Today we’re releasing the AgentPatch CLI, a zero-dependency Python package that gives any AI agent access to 25+ tools in one pip install. It’s now the recommended way to use AgentPatch.
pip install agentpatch
agentpatch config set-key
agentpatch search "web search"
agentpatch run agentpatch google-search --input '{"query": "test"}'
That’s it. Your agent can now search the web, generate images, send emails, pull financial data, and more.
Why We Built It
AgentPatch originally launched with MCP as the primary integration path. MCP is a protocol, and we still support it, but after using AgentPatch daily with Claude Code, Codex, and custom agents, we kept running into the same friction points.
MCP takes too much context
Every MCP server your agent connects to adds tool definitions to the context window. Tool schemas, descriptions, parameter lists — they all eat tokens before your agent does any actual work. When context is expensive and limited, this matters.
The CLI has zero context overhead. Your agent doesn’t need to know about AgentPatch’s tool schemas upfront. It searches for tools when it needs them, reads the schema for the specific tool it wants, and invokes it. The rest of the marketplace stays out of the context window entirely.
MCP setup varies by platform
Configuring an MCP server looks different on every platform. Claude Code uses claude mcp add. OpenClaw uses a JSON config file. Cursor has its own format. Codex has another. Every agent framework has its own way of wiring up MCP servers, and some don’t support MCP at all.
The CLI is just a shell command. If your agent can run pip install and execute commands, it can use AgentPatch. That covers Claude Code, Codex, OpenClaw, the Claude Agent SDK, the OpenAI Agents SDK, LangChain, custom scripts, and anything else with shell access. One integration path for all of them.
MCP requires configuration
Setting up MCP means editing config files, adding headers, restarting your agent, and debugging connection issues. It’s not hard, but it’s friction — especially when you’re trying to get something done quickly, or when you’re onboarding a new agent setup.
The CLI is a pip install and one environment variable. Agents can even install it themselves without human intervention.
Design Choices
Zero dependencies
The entire package is a single Python file using only the standard library (urllib, json, argparse, pathlib). No requests, no httpx, no click, no typer. This means:
- No dependency conflicts. It won’t break your existing environment.
- Fast installs.
pip install agentpatchtakes under a second. - Portable. Copy the file into any project if you don’t want to use pip.
- Minimal attack surface. No transitive dependency chain to audit.
We made this choice deliberately. AI agents install packages in ephemeral environments, containers, and sandboxes. A package with a dependency tree is a package that can fail to install for reasons unrelated to the package itself. Zero dependencies means it works everywhere Python 3.10+ runs.
CLI and SDK in one package
The agentpatch package is both a CLI and a Python SDK. Agents that prefer shell commands use agentpatch search and agentpatch run. Agents that prefer Python use from agentpatch import AgentPatch. Same package, same API key, same tools.
from agentpatch import AgentPatch
client = AgentPatch()
results = client.search("image generation")
output = client.invoke("agentpatch", "recraft-image", {"prompt": "a sunset over mountains"})
Two command names
The package installs both agentpatch and ap as commands. agentpatch is descriptive and self-documenting — an agent seeing agentpatch search "email" in a prompt knows exactly what it does. ap is shorter for interactive use. Same tool, two entry points.
MCP Still Works
We’re not deprecating MCP. If your agent platform has great MCP support and you prefer that integration path, it still works exactly as before. We also have a Claude Code plugin that teaches Claude about AgentPatch automatically:
/plugin marketplace add fullthom/agentpatch-claude-skill
/plugin install agentpatch@agentpatch
The CLI is just the path we recommend now because it works in more places with less friction.
Get Started
pip install agentpatch
Sign up at agentpatch.ai to get your API key. New accounts include 10,000 free credits. Full CLI docs are on GitHub.