openclaw-integrations

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenClaw Integrations (powered by Pica)

OpenClaw 集成服务(基于Pica提供支持)

OpenClaw can interact with 200+ third-party platforms through Pica, a unified integration layer. Pica handles all OAuth, token refresh, rate limiting, and API normalization — you just connect your accounts once and OpenClaw can use them.
OpenClaw 可以通过统一集成层Pica与200+第三方平台进行交互。Pica负责处理所有OAuth验证、令牌刷新、速率限制和API标准化工作——你只需一次性连接你的账户,OpenClaw即可使用这些平台的服务。

Setup

设置步骤

Users need two things to use integrations:
  1. A Pica account — Sign up free at https://app.picaos.com
  2. Connected platforms — In the Pica dashboard, connect the services you want OpenClaw to access (Gmail, Slack, HubSpot, Notion, Shopify, etc.)
That's it. Once a platform is connected in Pica, OpenClaw can immediately interact with it. No API keys to manage, no OAuth flows to build — Pica handles everything.
用户需要完成以下两件事才能使用集成服务:
  1. 一个Pica账户——在https://app.picaos.com免费注册
  2. 连接平台——在Pica控制台中,连接你希望OpenClaw访问的服务(如Gmail、Slack、HubSpot、Notion、Shopify等)
就是这样简单。一旦在Pica中连接了某个平台,OpenClaw即可立即与其交互。无需管理API密钥,无需构建OAuth流程——所有工作都由Pica处理。

Links

相关链接


Implementation Guide (for developers setting up Pica in OpenClaw)

实施指南(面向在OpenClaw中设置Pica的开发者)

Critical: OpenClaw does NOT support native MCP server configuration in
openclaw.json
. Keys like
mcp
,
agents.defaults.mcp
, or
mcp.servers
are rejected by OpenClaw's config validator and will crash the process with
Unrecognized key
errors. Instead, Pica integration works through skills + mcporter CLI — the agent calls mcporter as a shell command via its exec tool.
重要提示: OpenClaw 不支持
openclaw.json
中进行原生MCP服务器配置。
mcp
agents.defaults.mcp
mcp.servers
这类配置项会被OpenClaw的配置验证器拒绝,并会抛出
Unrecognized key
错误导致程序崩溃。Pica集成需通过技能 + mcporter CLI实现——Agent会通过其exec工具以shell命令的方式调用mcporter。

Architecture

架构

OpenClaw Agent
  └─ exec tool → shell command
       └─ mcporter call pica.<tool> --args '...' --config <path>
            └─ spawns Pica MCP server as child process (stdio)
                 └─ Pica API → Gmail, Slack, HubSpot, etc.
OpenClaw Agent
  └─ exec tool → shell command
       └─ mcporter call pica.<tool> --args '...' --config <path>
            └─ spawns Pica MCP server as child process (stdio)
                 └─ Pica API → Gmail, Slack, HubSpot, etc.

Required Files

所需文件

