connect

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pica Connect

Pica Connect

Set up the Pica CLI and MCP server so your AI agent can send emails, post to Slack, update CRMs, and interact with 200+ platforms.
设置Pica CLI和MCP服务器,让你的AI Agent能够发送邮件、发布Slack消息、更新CRM,并与200+平台进行交互。

When This Skill Activates

该Skill触发时机

When the skill activates, start by printing this welcome message:
██████████████   ██████   ██████████████   ██████████████
██████████████   ██████   ██████████████   ██████████████
█████    █████   ██████   █████            █████    █████
█████    █████   ██████   █████            █████    █████
██████████████   ██████   █████            ██████████████
██████████████   ██████   █████            ██████████████
█████            ██████   █████            █████    █████
█████            ██████   █████            █████    █████
█████            ██████   ██████████████   █████    █████
█████            ██████   ██████████████   █████    █████

U N I V E R S A L   I N T E G R A T I O N S   F O R   A I
Then follow the steps below.

当该Skill触发时,首先打印以下欢迎信息:
██████████████   ██████   ██████████████   ██████████████
██████████████   ██████   ██████████████   ██████████████
█████    █████   ██████   █████            █████    █████
█████    █████   ██████   █████            █████    █████
██████████████   ██████   █████            ██████████████
██████████████   ██████   █████            ██████████████
█████            ██████   █████            █████    █████
█████            ██████   █████            █████    █████
█████            ██████   ██████████████   █████    █████
█████            ██████   ██████████████   █████    █████

U N I V E R S A L   I N T E G R A T I O N S   F O R   A I
然后按照以下步骤操作。

Step 1: Check if Pica CLI is installed

步骤1:检查Pica CLI是否已安装

Run this command to check:
bash
pica --version
If the command succeeds (prints a version number): Pica is installed. Skip to Step 3.
If the command fails (
command not found
): Continue to Step 2.

运行以下命令进行检查:
bash
pica --version
如果命令执行成功(输出版本号):Pica已安装。跳至步骤3。
如果命令执行失败(提示
command not found
):继续步骤2。

Step 2: Install Pica CLI

步骤2:安装Pica CLI

Install globally via npm:
bash
npm install -g @picahq/cli
After installation, verify it worked:
bash
pica --version
If this still fails, check that the npm global bin directory is in the user's PATH. Common fix:
bash
export PATH="$(npm prefix -g)/bin:$PATH"

通过npm全局安装:
bash
npm install -g @picahq/cli
安装完成后,验证是否成功:
bash
pica --version
如果仍然失败,请检查npm全局bin目录是否在用户的PATH中。常见修复命令:
bash
export PATH="$(npm prefix -g)/bin:$PATH"

Step 3: Run
pica init

步骤3:运行
pica init

This is the core setup step. Run:
bash
pica init
这是核心设置步骤。运行:
bash
pica init

What
pica init
does

pica init
的作用

