connect

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Connect

连接

Connect Claude to any app. Stop generating text about what you could do - actually do it.
将Claude连接到任意应用。别再生成关于“你可以做什么”的文本——直接付诸行动。

When to Use This Skill

何时使用该技能

Use this skill when you need Claude to:
  • Send that email instead of drafting it
  • Create that issue instead of describing it
  • Post that message instead of suggesting it
  • Update that database instead of explaining how
当你需要Claude完成以下操作时,使用此技能:
  • 发送邮件而非草拟邮件
  • 创建工单而非描述工单
  • 发布消息而非建议发布内容
  • 更新数据库而非解释操作方法

What Changes

变化对比

Without ConnectWith Connect
"Here's a draft email..."Sends the email
"You should create an issue..."Creates the issue
"Post this to Slack..."Posts it
"Add this to Notion..."Adds it
未使用Connect使用Connect
"这是一封草拟的邮件……"直接发送邮件
"你应该创建一个工单……"直接创建工单
"将此发布到Slack……"直接发布内容
"将此添加到Notion……"直接添加内容

Supported Apps

支持的应用

1000+ integrations including:
  • Email: Gmail, Outlook, SendGrid
  • Chat: Slack, Discord, Teams, Telegram
  • Dev: GitHub, GitLab, Jira, Linear
  • Docs: Notion, Google Docs, Confluence
  • Data: Sheets, Airtable, PostgreSQL
  • CRM: HubSpot, Salesforce, Pipedrive
  • Storage: Drive, Dropbox, S3
  • Social: Twitter, LinkedIn, Reddit
1000+集成应用包括:
  • 邮件类:Gmail、Outlook、SendGrid
  • 聊天类:Slack、Discord、Teams、Telegram
  • 开发类:GitHub、GitLab、Jira、Linear
  • 文档类:Notion、Google Docs、Confluence
  • 数据类:Sheets、Airtable、PostgreSQL
  • CRM类:HubSpot、Salesforce、Pipedrive
  • 存储类:Drive、Dropbox、S3
  • 社交类:Twitter、LinkedIn、Reddit

Setup

设置步骤

1. Get API Key

1. 获取API密钥

Get your free key at platform.composio.dev
platform.composio.dev获取免费密钥

2. Set Environment Variable

2. 设置环境变量

bash
export COMPOSIO_API_KEY="your-key"
bash
export COMPOSIO_API_KEY="your-key"

3. Install

3. 安装

bash
pip install composio          # Python
npm install @composio/core    # TypeScript
Done. Claude can now connect to any app.
bash
pip install composio          # Python
npm install @composio/core    # TypeScript
完成以上步骤后,Claude即可连接到任意应用。

Examples

使用示例

Send Email

发送邮件

Email sarah@acme.com - Subject: "Shipped!" Body: "v2.0 is live, let me know if issues"
Email sarah@acme.com - Subject: "Shipped!" Body: "v2.0 is live, let me know if issues"

Create GitHub Issue

创建GitHub工单

Create issue in my-org/repo: "Mobile timeout bug" with label:bug
Create issue in my-org/repo: "Mobile timeout bug" with label:bug

Post to Slack

发布到Slack

Post to #engineering: "Deploy complete - v2.4.0 live"
Post to #engineering: "Deploy complete - v2.4.0 live"

Chain Actions

链式操作

Find GitHub issues labeled "bug" from this week, summarize, post to #bugs on Slack
Find GitHub issues labeled "bug" from this week, summarize, post to #bugs on Slack

How It Works

工作原理

Uses Composio Tool Router:
  1. You ask Claude to do something
  2. Tool Router finds the right tool (1000+ options)
  3. OAuth handled automatically
  4. Action executes and returns result
基于Composio Tool Router实现:
  1. 你提出需求:让Claude执行某项操作
  2. Tool Router匹配工具:从1000+选项中找到合适的工具
  3. 自动处理OAuth授权
  4. 执行操作并返回结果

Code

代码示例

python
from composio import Composio
from claude_agent_sdk.client import ClaudeSDKClient
from claude_agent_sdk.types import ClaudeAgentOptions
import os

composio = Composio(api_key=os.environ["COMPOSIO_API_KEY"])
session = composio.create(user_id="user_123")

options = ClaudeAgentOptions(
    system_prompt="You can take actions in external apps.",
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": {"x-api-key": os.environ["COMPOSIO_API_KEY"]},
        }
    },
)

async with ClaudeSDKClient(options) as client:
    await client.query("Send Slack message to #general: Hello!")
python
from composio import Composio
from claude_agent_sdk.client import ClaudeSDKClient
from claude_agent_sdk.types import ClaudeAgentOptions
import os

composio = Composio(api_key=os.environ["COMPOSIO_API_KEY"])
session = composio.create(user_id="user_123")

options = ClaudeAgentOptions(
    system_prompt="You can take actions in external apps.",
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": {"x-api-key": os.environ["COMPOSIO_API_KEY"]},
        }
    },
)

async with ClaudeSDKClient(options) as client:
    await client.query("Send Slack message to #general: Hello!")

Auth Flow

授权流程

First time using an app:
To send emails, I need Gmail access.
Authorize here: https://...
Say "connected" when done.
Connection persists after that.
首次使用某应用时:
要发送邮件,我需要获取Gmail访问权限。
请在此处授权:https://...
完成后请回复“已连接”。
授权连接将永久保留。

Framework Support

框架支持

FrameworkInstall
Claude Agent SDK
pip install composio claude-agent-sdk
OpenAI Agents
pip install composio openai-agents
Vercel AI
npm install @composio/core @composio/vercel
LangChain
pip install composio-langchain
Any MCP ClientUse
session.mcp.url
框架安装命令
Claude Agent SDK
pip install composio claude-agent-sdk
OpenAI Agents
pip install composio openai-agents
Vercel AI
npm install @composio/core @composio/vercel
LangChain
pip install composio-langchain
任意MCP客户端使用
session.mcp.url

Troubleshooting

故障排除

  • Auth required → Click link, authorize, say "connected"
  • Action failed → Check permissions in target app
  • Tool not found → Be specific: "Slack #general" not "send message"

<p align="center"> <b>Join 20,000+ developers building agents that ship</b> </p> <p align="center"> <a href="https://platform.composio.dev/?utm_source=Github&utm_content=AwesomeSkills"> <img src="https://img.shields.io/badge/Get_Started_Free-4F46E5?style=for-the-badge" alt="Get Started"/> </a> </p>
  • 需要授权 → 点击链接完成授权,然后回复“已连接”
  • 操作失败 → 检查目标应用中的权限设置
  • 未找到工具 → 请明确指令:例如使用“Slack #general”而非仅“发送消息”

<p align="center"> <b>加入20000+开发者行列,构建可落地的Agent应用</b> </p> <p align="center"> <a href="https://platform.composio.dev/?utm_source=Github&utm_content=AwesomeSkills"> <img src="https://img.shields.io/badge/Get_Started_Free-4F46E5?style=for-the-badge" alt="Get Started"/> </a> </p>