1.
tools/package.json
— mcporter + Pica MCP dependencies
json
{
  "name": "pica-bridge",
  "version": "2.0.0",
  "type": "module",
  "dependencies": {
    "mcporter": "^0.7.3",
    "@picahq/mcp": "^2.0.4"
  }
}
2.
tools/mcporter.json
— MCP server registry (config for mcporter)
json
{
  "mcpServers": {
    "pica": {
      "command": "node",
      "args": ["/home/node/tools/node_modules/@picahq/mcp/build/index.js"],
      "env": {
        "PICA_SECRET": "$env:PICA_SECRET"
      }
    }
  }
}
Important: Use
node
with the absolute path to the installed module, not
npx
. Using
npx -y @picahq/mcp
causes slow cold-start downloads inside containers. The
$env:PICA_SECRET
syntax is mcporter's environment variable substitution — it reads from the container's environment at runtime.
3.
openclaw.json
— Must use
skills.load.extraDirs
, NOT
mcp
json
{
  "agents": {
    "defaults": {
      "workspace": "/home/node/workspace"
    }
  },
  "skills": {
    "load": {
      "extraDirs": ["/home/node/skills"]
    }
  }
}
4. This SKILL.md — Placed in the skills directory (e.g.,
/home/node/skills/openclaw-integrations/SKILL.md
)
1.
tools/package.json
— mcporter + Pica MCP 依赖包
json
{
  "name": "pica-bridge",
  "version": "2.0.0",
  "type": "module",
  "dependencies": {
    "mcporter": "^0.7.3",
    "@picahq/mcp": "^2.0.4"
  }
}
2.
tools/mcporter.json
— MCP服务器注册表(mcporter的配置文件)
json
{
  "mcpServers": {
    "pica": {
      "command": "node",
      "args": ["/home/node/tools/node_modules/@picahq/mcp/build/index.js"],
      "env": {
        "PICA_SECRET": "$env:PICA_SECRET"
      }
    }
  }
}
注意: 使用
node
命令并指定已安装模块的绝对路径,不要使用
npx
。在容器内使用
npx -y @picahq/mcp
会导致冷启动时缓慢的下载过程。
$env:PICA_SECRET
是mcporter的环境变量替换语法——它会在运行时从容器环境中读取该变量。
3.
openclaw.json
— 必须使用
skills.load.extraDirs
,不能使用
mcp
配置
json
{
  "agents": {
    "defaults": {
      "workspace": "/home/node/workspace"
    }
  },
  "skills": {
    "load": {
      "extraDirs": ["/home/node/skills"]
    }
  }
}
4. 本SKILL.md文件 — 放置在skills目录中(例如:
/home/node/skills/openclaw-integrations/SKILL.md

Dockerfile Setup

Dockerfile 设置

dockerfile
undefined
dockerfile
undefined

Create directories

Create directories

RUN mkdir -p /home/node/tools /home/node/skills
RUN mkdir -p /home/node/tools /home/node/skills

Install mcporter + Pica MCP locally

Install mcporter + Pica MCP locally

COPY tools/package.json /home/node/tools/ RUN cd /home/node/tools && npm install
COPY tools/package.json /home/node/tools/ RUN cd /home/node/tools && npm install

mcporter config

mcporter config

COPY tools/mcporter.json /home/node/tools/config/mcporter.json
COPY tools/mcporter.json /home/node/tools/config/mcporter.json

Symlink mcporter to PATH so the agent can call it

Symlink mcporter to PATH so the agent can call it

RUN ln -s /home/node/tools/node_modules/.bin/mcporter /usr/local/bin/mcporter
RUN ln -s /home/node/tools/node_modules/.bin/mcporter /usr/local/bin/mcporter

Copy skills

Copy skills

COPY skills/ /home/node/skills/
undefined
COPY skills/ /home/node/skills/
undefined

Environment Variables

环境变量

VariableRequiredDescription
PICA_SECRET
YesAPI key from https://app.picaos.com/settings/api-keys
PICA_IDENTITY
NoScope connections to a user/team (e.g.,
user_123
)
PICA_IDENTITY_TYPE
NoIdentity type (e.g.,
user
)
变量名是否必填描述
PICA_SECRET
来自https://app.picaos.com/settings/api-keys的API密钥
PICA_IDENTITY
限制连接的用户/团队范围(例如:
user_123
PICA_IDENTITY_TYPE
身份类型(例如:
user

Common Pitfalls

常见陷阱

  1. Do NOT add
    mcp
    to
    openclaw.json
    — OpenClaw rejects it at any level (
    root.mcp
    ,
    agents.defaults.mcp
    ). The process exits with code 1 and the container restart-loops.
  2. Do NOT use
    npx
    in mcporter.json
    — It downloads packages on every call inside containers. Use
    node
    with the absolute path to the pre-installed module.
  3. Do NOT install mcporter globally only — The Pica MCP module needs to be locally installed so mcporter can find it at a known absolute path. Symlink the binary to PATH for convenience.
  4. Skills directory must exist before OpenClaw starts — If
    extraDirs
    points to a missing path, OpenClaw may ignore it silently.

  1. 请勿在
    openclaw.json
    中添加
    mcp
    配置
    ——OpenClaw会拒绝任何层级的该配置(
    root.mcp
    agents.defaults.mcp
    )。程序会以代码1退出,容器进入重启循环。
  2. 请勿在mcporter.json中使用
    npx
    ——在容器内每次调用都会下载包。请使用
    node
    命令并指定预安装模块的绝对路径。
  3. 请勿仅全局安装mcporter——Pica MCP模块需要本地安装,以便mcporter能在已知的绝对路径找到它。为方便使用,可将二进制文件链接到PATH中。
  4. OpenClaw启动前必须确保skills目录存在——如果
    extraDirs
    指向不存在的路径,OpenClaw可能会静默忽略该配置。

What You Can Do

可实现的功能

Examples of what's possible with connected platforms:
  • Gmail — Read emails, send messages, manage drafts, organize labels
  • Slack — Post messages, read channels, manage users
  • HubSpot — List contacts, create deals, manage companies
  • Notion — Create pages, query databases, update content
  • Shopify — Manage orders, products, customers, inventory
  • Linear — Create issues, update projects, track progress
  • Google Calendar — List events, create meetings, manage schedules
  • GitHub — Manage repos, issues, pull requests
  • And 190+ more platforms

已连接平台的功能示例:
  • Gmail — 读取邮件、发送消息、管理草稿、整理标签
  • Slack — 发送消息、读取频道内容、管理用户
  • HubSpot — 列出联系人、创建交易、管理公司信息
  • Notion — 创建页面、查询数据库、更新内容
  • Shopify — 管理订单、产品、客户、库存
  • Linear — 创建问题、更新项目、跟踪进度
  • Google Calendar — 列出事件、创建会议、管理日程
  • GitHub — 管理仓库、问题、拉取请求
  • 以及另外190+个平台

How It Works (for the agent)

工作原理(面向Agent)

Integrations are accessed via
mcporter
, an MCP client CLI that connects to the Pica MCP server.
集成服务通过mcporter访问,mcporter是连接Pica MCP服务器的MCP客户端CLI。

mcporter Command Format

mcporter命令格式

IMPORTANT: Always use
--args
with a JSON string for tool arguments. Do NOT use colon-delimited syntax (
key:value
) because global flags like
--json
get misinterpreted as tool arguments.
The correct format for every call is:
bash
mcporter call pica.<tool_name> --args '<json>' --config /home/node/tools/config/mcporter.json
重要提示: 请始终使用
--args
参数传入JSON字符串作为工具参数。不要使用冒号分隔的语法(
key:value
),因为
--json
这类全局标志会被误解析为工具参数。
每次调用的正确格式为:
bash
mcporter call pica.<tool_name> --args '<json>' --config /home/node/tools/config/mcporter.json

Tools

工具列表

ToolPurpose
list_pica_integrations
See what platforms are connected
search_pica_platform_actions
Find available actions on a platform
get_pica_action_knowledge
Read docs for an action before using it
execute_pica_action
Run an action on a connected platform

工具用途
list_pica_integrations
查看已连接的平台
search_pica_platform_actions
查找平台上的可用操作
get_pica_action_knowledge
在使用前读取操作的文档说明
execute_pica_action
在已连接平台上执行操作

Step 1: Check what's connected

步骤1:检查已连接的平台

bash
mcporter call pica.list_pica_integrations --args '{}' --config /home/node/tools/config/mcporter.json
Response structure:
json
{
  "connections": [
    { "platform": "gmail", "key": "test::gmail::default::abc123" },
    { "platform": "slack", "key": "test::slack::default::def456" }
  ],
  "available": [
    { "platform": "notion", "name": "Notion", "category": "Productivity" }
  ],
  "summary": { "connectedCount": 10, "availableCount": 205 }
}
  • connections[].key
    is the
    connectionKey
    — you'll need it for step 4
  • connections[].platform
    is the kebab-case platform name for steps 2-4
  • available
    lists platforms that CAN be connected but aren't yet
  • If the user's desired platform is in
    available
    (not
    connections
    ), tell them to connect it at https://app.picaos.com
bash
mcporter call pica.list_pica_integrations --args '{}' --config /home/node/tools/config/mcporter.json
响应结构:
json
{
  "connections": [
    { "platform": "gmail", "key": "test::gmail::default::abc123" },
    { "platform": "slack", "key": "test::slack::default::def456" }
  ],
  "available": [
    { "platform": "notion", "name": "Notion", "category": "Productivity" }
  ],
  "summary": { "connectedCount": 10, "availableCount": 205 }
}
  • connections[].key
    connectionKey
    ——步骤4需要用到它
  • connections[].platform
    是步骤2-4中要用到的短横线命名格式的平台名称
  • available
    列出了可以连接但尚未连接的平台
  • 如果用户需要的平台在
    available
    中(不在
    connections
    里),请告知他们前往https://app.picaos.com进行连接

Step 2: Find the right action

步骤2:找到合适的操作

bash
mcporter call pica.search_pica_platform_actions --args '{"platform":"gmail","query":"send email"}' --config /home/node/tools/config/mcporter.json
Parameters:
  • platform
    (required): kebab-case platform name from step 1
  • query
    (required): natural language description of what you want to do
  • agentType
    (optional):
    "execute"
    when the user wants to perform an action,
    "knowledge"
    when they want info
Response structure:
json
{
  "actions": [
    {
      "actionId": "conn_mod_def::GGXAjWkZO8U::uMc1LQIHTTKzeMm3rLL5gQ",
      "title": "Send Email",
      "method": "POST",
      "path": "/gmail/send-email"
    }
  ],
  "metadata": { "platform": "gmail", "query": "send email", "count": 5 }
}
  • actions[].actionId
    is what you'll need for steps 3 and 4
  • Up to 5 results are returned, ranked by relevance
  • For Gmail, prefer actions with paths starting with
    /gmail/
    (these are "enhanced" actions with cleaner request/response formats) over raw API paths like
    users/me/messages/...
bash
mcporter call pica.search_pica_platform_actions --args '{"platform":"gmail","query":"send email"}' --config /home/node/tools/config/mcporter.json
参数:
  • platform
    (必填):步骤1中得到的短横线命名格式的平台名称
  • query
    (必填):你想要执行操作的自然语言描述
  • agentType
    (可选):当用户想要执行操作时填
    "execute"
    ,当用户想要获取信息时填
    "knowledge"
响应结构:
json
{
  "actions": [
    {
      "actionId": "conn_mod_def::GGXAjWkZO8U::uMc1LQIHTTKzeMm3rLL5gQ",
      "title": "Send Email",
      "method": "POST",
      "path": "/gmail/send-email"
    }
  ],
  "metadata": { "platform": "gmail", "query": "send email", "count": 5 }
}
  • actions[].actionId
    是步骤3和4需要用到的
  • 最多返回5个结果,按相关性排序
  • 对于Gmail,优先选择路径以
    /gmail/
    开头的“增强型”操作,而不是像
    users/me/messages/...
    这样的原始API路径——这些增强型操作的请求/响应格式更简洁

Step 3: Read the action docs

步骤3:读取操作文档

bash
mcporter call pica.get_pica_action_knowledge --args '{"actionId":"<id>","platform":"gmail"}' --config /home/node/tools/config/mcporter.json
Parameters:
  • actionId
    (required): from step 2
  • platform
    (required): kebab-case platform name
You MUST call this before executing. The response contains required parameters, optional parameters, request body schema, response format, and important caveats. Do not guess parameters — read the docs first.
bash
mcporter call pica.get_pica_action_knowledge --args '{"actionId":"<id>","platform":"gmail"}' --config /home/node/tools/config/mcporter.json
参数:
  • actionId
    (必填):来自步骤2
  • platform
    (必填):短横线命名格式的平台名称
执行前必须调用此工具。 响应包含必填参数、可选参数、请求体结构、响应格式和重要注意事项。不要猜测参数——请先阅读文档。

Step 4: Execute the action

步骤4:执行操作

bash
mcporter call pica.execute_pica_action --args '{"platform":"gmail","actionId":"conn_mod_def::GGXAjWkZO8U::uMc1LQIHTTKzeMm3rLL5gQ","connectionKey":"test::gmail::default::abc123","data":{"to":"user@example.com","subject":"Hello","body":"Hi there"}}' --config /home/node/tools/config/mcporter.json
Parameters:
  • platform
    (required): kebab-case platform name
  • actionId
    (required): from step 2
  • connectionKey
    (required): from step 1 (
    connections[].key
    )
  • data
    (optional): request body object — contents depend on the action (see step 3)
  • queryParams
    (optional): query string parameters object
  • pathVariables
    (optional): URL path variable substitutions object
  • headers
    (optional): additional HTTP headers object
  • isFormData
    (optional): boolean, set true for multipart/form-data
  • isFormUrlEncoded
    (optional): boolean, set true for URL-encoded form data
All parameters go inside the
--args
JSON string
, including
data
as a nested object.

bash
mcporter call pica.execute_pica_action --args '{"platform":"gmail","actionId":"conn_mod_def::GGXAjWkZO8U::uMc1LQIHTTKzeMm3rLL5gQ","connectionKey":"test::gmail::default::abc123","data":{"to":"user@example.com","subject":"Hello","body":"Hi there"}}' --config /home/node/tools/config/mcporter.json
参数:
  • platform
    (必填):短横线命名格式的平台名称
  • actionId
    (必填):来自步骤2
  • connectionKey
    (必填):来自步骤1(
    connections[].key
  • data
    (可选):请求体对象——内容取决于具体操作(见步骤3)
  • queryParams
    (可选):查询字符串参数对象
  • pathVariables
    (可选):URL路径变量替换对象
  • headers
    (可选):额外的HTTP头对象
  • isFormData
    (可选):布尔值,当使用multipart/form-data时设为true
  • isFormUrlEncoded
    (可选):布尔值,当使用URL编码表单数据时设为true
所有参数都要放在
--args
的JSON字符串中
,包括作为嵌套对象的
data

Response Formatting

响应格式规范

Never dump raw JSON or tool output to the user. Always parse and present a clean summary.
  • Listing integrations — Show a clean list of connected platform names. Don't show connection keys or IDs.
    • Good: "You have Gmail, Slack, and HubSpot connected."
  • Search results — Short numbered list with action titles only.
    • Good: "I found these Gmail actions:\n1. Send Email\n2. List Emails\n3. Create Draft"
  • Action docs — Summarize required params in plain language.
    • Good: "To send an email, I need: recipient, subject, and body. I can also add CC/BCC."
  • Execution results — One sentence describing what happened.
    • Good: "Done — email sent to alice@example.com."
  • Errors — Explain in plain language and suggest a fix. No stack traces.
切勿向用户输出原始JSON或工具输出内容。 务必解析并呈现简洁的摘要。
  • 列出集成服务 — 展示清晰的已连接平台名称列表。不要显示连接密钥或ID。
    • 示例:“你已连接GmailSlackHubSpot。”
  • 搜索结果 — 简短的编号列表,仅显示操作标题。
    • 示例:“我找到了以下Gmail操作:\n1. 发送邮件\n2. 列出邮件\n3. 创建草稿
  • 操作文档 — 用通俗易懂的语言总结必填参数。
    • 示例:“要发送邮件,我需要:收件人、主题和正文。还可以添加抄送/密送。”
  • 执行结果 — 用一句话描述执行情况。
    • 示例:“已完成——邮件已发送至alice@example.com。”
  • 错误信息 — 用通俗易懂的语言解释并建议解决方案。不要显示堆栈跟踪。

Guidelines

指导原则

  • When a user first asks about integrations, call
    list_pica_integrations
    to show what's available
  • If asked "what can you do with X?", search for actions on that platform and summarize the capabilities
  • For Gmail, prefer the enhanced actions (paths starting with
    /gmail/
    ) over raw API actions — they have simpler parameters and return decoded, human-readable data
  • Always confirm destructive actions (delete, batch operations) with the user before executing
  • Never expose connection keys, API secrets, or internal IDs in responses
  • If something fails, explain clearly and suggest next steps (e.g., "That platform isn't connected yet — you can add it at https://app.picaos.com")
  • 当用户首次询问集成服务时,调用
    list_pica_integrations
    以展示可用的平台
  • 如果用户问“你可以用X做什么?”,搜索该平台的操作并总结功能
  • 对于Gmail,优先使用增强型操作(路径以
    /gmail/
    开头)而非原始API操作——它们的参数更简单,返回解码后的、易读的数据
  • 在执行破坏性操作(删除、批量操作)前,务必与用户确认
  • 切勿在响应中暴露连接密钥、API密钥或内部ID
  • 如果操作失败,请清晰解释并建议下一步(例如:“该平台尚未连接——你可以在https://app.picaos.com添加它”)