First run (no existing config):
  1. Prompts for a Pica API key (get one at https://app.picaos.com/settings/api-keys)
  2. Validates the key against the Pica API
  3. Asks which AI agents to install the MCP server into (Claude Code, Claude Desktop, Cursor, Windsurf)
  4. Asks for global or project-level installation
  5. Writes the MCP config so the agent gets access to integration tools
Subsequent runs (config already exists):
Shows a status dashboard with the current API key, config path, and per-agent MCP installation status:
  Current Setup
  ──────────────────────────────────────────
  API Key:  sk_test_...9j-Y
  Config:   ~/.pica/config.json

  Agent           Global  Project
  ──────────────  ──────  ───────
  Claude Code     ● yes   ● yes
  Claude Desktop  ● yes   -
  Cursor          ○ no    ○ no
  Windsurf        -       -

  - = not detected on this machine
Then offers targeted actions (only relevant options appear):
ActionWhat it does
Update API keyValidates new key, re-installs MCP to all agents that have it
Install MCP to more agentsShows only detected agents missing the MCP
Install MCP for this projectCreates project-level config files in cwd
Start freshFull setup flow from scratch
首次运行(无现有配置):
  1. 提示输入Pica API密钥(可在https://app.picaos.com/settings/api-keys获取)
  2. 验证密钥是否与Pica API匹配
  3. 询问要将MCP服务器安装到哪些AI Agent中(Claude Code、Claude Desktop、Cursor、Windsurf)
  4. 询问选择全局安装还是项目级安装
  5. 写入MCP配置,让Agent获得集成工具的访问权限
后续运行(已有配置):
显示状态仪表板,包含当前API密钥、配置路径以及各Agent的MCP安装状态:
  Current Setup
  ──────────────────────────────────────────
  API Key:  sk_test_...9j-Y
  Config:   ~/.pica/config.json

  Agent           Global  Project
  ──────────────  ──────  ───────
  Claude Code     ● yes   ● yes
  Claude Desktop  ● yes   -
  Cursor          ○ no    ○ no
  Windsurf        -       -

  - = not detected on this machine
然后提供针对性操作选项(仅显示相关选项):
操作功能说明
更新API密钥验证新密钥,重新为所有已安装MCP的Agent部署
为更多Agent安装MCP仅显示未安装MCP的已检测Agent
为当前项目安装MCP在当前工作目录创建项目级配置文件
重新开始从头执行完整设置流程

Init flags

Init参数

FlagEffect
-y, --yes
Skip confirmations
-g, --global
Install MCP globally (available in all projects)
-p, --project
Install MCP for this project only
参数作用
-y, --yes
跳过确认步骤
-g, --global
全局安装MCP(所有项目均可使用)
-p, --project
仅为当前项目安装MCP

Where MCP configs are written

MCP配置文件路径

AgentGlobal configProject config
Claude Code
~/.claude.json
.mcp.json
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
n/a
Cursor
~/.cursor/mcp.json
.cursor/mcp.json
Windsurf
~/.codeium/windsurf/mcp_config.json
n/a
After
pica init
completes, the agent will have access to these MCP tools:
ToolWhat it does
list_pica_integrations
List all platforms and active connections
search_pica_platform_actions
Search for actions on a platform
get_pica_action_knowledge
Get full API docs for an action
execute_pica_action
Execute an action on a connected platform

Agent全局配置路径项目配置路径
Claude Code
~/.claude.json
.mcp.json
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
Cursor
~/.cursor/mcp.json
.cursor/mcp.json
Windsurf
~/.codeium/windsurf/mcp_config.json
pica init
完成后,Agent将获得以下MCP工具的访问权限:
工具功能说明
list_pica_integrations
列出所有平台及已激活的连接
search_pica_platform_actions
搜索平台支持的操作
get_pica_action_knowledge
获取操作的完整API文档
execute_pica_action
在已连接平台上执行操作

Step 4: First connection

步骤4:首次连接

After init completes, prompt the user:
Pica is set up! Your agent now has access to 200+ integrations.

What would you like to do first?
  1. Connect a platform (e.g. Gmail, Slack, HubSpot)
  2. Browse available platforms
  3. Skip for now
If option 1: Ask which platform, then run:
bash
pica add <platform>
This opens a browser for OAuth. The CLI polls until the connection is live. Common first connections:
gmail
,
slack
,
google-calendar
,
hubspot
,
notion
,
linear
.
If option 2: Run:
bash
pica platforms
This shows all 200+ available platforms with categories.
If option 3: Let them know they can come back anytime:
No problem. When you're ready:
  pica add gmail       - Connect Gmail
  pica platforms       - Browse all platforms
  pica list            - See your connections

初始化完成后,向用户提示:
Pica设置完成!你的Agent现在可以访问200+集成平台。

你想先进行什么操作?
  1. 连接一个平台(例如Gmail、Slack、HubSpot)
  2. 浏览可用平台
  3. 暂时跳过
如果选择选项1: 询问要连接的平台,然后运行:
bash
pica add <platform>
这将打开浏览器进行OAuth授权。CLI会轮询直到连接生效。常见的首次连接平台:
gmail
slack
google-calendar
hubspot
notion
linear
如果选择选项2: 运行:
bash
pica platforms
这将显示所有200+可用平台及其分类。
如果选择选项3: 告知用户可随时返回操作:
没问题。当你准备好时:
  pica add gmail       - 连接Gmail
  pica platforms       - 浏览所有平台
  pica list            - 查看已连接的平台

Step 5: Verify and use

步骤5:验证与使用

Once a connection is added, verify it:
bash
pica list
Output shows connection status and keys:
  ● gmail      operational
    live::gmail::default::abc123
If MCP tools are available, show the user what they can do:
You're all set! Try asking me to:
  "Send an email to sarah@example.com about the project update"
  "Post the release notes to #product in Slack"
  "Create a Linear issue for the login bug"
  "Check my calendar for tomorrow"

添加连接后,验证连接状态:
bash
pica list
输出将显示连接状态和密钥:
  ● gmail      operational
    live::gmail::default::abc123
如果MCP工具可用,向用户展示可执行的操作:
设置完成!你可以尝试让我执行以下操作:
  "给sarah@example.com发送一封关于项目更新的邮件"
  "将发布说明发布到Slack的#product频道"
  "为登录BUG创建一个Linear工单"
  "查看我明天的日程"

Using MCP tools (after setup)

MCP工具使用流程(设置完成后)

Once the MCP is installed and connections are live, this is the standard workflow for any integration task:
1. list_pica_integrations          -> get connection keys and platform names
2. search_pica_platform_actions    -> find the right action
3. get_pica_action_knowledge       -> read the docs (REQUIRED before execute)
4. execute_pica_action             -> do the thing
MCP安装完成且连接生效后,任何集成任务的标准工作流如下:
1. list_pica_integrations          -> 获取连接密钥和平台名称
2. search_pica_platform_actions    -> 找到对应的操作
3. get_pica_action_knowledge       -> 阅读文档(执行前必须完成)
4. execute_pica_action             -> 执行操作

Key concepts

核心概念

  • Connection key: Identifies which authenticated connection to use. Format:
    live::gmail::default::abc123
    . Get from
    list_pica_integrations
    or
    pica list
    .
  • Action ID: Identifies a specific API action. Starts with
    conn_mod_def::
    . Get from search results.
  • Platform name: Kebab-case identifier (
    gmail
    ,
    hubspot
    ,
    google-calendar
    ,
    ship-station
    ). Get from
    list_pica_integrations
    .

  • 连接密钥:标识已认证的连接。格式:
    live::gmail::default::abc123
    。可通过
    list_pica_integrations
    pica list
    获取。
  • 操作ID:标识特定的API操作。以
    conn_mod_def::
    开头。可通过搜索结果获取。
  • 平台名称:短横线分隔的标识符(
    gmail
    hubspot
    google-calendar
    ship-station
    )。可通过
    list_pica_integrations
    获取。

CLI quick reference

CLI快速参考

CommandDescription
pica init
Set up API key and install MCP
pica add <platform>
Connect a platform via OAuth
pica list
List connections with keys
pica platforms
Browse all 200+ platforms
pica search <platform> [query]
Search for actions
pica actions knowledge <id>
Get API docs for an action
pica exec <id>
Execute an action
Aliases:
pica ls
= list,
pica p
= platforms,
pica a k
= actions knowledge,
pica a x
= actions execute.
All commands support
--json
for machine-readable output.

命令描述
pica init
设置API密钥并安装MCP
pica add <platform>
通过OAuth连接平台
pica list
列出已连接平台及密钥
pica platforms
浏览所有200+平台
pica search <platform> [query]
搜索平台操作
pica actions knowledge <id>
获取操作的API文档
pica exec <id>
执行操作
别名:
pica ls
= list,
pica p
= platforms,
pica a k
= actions knowledge,
pica a x
= actions execute。
所有命令均支持
--json
参数以输出机器可读格式。

Troubleshooting

故障排除

pica: command not found

pica: command not found

Pica CLI is not installed or not in PATH.
bash
npm install -g @picahq/cli
If it's installed but not found, add the npm global bin to PATH:
bash
export PATH="$(npm prefix -g)/bin:$PATH"
Pica CLI未安装或未加入PATH。
bash
npm install -g @picahq/cli
如果已安装但仍提示未找到,将npm全局bin目录加入PATH:
bash
export PATH="$(npm prefix -g)/bin:$PATH"

Invalid API key

Invalid API key

The key is wrong, expired, or not a valid Pica key. Get a new one at https://app.picaos.com/settings/api-keys. Keys start with
sk_live_
or
sk_test_
.

MCP tools not available after init

初始化后MCP工具不可用

The agent needs to be restarted after MCP installation. For Claude Desktop, quit and reopen. For Claude Code, start a new session.
安装MCP后需要重启Agent。对于Claude Desktop,需退出并重新打开;对于Claude Code,需开启新会话。

No connections found

No connections found

No apps have been connected yet. Run
pica add gmail
(or any platform) to connect one.
尚未连接任何应用。运行
pica add gmail
(或其他平台)进行连接。

Connection shows
failed
or
degraded

连接状态显示
failed
degraded

The OAuth token expired or was revoked. Reconnect:
bash
pica add <platform>
Or reconnect from the dashboard at https://app.picaos.com/connections.

OAuth令牌过期或被撤销。重新连接:
bash
pica add <platform>

Links

相关链接