Use Composio to get an array of tools with Claude Code Agents SDK.
Project description
composio-claude-agent-sdk
Adapts Composio tools to the Claude Agent SDK, exposing them to Claude through an in-process MCP server.
Installation
pip install composio composio-claude-agent-sdk claude-agent-sdk
The Claude Agent SDK also requires the Claude Code CLI: npm install -g @anthropic-ai/claude-code.
Set COMPOSIO_API_KEY (from the dashboard) and ANTHROPIC_API_KEY in your environment.
Quickstart
import asyncio
from composio import Composio
from composio_claude_agent_sdk import ClaudeAgentSDKProvider
from claude_agent_sdk import (
AssistantMessage,
ClaudeAgentOptions,
TextBlock,
create_sdk_mcp_server,
query,
)
composio = Composio(provider=ClaudeAgentSDKProvider())
# Each session is scoped to one of your users
session = composio.create(user_id="user_123")
tools = session.tools()
server = create_sdk_mcp_server(name="composio", version="1.0.0", tools=tools)
async def main():
options = ClaudeAgentOptions(
system_prompt="You are a helpful assistant. Use tools to complete tasks.",
permission_mode="bypassPermissions",
mcp_servers={"composio": server},
)
async for message in query(prompt="Summarize my emails from today", options=options):
if isinstance(message, AssistantMessage):
for block in message.content:
if isinstance(block, TextBlock):
print(block.text)
asyncio.run(main())
For multi-turn use, store session.session_id and reuse it with composio.use(session_id) instead of calling create() again.
How tools are exposed
session.tools() returns SdkMcpTool objects that plug straight into create_sdk_mcp_server. The provider also ships composio.provider.create_mcp_server(tools) if you prefer a preconfigured server (name composio, customizable via ClaudeAgentSDKProvider(server_name=..., server_version=...)).
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.18.0.tar.gz.
File metadata
- Download URL: composio_claude_agent_sdk-0.18.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1aecbb7c711bbe86a64e46ad73658727cc8a0d8fee7bc63c8d37754f6df8a3c
|
|
| MD5 |
9f3e7e614947c1fbeb19d29fe0a22f03
|
|
| BLAKE2b-256 |
babfffd47287261063f664b9214a1a751a202930f4bbaaf02a884e1e639dd6b4
|
File details
Details for the file composio_claude_agent_sdk-0.18.0-py3-none-any.whl.
File metadata
- Download URL: composio_claude_agent_sdk-0.18.0-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.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
776ec4ee42b076b5a34ca13f17d04cbef949292731759682ae8c937e615fa342
|
|
| MD5 |
c14b33c572df6f2aff74ebb0b8256c87
|
|
| BLAKE2b-256 |
bef6bb6881ed007b0533cfe5b7cd1cfff96b7354458373066b8c7917f6149e10
|