How to integrate Agenty MCP with Claude Code

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Agenty logo
Claude Code logo
divider

Introduction

Manage your Agenty directly from Claude Code with zero worries about OAuth hassles, API-breaking issues, or reliability and security concerns.

You can do this in two different ways:

  1. Via Composio Connect - Direct and easiest approach
  2. Via Composio SDK - Programmatic approach with more control

Also integrate Agenty with

Why use Composio?

  • Only one MCP URL to connect multiple apps with Claude Code with zero auth hassles.
  • Programmatic tool calling allows LLMs to write its code in a remote workbench to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Handling Large tool responses out of LLM context to minimize context rot.
  • Dynamic just-in-time access to 20,000 tools across 1000+ other Apps for cross-app workflows. It loads the tools you need, so LLMs aren't overwhelmed by tools you don't need.

Connecting Agenty to Claude Code using Composio

1. Add the Composio MCP to Claude

Terminal

2. Start Claude Code

bash
claude

3. Open your MCP list

bash
/mcp

4. Select Composio and click on Authenticate

Select Composio and click Authenticate

5. This will redirect you to the Composio OAuth page. Complete the flow by authorizing Composio and you're all set.

Composio OAuth authorization page
Composio authorization complete
Ask Claude to connect to your account and authenticate via the link

Supported Tools & Triggers

Tools
Add List RowsTool to add new rows to a list.
Create AgentCreates a new Agenty agent for web scraping, change detection, crawling, map monitoring, or brand monitoring.
Get Agent TemplatesTool to fetch all public agent templates and sample agents.
Delete Agent by IDTool to delete a single agent by its ID.
Fetch all agentsTool to fetch all active agents under an account.
Get Agent by IDRetrieves complete details of a specific agent including its configuration, input settings, scheduler, and metadata.
Update Agent by IDUpdates an existing agent's configuration, settings, and metadata.
Create API KeyCreates a new API key for programmatic access to the Agenty API.
Delete API key by IDDelete an API key by its unique identifier.
Download API keysTool to download all API keys under an account in CSV format.
Get all API keysTool to retrieve all API keys under an account.
Get API key by IDRetrieves detailed information about a specific API key by its ID.
Reset API key by IDResets (regenerates) the secret value of an existing API key.
Update API key by IDUpdates an existing API key's name and role by its unique identifier.
Capture ScreenshotTool to capture a full-page or visible screenshot of any webpage URL.
Capture Screenshot with OptionsTool to capture webpage screenshots with extensive customization options including full-page capture, image format, quality settings, viewport configuration, and post-processing.
Change API key status by IDToggles the enabled/disabled status of an API key.
Get all connectionsRetrieves all connections from your Agenty account.
Convert URL to PDFTool to convert a webpage URL to a PDF document.
Convert URL to PDF with OptionsTool to convert a URL or raw HTML to PDF with customizable options.
Copy AgentTool to copy an existing agent by its ID, creating a duplicate with optionally a new name.
Create WorkflowCreates a new workflow in Agenty to automate actions based on agent events.
Get dashboard reports and usageTool to fetch account reports like pages used by agent, date, and product.
Delete List Row by IDTool to delete a specific row from a list by its unique identifier.
Delete List Rows by IDsTool to delete specific rows from a list by their IDs.
Delete ProjectTool to delete a project by its ID.
Delete ScheduleTool to delete a schedule for an agent by its agent ID.
Delete Workflow by IDTool to delete a workflow by its ID.
Download Agent ResultTool to download agent results by agent ID in CSV, TSV or JSON format.
Download List RowsTool to download list rows as CSV file.
Download usersTool to download users list in CSV format.
Download workflowsTool to download all workflows in CSV format.
Extract Structured DataTool to auto-extract structured data from a webpage including schema.
Extract Structured Data from URLTool to auto-extract structured data from a webpage URL.
Get Agent ResultTool to get the most recent result data for an agent.
Get all team membersTool to retrieve all team members (users) under an account.
Get URL RedirectsTool to get the complete redirect chain for a URL.
Get Job ResultTool to get the result data from a completed job.
Get list by IDRetrieves detailed information about a specific list by its ID.
Get List Row by IDTool to fetch a specific row by its ID from a list.
Get Page ContentTool to fetch the complete HTML content of any webpage URL.
Get Page Content with OptionsTool to fetch HTML content of a webpage with custom options including ad blocking.
Get Project by IDRetrieves complete details of a specific project by its ID, including name, description, creator information, and timestamps.
Get Redirects with OptionsTool to get the complete redirect chain of a URL with custom navigation options.
Get Agent ScheduleTool to retrieve the schedule configuration for a specific agent.
Get User by IDTool to retrieve detailed information about a user by their ID.
Get Workflow by IDRetrieves complete details of a specific workflow by its ID.
Get agent input by IDRetrieves the input configuration for a specific agent by its ID.
Update Input by Agent IDUpdates the input configuration for a specific agent in Agenty.
Download jobsTool to download all jobs in CSV format.
Download job file by IDTool to download output files by job ID.
Download Job Result by IDTool to download the agent output result by job ID.
Fetch all jobsTool to fetch all jobs under an account.
Get Job by IDRetrieves comprehensive details about a specific job including its status, progress metrics (pages processed/succeeded/failed), timing information (created/started/completed times), resource consumption (page credits), and any error messages.
Get Job Logs by IDTool to fetch logs for a given job by its ID.
List job output filesLists all output files generated by a specific job.
Start Agent JobTool to start a new agent job.
Stop Job by IDTool to stop a running job by job ID.
Clear List RowsTool to clear all rows in a list by its ID.
Create ListTool to create a new list.
Delete List by IDTool to delete a specific list by its ID.
Download listsTool to download all lists in CSV format.
Get all listsTool to retrieve all lists under an account.
Fetch List Rows by IDTool to fetch all rows in a specified list.
Update List by IDTool to update a list's name and optionally description by list ID.
Upload CSV file to ListTool to upload a CSV file to an Agenty list for bulk import of data rows.
Patch WorkflowTool to partially update a workflow by ID.
Add Agents to ProjectAdd one or more agents to an Agenty project to organize and group related agents together.
Create ProjectCreates a new project in Agenty.
Get all projectsRetrieve all projects in the authenticated user's account.
Remove Agent from ProjectRemove an agent from an Agenty project.
Scrape Webpage DataTool to scrape data from any webpage using jQuery/CSS selectors.
Toggle Agent ScheduleTool to toggle schedule on/off for an agent.
Transfer Agent OwnershipTool to transfer agent ownership to another Agenty account.
Update List RowTool to update a specific row in a list by list ID and row ID.
Update ProjectUpdate an existing project's name and description in Agenty.
Update Agent ScheduleUpdates the schedule configuration for a specific agent.
Update User by IDTool to update a user's information by user ID.
Update WorkflowTool to update an existing workflow's configuration by workflow ID.

