Use Composio to get an array of tools with Claude Code Agents SDK.
Project description
Composio Claude Code Agents Provider
Use Composio tools with the Claude Code Agents SDK.
Installation
Prerequisites
-
Claude Code CLI: The Claude Agent SDK requires Claude Code to be installed:
# macOS/Linux/WSL curl -fsSL https://claude.ai/install.sh | bash # or via Homebrew brew install --cask claude-code # or via npm npm install -g @anthropic-ai/claude-code
-
Anthropic API Key: Set your API key as an environment variable:
export ANTHROPIC_API_KEY="your-api-key"
Install the package
pip install composio-claude-agent-sdk
Usage
import asyncio
from composio import Composio
from composio_claude_agent_sdk import ClaudeAgentSDKProvider
from claude_agent_sdk import query, ClaudeAgentOptions
# Initialize Composio with the Claude Code Agents provider
composio = Composio(provider=ClaudeAgentSDKProvider())
async def main():
# Get tools from Composio
tools = composio.tools.get(
user_id="default",
toolkits=["gmail"],
)
# Create an MCP server configuration with the tools
mcp_server = composio.provider.create_mcp_server(tools)
# Run a Claude agent with access to Composio tools
async for message in query(
prompt="Fetch my latest email from Gmail",
options=ClaudeAgentOptions(
mcp_servers={"composio": mcp_server},
permission_mode="bypassPermissions",
),
):
if message.type == "assistant":
print(message.message)
asyncio.run(main())
API Reference
ClaudeCodeAgentsProvider
The main provider class for integrating Composio tools with Claude Code Agents SDK.
Constructor Options
ClaudeCodeAgentsProvider(
server_name: str = "composio", # Name for the MCP server
server_version: str = "1.0.0", # Version for the MCP server
)
Methods
wrap_tool(tool, execute_tool)- Wraps a single Composio tool as a Claude Agent SDK MCP toolwrap_tools(tools, execute_tool)- Wraps multiple Composio toolscreate_mcp_server(wrapped_tools)- Creates an MCP server configuration from wrapped tools
Environment Variables
COMPOSIO_API_KEY- Your Composio API key (get one at https://app.composio.dev)ANTHROPIC_API_KEY- Your Anthropic API key (get one at https://console.anthropic.com)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file composio_claude_agent_sdk-0.11.1.tar.gz.
File metadata
- Download URL: composio_claude_agent_sdk-0.11.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4612c597ff5a3cb0cd110ab9a417de5d6ce87367b36a3cdb2db525eebda417d4
|
|
| MD5 |
b00eeb3fcf9d7f2649045b22a209303e
|
|
| BLAKE2b-256 |
2be943a8a75851f30272d7f1f1cccdb154936a1ab85f184312cfa5de6edeebc0
|
File details
Details for the file composio_claude_agent_sdk-0.11.1-py3-none-any.whl.
File metadata
- Download URL: composio_claude_agent_sdk-0.11.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c7bced441578bb1f1dfd92e163f9143c3465964bfef92f9f9860d2b0c87111c
|
|
| MD5 |
92c7a3770cf78906c1536a47f13f5359
|
|
| BLAKE2b-256 |
7379b0157d2e12c9ff7223d4242801c8c2057ad685cdfe3a3b6fd5a102247992
|