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
Metadata
Release files for composio-claude-agent-sdk 0.28.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| composio_claude_agent_sdk-0.28.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| composio_claude_agent_sdk-0.28.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / composio_claude_agent_sdk-0.28.0.tar.gz
| Download URL | composio_claude_agent_sdk-0.28.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68e1f84bdf3192c8dc7594dfb31e3836e0b3648276d168d5c0f0d9eff1bea32f
|
|
BLAKE2b-256 checksum How to use checksums |
35f6e2e847e780ff16de8c7689403015d4a04dda7751237074dd87823edb56d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / composio_claude_agent_sdk-0.28.0-py3-none-any.whl
| Download URL | composio_claude_agent_sdk-0.28.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
873ca7380d55588fa24fb0efee660f5e9bb176f8e5a4acff7c42cff2a63c50aa
|
|
BLAKE2b-256 checksum How to use checksums |
96886bcb01db25249e84563d09b58997ffa08303970d6f8362e0db83f7ca80d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|