What is the Agenty MCP server, and what's possible with it?

The Agenty MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Agenty account. It provides structured and secure access to your web scraping agents and automation tools, so your agent can perform actions like creating, managing, cloning, and monitoring scraping agents, as well as handling API keys and templates—all on your behalf.

  • Agent creation and configuration: Instantly create new scraping or automation agents, set up their configurations, and optionally auto-start them—all without manual coding.
  • Clone and update agents: Duplicate existing agents to streamline workflows or update agent settings to refine your data extraction processes.
  • Fetch and manage agents: List all active agents in your account, retrieve details for any agent, and organize your entire automation fleet from a single place.
  • Template selection and management: Browse public agent templates or sample agents, making it easy to kickstart new projects or standardize scraping tasks.
  • API key management: Create, download, or delete API keys for secure programmatic access and efficient credential management, keeping your automation environment safe and organized.

Connecting Agenty via Composio SDK

Composio SDK is the underlying tech that powers Rube. It's a universal gateway that does everything Rube does but with much more programmatic control. You can programmatically generate an MCP URL with the app you need (here Agenty) for even more tool search precision. It's secure and reliable.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before starting, make sure you have:
  • Claude Pro, Max, or API billing enabled Anthropic account
  • Composio API Key
  • A Agenty account
  • Basic knowledge of Python or TypeScript

Install Claude Code

bash
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

To install Claude Code, use one of the following methods based on your operating system:

Set up Claude Code

bash
cd your-project-folder
claude

Open a terminal, go to your project folder, and start Claude Code:

  • Claude Code will open in your terminal
  • Follow the prompts to sign in with your Anthropic account
  • Complete the authentication flow
  • Once authenticated, you can start using Claude Code
Claude Code initial setup showing sign-in prompt
Claude Code terminal after successful login

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here

Create a .env file in your project root with the following variables:

  • COMPOSIO_API_KEY authenticates with Composio (get it from Composio dashboard)
  • USER_ID identifies the user for session management (use any unique identifier)

Install Composio library

pip install composio-core python-dotenv

Install the Composio Python library to create MCP sessions.

  • composio-core provides the core Composio functionality
  • python-dotenv loads environment variables from your .env file

