Installation
Prerequisites
1
Install Claude Code CLI
The Claude Agent SDK requires Claude Code to be installed:
2
Set up API keys
Configure your environment variables:
- ANTHROPIC_API_KEY: Get from console.anthropic.com
- COMPOSIO_API_KEY: Get from app.composio.dev
Quick Start
API Reference
ClaudeAgentSDKProvider
The main provider class for integrating Composio tools with Claude Code Agents.ClaudeAgentSDKProviderOptions
Configuration options for the provider
Methods
wrapTool()
Wraps a single Composio tool as a Claude Agent SDK MCP tool.Tool
required
The Composio tool to wrap
ExecuteToolFn
required
Function to execute the tool
wrapTools()
Wraps multiple Composio tools as Claude Agent SDK MCP tools.Tool[]
required
Array of Composio tools to wrap
ExecuteToolFn
required
Function to execute the tools
Examples
Using Multiple Tools
Custom Server Configuration
With Tool Router Session
How It Works
The Claude Agent SDK uses MCP (Model Context Protocol) servers to provide tools to Claude agents. This provider:- Converts Composio tool definitions to MCP tool format
- Creates an in-process MCP server using
createSdkMcpServer() - Handles tool execution by routing calls through Composio’s execution layer
- Manages authentication and connected accounts automatically
The Claude Agent SDK provider is built on top of Composio’s agentic provider base, which means it automatically handles tool wrapping and execution delegation.
Permission Modes
The Claude Agent SDK supports different permission modes:ask: Ask for permission before executing tools (default)bypassPermissions: Skip permission prompts (useful for automation)deny: Deny all tool executions
Type Exports
type
Type for a single Claude Agent SDK MCP tool definition
type
Type for a collection of Claude Agent SDK MCP tools
type
Options type from
@anthropic-ai/claude-agent-sdkRelated Resources
Claude Agent SDK Docs
Official Claude Agent SDK documentation
MCP Overview
Learn about Model Context Protocol
Tool Router
Advanced tool routing and session management
Anthropic Provider
Standard Anthropic provider for Claude API