Meegle Skill
Connect to Meegle via MCP service, supporting OAuth authentication.
Prerequisites
This skill relies on the following environment:
- - Node.js (>= 18) and INLINECODE0
- @lark-project/meego-mcporter: MCP Transfer Tool, sourced from npm (
npm install -g @lark-project/meego-mcporter or automatically obtained via npx)
Certificate Management Instructions
This skill uses ~/.mcporter/credentials.json to store OAuth credentials (managed by mcporter).
- - Method 1 (Recommended): Browser OAuth - mcporter automatically completes authorization and writes credentials, and the agent does not need to access the credential content.
- Method 2 (Remote Server): When the server does not have a browser, users need to complete OAuth on their local computers and then sync the credentials to the server. In this process, the agent will assist in displaying the OAuth Client configuration (excluding tokens) and writing the authorized credentials provided by the user, and all operations require users to confirm step by step.
Security Constraints:
- - The agent shall not initiate credential operations independently, and each step requires explicit confirmation from the user.
- The agent must not record the credential content to logs, historical messages, or any location other than INLINECODE4
- Temporary files generated during the operation must be cleaned up immediately
Connection Method
1. Ask the user which method to use for authentication
Note: Be sure to ask the user and let the user make an active choice. Automatically choosing for the user is prohibited.
This tool supports two authentication methods:
- - Browser OAuth (Recommended): Suitable for scenarios where OpenClaw is locally installed, automatically re-engaging the browser to complete authorization
- Remote OAuth Proxy: Suitable for scenarios where OpenClaw is installed on a remote server (browserless environment)
2. Browser OAuth (Recommended)
2.1. Create a Configuration File
Copy meegle-config.json from the skill package directory to the working directory.
2.2. Perform OAuth authentication (only once)
CODEBLOCK0
This will open a browser for you to authorize your Feishu account. After authorization is completed, the credentials will be cached in ~/.mcporter/credentials.json, and subsequent calls will not require re-authorization.
3. Remote OAuth Proxy
Applicable Scenario: When the remote server does not have a browser, the user needs to complete OAuth on the local computer and then sync the credentials back to the server.
3.1. Create a Configuration File
Copy meegle-config.json from the skill package directory to the working directory.
3.2. Generate OAuth Client Configuration
CODEBLOCK1
This command will generate an OAuth Client configuration (containing only the client parameters, excluding tokens) in ~/.mcporter/credentials.json.
3.3. Assist users in completing local authorization
This step requires the agent and the user to cooperate to complete credential synchronization. Since the remote server does not have a browser, the user needs to complete OAuth authorization on their local computer.
Step A - Present the OAuth Client Configuration to the User (Requires User Confirmation):
Read the contents of ~/.mcporter/credentials.json (which at this time only contains OAuth client parameters and no tokens), display them to the user, and inform the user:
The following is the OAuth Client configuration. Please refer to the document https://meegle.com/b/helpcenter/product/5rifl7a7 to complete the authorization on your local computer. After the authorization is completed, please provide me with the generated credential file.
Step B - Receive authorized credentials provided by the user (user confirmation required):
After the user completes OAuth locally, they will provide the authorized credential file. After obtaining user confirmation, write it to ~/.mcporter/credentials.json.
After the write operation is completed, immediately clean up any intermediate temporary files that may have been generated during the operation. The credential content is only stored in ~/.mcporter/credentials.json and must not be saved to any other location.
3.4. Verify the Authorization Result
Attempted to connect to the MCP server and confirmed successful authorization.
4. Subsequent Use
CODEBLOCK2
Available Features
- - Query: To-do, View, Work Item Information
- Operations: Create, modify, and transfer work items
Meegle 技能
通过 MCP 服务连接到 Meegle,支持 OAuth 认证。
前置条件
本技能依赖以下环境:
- - Node.js (>= 18) 和 npx
- @lark-project/meego-mcporter:MCP 传输工具,来源于 npm(npm install -g @lark-project/meego-mcporter 或通过 npx 自动获取)
凭证管理说明
本技能使用 ~/.mcporter/credentials.json 存储 OAuth 凭证(由 mcporter 管理)。
- - 方式一(推荐):浏览器 OAuth - mcporter 自动完成授权并写入凭证,代理无需接触凭证内容。
- 方式二(远程服务器):当服务器没有浏览器时,用户需要在其本地计算机上完成 OAuth,然后将凭证同步到服务器。在此过程中,代理将协助显示 OAuth 客户端配置(不含令牌)并写入用户提供的已授权凭证,所有操作均需用户逐步确认。
安全约束:
- - 代理不得独立发起凭证操作,每一步都需要用户明确确认。
- 代理不得将凭证内容记录到日志、历史消息或 ~/.mcporter/ 之外的任何位置。
- 操作过程中产生的临时文件必须立即清理。
连接方式
1. 询问用户使用哪种认证方式
注意:务必询问用户,让用户主动选择。禁止自动为用户选择。
此工具支持两种认证方式:
- - 浏览器 OAuth(推荐):适用于 OpenClaw 本地安装的场景,自动打开浏览器完成授权
- 远程 OAuth 代理:适用于 OpenClaw 安装在远程服务器(无浏览器环境)的场景
2. 浏览器 OAuth(推荐)
2.1. 创建配置文件
将 meegle-config.json 从技能包目录复制到工作目录。
2.2. 执行 OAuth 认证(仅需一次)
bash
npx @lark-project/meego-mcporter auth meegle --config meegle-config.json
这将打开浏览器供您授权飞书账号。授权完成后,凭证将缓存到 ~/.mcporter/credentials.json,后续调用无需重新授权。
3. 远程 OAuth 代理
适用场景:当远程服务器没有浏览器时,用户需要在本地计算机上完成 OAuth,然后将凭证同步回服务器。
3.1. 创建配置文件
将 meegle-config.json 从技能包目录复制到工作目录。
3.2. 生成 OAuth 客户端配置
bash
npx @lark-project/meego-mcporter auth meegle --config meegle-config.json --oauth-timeout 1000
该命令将在 ~/.mcporter/credentials.json 中生成 OAuth 客户端配置(仅包含客户端参数,不含令牌)。
3.3. 协助用户完成本地授权
此步骤需要代理和用户配合完成凭证同步。由于远程服务器没有浏览器,用户需要在其本地计算机上完成 OAuth 授权。
步骤 A - 向用户展示 OAuth 客户端配置(需要用户确认):
读取 ~/.mcporter/credentials.json 的内容(此时仅包含 OAuth 客户端参数,无令牌),展示给用户,并告知用户:
以下是 OAuth 客户端配置。请参考文档 https://meegle.com/b/helpcenter/product/5rifl7a7 在您的本地计算机上完成授权。授权完成后,请将生成的凭证文件提供给我。
步骤 B - 接收用户提供的已授权凭证(需要用户确认):
用户在本地完成 OAuth 后,将提供已授权的凭证文件。获得用户确认后,将其写入 ~/.mcporter/credentials.json。
写入操作完成后,立即清理操作过程中可能产生的所有中间临时文件。凭证内容仅存储在 ~/.mcporter/credentials.json 中,不得保存到任何其他位置。
3.4. 验证授权结果
尝试连接到 MCP 服务器,确认授权成功。
4. 后续使用
bash
npx @lark-project/meego-mcporter call meegle --config meegle-config.json
可用功能
- - 查询:待办事项、视图、工作项信息
- 操作:创建、修改和转移工作项