Generate Composio MCP URL

import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
USER_ID = os.getenv("USER_ID")

composio_client = Composio(api_key=COMPOSIO_API_KEY)

composio_session = composio_client.create(
    user_id=USER_ID,
    toolkits=["agenty"],
)

COMPOSIO_MCP_URL = composio_session.mcp.url

print(f"MCP URL: {COMPOSIO_MCP_URL}")
print(f"\nUse this command to add to Claude Code:")
print(f'claude mcp add --transport http agenty-composio "{COMPOSIO_MCP_URL}" --headers "X-API-Key:{COMPOSIO_API_KEY}"')

Create a script to generate a Composio MCP URL for Agenty. This URL will be used to connect Claude Code to Agenty.

What's happening:

  • We import the Composio client and load environment variables
  • Create a Composio instance with your API key
  • Call create() to create a Tool Router session for Agenty
  • The returned mcp.url is the MCP server URL that Claude Code will use
  • The script prints this URL so you can copy it

Run the script and copy the MCP URL

python generate_mcp_url.py

Run your Python script to generate the MCP URL.

  • The script connects to Composio and creates a Tool Router session
  • It prints the MCP URL and the exact command you need to run
  • Copy the entire claude mcp add command from the output

Add Agenty MCP to Claude Code

bash
claude mcp add --transport http agenty-composio "YOUR_MCP_URL_HERE" --headers "X-API-Key:YOUR_COMPOSIO_API_KEY"

# Then restart Claude Code
exit
claude

In your terminal, add the MCP server using the command from the previous step. The command format is:

  • claude mcp add registers a new MCP server with Claude Code
  • --transport http specifies that this is an HTTP-based MCP server
  • The server name (agenty-composio) is how you'll reference it
  • The URL points to your Composio Tool Router session
  • --headers includes your Composio API key for authentication

After running the command, close the current Claude Code session and start a new one for the changes to take effect.

Verify the installation

bash
claude mcp list

Check that your Agenty MCP server is properly configured.

  • This command lists all MCP servers registered with Claude Code
  • You should see your agenty-composio entry in the list
  • This confirms that Claude Code can now access Agenty tools

If everything is wired up, you should see your agenty-composio entry listed:

Claude Code MCP list showing the toolkit MCP server

Authenticate Agenty

The first time you try to use Agenty tools, you'll be prompted to authenticate.

  • Claude Code will detect that you need to authenticate with Agenty
  • It will show you an authentication link
  • Open the link in your browser (or copy/paste it)
  • Complete the Agenty authorization flow
  • Return to the terminal and start using Agenty through Claude Code

Once authenticated, you can ask Claude Code to perform Agenty operations in natural language. For example:

  • "Clone my top-performing agent for news sites"
  • "List all my running web scraping agents"
  • "Create a new agent to monitor product prices"

Complete Code

Here's the complete code to get you started with Agenty and Claude Code:

import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
USER_ID = os.getenv("USER_ID")

composio_client = Composio(api_key=COMPOSIO_API_KEY)

composio_session = composio_client.create(
    user_id=USER_ID,
    toolkits=["agenty"],
)

COMPOSIO_MCP_URL = composio_session.mcp.url

print(f"MCP URL: {COMPOSIO_MCP_URL}")
print(f"\nUse this command to add to Claude Code:")
print(f'claude mcp add --transport http agenty-composio "{COMPOSIO_MCP_URL}" --headers "X-API-Key:{COMPOSIO_API_KEY}"')

Conclusion

You've successfully integrated Agenty with Claude Code using Composio's MCP server. Now you can interact with Agenty directly from your terminal using natural language commands.

Key features of this setup:

  • Terminal-native experience without switching contexts
  • Natural language commands for Agenty operations
  • Secure authentication through Composio's managed MCP
  • Tool Router for dynamic tool discovery and execution

Next steps:

  • Try asking Claude Code to perform various Agenty operations
  • Add more toolkits to your Tool Router session for multi-app workflows
  • Integrate this setup into your development workflow for increased productivity

You can extend this by adding more toolkits, implementing custom workflows, or building automation scripts that leverage Claude Code's capabilities.

How to build Agenty MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Agenty MCP?

With a standalone Agenty MCP server, the agents and LLMs can only access a fixed set of Agenty tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Agenty and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with Claude Code?

Yes, you can. Claude Code fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Agenty tools.

Can I manage the permissions and scopes for Agenty while using Tool Router?

Yes, absolutely. You can configure which Agenty scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Agenty data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.