Skip to main content
The Claude Agent SDK provider enables seamless integration of Composio tools with Claude Code Agents SDK, allowing you to use any Composio-supported tool (Gmail, Slack, GitHub, etc.) within your Claude agents.

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:

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:
  1. Converts Composio tool definitions to MCP tool format
  2. Creates an in-process MCP server using createSdkMcpServer()
  3. Handles tool execution by routing calls through Composio’s execution layer
  4. 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-sdk

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