名称: pdauth
描述: 通过 Pipedream 为 AI 代理提供动态 OAuth 授权。为 2500+ 个 API 生成 OAuth 链接,让用户授权,然后代表他们调用 MCP 工具。
主页: https://github.com/Versatly/pdauth
元数据:
{
"openclaw":
{
"emoji": "🔐",
"requires": { "bins": ["pdauth"] },
"install":
[
{
"id": "node",
"kind": "node",
"package": "pdauth",
"bins": ["pdauth"],
"label": "安装 pdauth (node)",
},
],
},
}
使用 pdauth 让您(代理)通过 OAuth 访问 2500+ 个 API。流程如下:
pdauth connect <app> 生成一个 OAuth 授权链接。pdauth call <app.tool> 调用工具了。# 配置(一次性设置)
pdauth config
# 搜索应用
pdauth apps --search spotify
# 生成 OAuth 授权链接
pdauth connect spotify --user 用户_ID
# 查看已连接的应用
pdauth status --user 用户_ID
# 列出可用工具
pdauth tools spotify --user 用户_ID
# 调用工具
pdauth call spotify.get_my_playlists --user 用户_ID
pdauth call slack.send_message channel=general text="你好!"
当您需要访问用户尚未授权的应用时:
1. 运行:pdauth connect <app> --user <用户_ID>
2. 从输出中获取 OAuth 授权链接
3. 将链接发送给用户:"要执行此操作,我需要访问 <App>。请点击此处授权:<链接>"
4. 用户点击链接,通过 Pipedream 完成授权
5. 使用 `pdauth status --user <用户_ID>` 确认授权状态
6. 现在您可以调用工具了!
为每个用户使用一致的标识符:
- Telegram: telegram:5439689035
- 邮箱: pedro@example.com
- 自定义: pedro-mainframe
跨会话使用相同的用户 ID 可以保持其已连接账户的状态。
# 格式:pdauth call <app>.<工具名> [键=值 ...]
# 简单参数
pdauth call slack.send_message channel=general text="你好"
# 使用 JSON 参数处理复杂数据
pdauth call notion.create_page --args '{"title": "我的页面", "content": "..."}'
# 获取 JSON 格式输出以便解析
pdauth call spotify.get_my_playlists --json
# 查看用户已连接的应用
pdauth status --user pedro
# 查看所有用户
pdauth status --all
# 获取 JSON 格式输出用于脚本处理
pdauth status --user pedro --json
浏览所有应用:https://mcp.pipedream.com
| 应用 | 标识符 | 示例工具 |
|---|---|---|
| Slack | slack |
send_message, list_channels |
| Spotify | spotify |
get_my_playlists, add_to_playlist |
| Notion | notion |
create_page, query_database |
| Google Sheets | google_sheets |
get_values, update_values |
| Gmail | gmail |
send_email, list_messages |
| GitHub | github |
create_issue, list_repos |
| Linear | linear |
create_issue, list_issues |
| Airtable | airtable |
list_records, create_record |
pdauth connect 生成链接并请求用户授权。pdauth tools <app> 列出可用工具。pdauth config 设置 Pipedream 凭据。--json 参数获取结果,便于程序化解析。用户:"将 'Bohemian Rhapsody' 添加到我的 Spotify 播放列表"
代理:
1. pdauth status --user telegram:5439689035 --json
→ Spotify 未连接
2. pdauth connect spotify --user telegram:5439689035
→ 获取 OAuth 授权链接
3. 发送给用户:"我需要 Spotify 访问权限。请点击此处授权:<链接>"
4. 用户完成授权
5. pdauth status --user telegram:5439689035
→ Spotify ✓ 已连接
6. pdauth call spotify.search_tracks query="Bohemian Rhapsody" --json
→ 获取曲目 ID
7. pdauth call spotify.add_to_playlist playlist_id=... track_id=...
→ 完成!
8. 回复:"已将 Bohemian Rhapsody 添加到您的播放列表!🎵"