meegle-cli-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meegle-cli-mcp show my todo work items this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
meegle-cli-mcp
文档说明与引用
本 README 同时参考以下来源进行整理与校验:
用户提供的《Meegle MCP 功能验证测试报告》(测试时间:2026-07-25 11:25 ~ 11:33 CST,项目:产研工作空间-测试,project_key: 69afc3cc1f11d2763e9711bf)
官方文档:https://github.com/larksuite/meegle-cli/blob/main/README.zh-CN.md
其中,工具能力边界、流程建议与排障提示以本仓库实现为准;安装与配置细节补充参考官方文档。
一个基于本地 meegle CLI 的 stdio MCP server,面向 VS Code / Copilot 等 MCP 客户端使用。
它遵循两条原则:
不处理登录,只复用本机已经可用的
meegle认证状态不假设默认项目,多项目场景统一先走
project_search
Related MCP server: Taskade MCP Server
快速开始
前提:
本机已安装并可执行
meegle本机
meegle auth status已通过Node.js 18+
Meegle CLI 安装与配置(来自官方 README)
官方来源:
1) 安装(交互式)
前置条件:
Node.js >= 16(含 npm / npx)
运行安装向导(会安装或升级 CLI、配置 host,并引导登录):
npx @lark-project/meegle@latest install2) 安装(AI Agent / CI / 无头环境)
在无浏览器或无 TTY 场景,建议启用 Device Code:
npx -y @lark-project/meegle@latest install --host <host> --device-code --lang zh<host> 示例:
project.feishu.cnmeegle.com自建租户域名
安装后建议先验证:
meegle auth status3) 认证常用命令
meegle auth login
meegle auth login --device-code
meegle auth status
meegle auth logout4) 配置常用命令
meegle config init
meegle config show
meegle config set host project.feishu.cn
meegle config get host配置文件位置:
~/.meegle/config.json
5) 多环境 Profile
meegle config profile create staging
meegle config profile list
meegle config profile use staging
meegle config profile current
meegle config profile delete staging临时指定 profile 运行:
meegle mywork todo --action this_week --page-num 1 --profile staging6) 沙盒 / CI 环境变量注入
export MEEGLE_HOST=project.feishu.cn
export MEEGLE_USER_ACCESS_TOKEN=<your-user-token>
export MEEGLE_USER_AGENT=ci-runner可选:自定义 token header(覆盖默认 Authorization)
export MEEGLE_ACCESS_TOKEN_HEADER=x-meegle-auth说明:
设置
MEEGLE_USER_ACCESS_TOKEN后,CLI 会优先使用环境变量 token。可在
config.json使用${VAR}模板引用环境变量(仅整串占位符会展开)。
安装依赖:
npm install启动 server:
npm start本地检查:
npm run check
npm run smoke:testVS Code 配置
如果你在 VS Code / Copilot MCP 配置里接入,通常可以直接使用:
{
"servers": {
"meegle-cli": {
"type": "stdio",
"command": "node",
"args": ["/Users/betty/meegle-cli-mcp/src/server.mjs"]
}
}
}通用 mcpServers 写法也可用:
{
"mcpServers": {
"meegle-cli": {
"command": "node",
"args": ["/Users/betty/meegle-cli-mcp/src/server.mjs"]
}
}
}如果你现在是在 AWS Q 或其他使用 mcpServers 结构的客户端里接入,也可以直接按下面这种方式配置:
{
"mcpServers": {
"meegle-cli": {
"command": "node",
"args": ["/absolute/path/to/meegle-cli-mcp/src/server.mjs"]
}
}
}如果你之前已经有类似这样的配置:
{
"mcpServers": {
"lark": {
"command": "node",
"args": ["/absolute/path/to/lark-cli-mcp/server.mjs"]
}
}
}那么新增 meegle-cli 时,只需要并列加一个 server:
{
"mcpServers": {
"lark": {
"command": "node",
"args": ["/absolute/path/to/lark-cli-mcp/server.mjs"]
},
"meegle-cli": {
"command": "node",
"args": ["/absolute/path/to/meegle-cli-mcp/src/server.mjs"]
}
}
}Claude Desktop / Cursor 一般也可复用同一套 stdio 配置。
多项目原则
这套 server 明确按多项目场景设计:
不依赖
MEEGLE_DEFAULT_PROJECT_KEY没有明确项目时,先调用
project_search有多个候选项目时,先确认项目,再继续项目级工具
后续项目级工具尽量显式传
project_key
推荐顺序:
project_searchworkitem_meta_types/view_search/team_list等项目内解析工具具体业务 tool
VS Code 使用建议
对模型最关键的信息来自三层:
tool 的
descriptiontool 的
inputSchematool 的
annotations
当前 server 已补齐这些元数据。模型在 tools/list 后,应该能知道:
哪些 tool 是只读查询
哪些 tool 有副作用
哪些写操作默认要先
dry_run=true多项目场景应先用
project_search
Tool 标签约定
readOnlyHint=true:纯查询工具destructiveHint=true:可能写数据或触发动作idempotentHint=true:适合探测或重试openWorldHint=true:会访问外部 Meegle 系统
Tool 索引
认证与发现
auth_status:检查本地meegle登录态project_search:多项目第一入口,解析项目或列最近项目inspect_command:查看底层 meegle CLI 命令 schemameegle_command:原始 argv 透传兜底工具
工作项查询
workitem_meta_types:查询项目支持的工作项类型workitem_meta_fields:查询字段 key、字段类型和选项workitem_discover_status_values:采样某类工作项里实际出现过的状态 key 和显示标签,避免猜OPEN、IN_PROGRESSworkitem_query:项目级列表 / 搜索入口,要求完整 MQLworkitem_query:项目级列表 / 搜索入口,要求完整 MQL;状态或枚举过滤要用项目实际显示值,不要假设OPEN、IN_PROGRESSworkitem_get:查询单个工作项详情workitem_batch_get:批量查询多个工作项
工作项写操作
workitem_create:创建工作项,默认dry_run=trueworkitem_update:更新字段或角色,默认dry_run=true
评论与附件
comment_list:查询评论comment_add:新增评论,默认dry_run=trueattachment_prepare_download:下载前预处理attachment_prepare_upload:上传前预处理
关系、视图、图表
relation_meta_definitions:查询关系定义relation_list:查询关联工作项view_search:按名称解析view_idview_get:查询视图下工作项chart_list:查询视图下图表chart_get:查询单个图表详情
团队、用户、工时
user_resolve_keys:把姓名 / 邮箱 / 别名解析为规范 user_keyuser_search:查询用户明细(底层透传)team_list:查询团队team_list_members:查询团队成员workhour_list_schedule:查询排期与工作量
我的工作台与流程
mywork_todo:查询我的待办、已办、逾期、本周任务workflow_get_node:查询节点详情和子任务上下文workflow_list_state_transitions:查询可流转状态workflow_smart_transition:自动识别节点流 / 状态流并执行对应流转(默认dry_run=true)workflow_transition:节点流流转,默认dry_run=trueworkflow_transition_state:状态流流转,默认dry_run=truesubtask_update:子任务创建 / 更新 / 完成 / 回滚,默认dry_run=true;若项目未开启资源库会返回专用 hint
Prompt 模板
除了 tool,这个 server 还暴露了一组 prompt 模板,给模型提供稳定的工作流模板:
resolve_project_context:多项目场景第一入口query_project_workitems:查需求 / 缺陷 / 任务safe_workitem_update:安全更新工作项inspect_view_and_chart:查视图和图表personal_work_queue:查个人待办和追踪详情workflow_and_subtask_action:处理工作流和子任务
这些 prompt 不替代 tool,而是告诉模型“应该先做什么,再做什么”。
常用调用范式
先解析项目
用户只说“帮我看产研工作空间”:先
project_search没有任何项目线索:空参调用
project_search多个候选项目都像目标:先确认项目,再继续
查工作项
按状态筛选前先探测:
workitem_discover_status_values->workitem_query查某个空间里有什么需求:
project_search->workitem_meta_types->workitem_query按标题模糊找工作项:
workitem_query->workitem_get更新前查字段 schema:
workitem_meta_fields->workitem_update按状态筛选工作项:优先使用项目里的状态显示值;不要直接猜
OPEN、IN_PROGRESS这类英文常量
查视图 / 图表
先按名字找视图:
view_search再查视图内容:
view_get再查图表:
chart_list->chart_get
查节点 / 子任务 / 状态流
先查节点:
workflow_get_node查可流转状态:
workflow_list_state_transitions首选自动流转:
workflow_smart_transition节点流或状态流写操作:先
dry_run=true,确认后再dry_run=false
workflow_smart_transition 关键参数:
mode=auto:自动判定节点流 / 状态流work_item_type:状态流且未提供transition_id时必填target_status_label:按目标状态名匹配 transitionauto_pick_first_transition=true:当状态流有多条候选、且没给transition_id/target_status_label时,自动选第一条
查人 / 团队 / 排期
先解析用户:
user_resolve_keys先解析团队:
team_list再查成员或排期:
team_list_members/workhour_list_schedule
推荐用户字段写入链路:
user_resolve_keys拿到resolved_user_keys把
resolved_user_keys写入workitem_create/workitem_update/subtask_update相关用户字段
参数约定
项目参数
多项目场景建议显式传
project_key项目不明确时不要猜,先调用
project_search
写操作参数
workitem_createworkitem_updatecomment_addworkflow_transitionworkflow_transition_statesubtask_update
这些默认都应先保持 dry_run=true。
复杂字段值
对 workitem_create / workitem_update / subtask_update 等工具:
数组和对象值可以直接传给 MCP tool
server 会自动转成 meegle CLI 需要的 JSON 字符串
MQL 状态与枚举值
workitem_query里的状态、枚举、下拉选项值通常是项目自己的显示值不要假设所有项目都支持
OPEN、IN_PROGRESS、DONE这种英文常量字符串值优先使用单引号,例如
'新建'当状态过滤失败时,优先判断是不是“值不属于这个项目的实际标签”,而不是 tool 本身坏了
本地联调
npm run smoke:test 会自动完成:
tools/listtools/call -> project_searchprompts/listtools/call -> auth_statustools/call -> workitem_meta_types,但只在先拿到项目后再调用tools/call -> workitem_discover_status_valuesprompts/get -> safe_workitem_update
如果你只想确认 server 能否被正常加载:
npm run check排障
工具调用失败
先调
auth_status再看是否缺少
project_key多项目场景先回到
project_search
写操作不生效
检查是否还在
dry_run=true检查字段 key 是否来自
workitem_meta_fields
项目选错
不要依赖历史上下文猜项目
重新调用
project_search必要时让用户确认候选项目
说明
这个 server 不处理登录流程,只复用当前 shell 环境里已经可用的
meegle认证状态所有命令都通过
spawn('meegle', args)调用,不经过 shell工具默认追加
--format json,便于 MCP 客户端消费结构化输出
Available Tools
34 toolsattachment_prepare_downloadPrepare Attachment DownloadARead-onlyIdempotent
Preprocess an attachment download and return the signed URL plan. Use this when you already have a file_url from workitem_get or comment_list and need the backend-generated download plan.
Inputs: file_url (required), project_key, work_item_id.
attachment_prepare_uploadPrepare Attachment UploadARead-onlyIdempotent
Preprocess an attachment upload and return the signed upload plan. Use this when a caller wants to manage the upload bytes outside meegle CLI but still needs backend-generated signed upload metadata.
Inputs: size, field_key, file_name, mime_type, +4 more.
auth_statusMeegle Auth StatusARead-onlyIdempotent
Check whether the local meegle CLI is already authenticated. Call this first when any business tool unexpectedly fails, or when you need to confirm the server can reuse the user's local login state.
Inputs: no named parameters.
chart_getGet ChartARead-onlyIdempotent
Get chart details by chart ID. Use this after resolving chart_id from chart_list.
Inputs: chart_id (required), project_key.
chart_listList ChartsARead-onlyIdempotent
List charts under a view. Use this after resolving a view_id through view_search or direct user input.
Inputs: view_id (required), page_num, page_size, project_key.
comment_addAdd CommentADestructive
Add a comment to a work item. Use file_token only when an attachment was uploaded separately. This tool defaults to dry_run=true for safety.
Inputs: content (required), work_item_id (required), dry_run, file_token, +1 more.
comment_listList CommentsBRead-onlyIdempotent
List comments on a work item. Use optional start_time and end_time to narrow the time window.
Inputs: work_item_id (required), end_time, page_num, start_time, +1 more.
inspect_commandInspect CLI CommandARead-onlyIdempotent
Inspect the latest meegle CLI command schema.
Inputs: command.
meegle_commandRun Raw Meegle CommandADestructive
Run a raw meegle CLI command as an argv array. Uses spawn without a shell.
Inputs: args (required).
mywork_todoList My Work ItemsARead-onlyIdempotent
List the current user's Meegle to-dos or completed items. Use this for personal work queues instead of project-wide query logic.
Inputs: action (required), page_num, asset_key.
project_searchSearch ProjectsARead-onlyIdempotent
Search Meegle projects by keyword, project key, simple name, or exact project name. In multi-project scenarios this is the primary entry tool: call it first when project context is missing, ambiguous, or expressed only as a human name, then pass the resolved project_key into later project-scoped tools.
Inputs: page_num, project_key.
relation_listList Related Work ItemsARead-onlyIdempotent
List work items linked by a relation field. Call relation_meta_definitions first when relation_id or relation_field_key is unknown.
Inputs: work_item_id (required), node_id, page_num, page_size, +3 more.
relation_meta_definitionsList Relation DefinitionsARead-onlyIdempotent
List relation definitions in a project. Use this before relation_list when you need to discover relation IDs or relation field keys.
Inputs: project_key, work_item_type, relation_work_item_type.
subtask_updateUpdate SubtaskADestructive
Create, update, confirm, or rollback a subtask. Use workflow_get_node first when node_id or existing subtask context is unknown. This tool defaults to dry_run=true for safety.
Inputs: node_id (required), action, fields, dry_run, +7 more.
team_listList TeamsARead-onlyIdempotent
List teams in a project. Use this before team_list_members when only a team name is known.
Inputs: query, page_token, project_key.
team_list_membersList Team MembersARead-onlyIdempotent
List members of a team by team ID. Call team_list first when you need to resolve the team_id from a team name.
Inputs: team_id (required), query, page_token, project_key.
user_resolve_keysResolve User KeysARead-onlyIdempotent
Resolve names/emails/aliases into canonical user_key values, so write tools can safely fill user fields and role assignments.
Inputs: identifiers (required), project_key, need_all_status.
user_searchSearch UsersARead-onlyIdempotent
Resolve user identifiers (user_key, email, or display name) into Meegle user records. For normalized mapping output, use user_resolve_keys.
Inputs: user_keys (required), project_key, need_all_status.
view_getGet View Work ItemsARead-onlyIdempotent
List work items under a view by view ID. Use view_search first when you only know the view name.
Inputs: view_id (required), fields, page_num, project_key.
view_searchSearch ViewsARead-onlyIdempotent
Search views by title and resolve view IDs. Use this before view_get or chart_list when the user only knows a view name.
Inputs: key_word (required), view_scope (required), project_key.
workflow_get_nodeGet Workflow NodesARead-onlyIdempotent
Get workflow node details for a work item. Use this before workflow_transition or subtask_update when node IDs or node-specific fields are unknown.
Inputs: work_item_id (required), page_num, project_key, node_id_list, +2 more.
workflow_list_state_transitionsList State TransitionsCRead-onlyIdempotent
List available state transitions for a work item.
Inputs: user_key (required), work_item_id (required), work_item_type (required), project_key.
workflow_smart_transitionSmart Workflow TransitionADestructive
Automatically detect node-driven vs status-driven workflow and execute the correct transition command. In auto mode it probes workflow_get_node first, then falls back to list-state-transitions when needed.
Inputs: work_item_id (required), mode, dry_run, node_id, +9 more.
workflow_transitionTransition Workflow NodeBDestructive
Transition or rollback a workflow node. Defaults to dry-run for safety.
Inputs: work_item_id (required), action, dry_run, node_id, +3 more.
workflow_transition_stateTransition Workflow StateBDestructive
Transition a state-flow status. Defaults to dry-run for safety.
Inputs: work_item_id (required), transition_id (required), dry_run, project_key.
workhour_list_scheduleList Work SchedulesARead-onlyIdempotent
List schedule and workload details for up to 20 users within a 3-month span. Use user_resolve_keys first when you need to resolve names or emails into canonical user_key values.
Inputs: end_time (required), user_keys (required), start_time (required), project_key, +1 more.
workitem_batch_getBatch Get Work ItemsARead-onlyIdempotent
Get multiple work items by ID in one request fan-out. Use this when you already have a set of work_item_ids and need multiple detail reads with one tool call.
Inputs: work_item_ids (required), fields, project_key.
workitem_createCreate Work ItemADestructive
Create a work item in Meegle. Use workitem_meta_fields first to discover valid field_key values. Complex array or object field values are automatically JSON-stringified to match meegle CLI expectations. This tool defaults to dry_run=true for safety.
Inputs: fields (required), work_item_type (required), dry_run, project_key, +3 more.
workitem_discover_status_valuesDiscover Work Item Status ValuesARead-onlyIdempotent
Sample actual status values for a work item type and return both backend keys and display labels. Use this before filtering workitem_query by status so the model does not guess generic constants like OPEN or IN_PROGRESS.
Inputs: project_key (required), work_item_type (required), sample_limit.
workitem_getGet Work ItemARead-onlyIdempotent
Get a single work item by ID or name. Use this for detail reads after resolving a work_item_id from workitem_query or workitem_batch_get. Defaults to the configured test project.
Inputs: no named parameters.
workitem_meta_fieldsList Work Item FieldsARead-onlyIdempotent
List field configuration for a work item type in a project. Use this before workitem_create or workitem_update to discover valid field_key values, field types, and options.
Inputs: work_item_type (required), page_num, field_keys, field_query, +1 more.
workitem_meta_typesList Work Item TypesARead-onlyIdempotent
List available work item types in a project. Use this before querying, creating, or filtering work items when the type key is unknown. Defaults to the configured test project.
Inputs: project_key.
workitem_queryQuery Work ItemsARead-onlyIdempotent
Run an MQL query against a project. Use this for listing or searching work items across a project. The mql argument must be a complete SQL-like MQL string, not just filters or fragments. For select or status filters, use the project actual display labels or configured values instead of assuming generic English constants like OPEN or IN_PROGRESS.
Inputs: mql (required), session_id, project_key, auto_paginate, +1 more.
workitem_updateUpdate Work ItemADestructive
Update work item fields or role operations. Use workitem_meta_fields or role metadata first when field keys or role keys are unknown. Arrays and objects in field_value are automatically stringified for meegle CLI compatibility. This tool defaults to dry_run=true for safety.
Inputs: work_item_id (required), fields, dry_run, project_key, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Several tool clusters overlap, particularly the workflow transition tools (workflow_transition, workflow_transition_state, workflow_smart_transition) and the user resolution tools (user_search, user_resolve_keys). Descriptions help clarify when to use each, but the overlaps still create ambiguity for agents.
Most tools follow a noun_verb pattern (workitem_get, comment_add), but there are notable exceptions like inspect_command, auth_status, mywork_todo, and the meta_* tools. The mixed conventions reduce predictability.
34 tools is excessive for the domain, especially with multiple redundant workflow transition tools and meta/raw command tools. The high count makes it difficult for agents to navigate and choose the correct tool.
The toolset covers a broad range of operations including CRUD for work items, comments, and workflows, but lacks delete operations for work items and comments, and has no relation creation or comment update. Core workflows are mostly covered, but significant gaps exist.
Maintenance
Related MCP Connectors
Share one project context across ChatGPT, Claude, Telegram and any MCP client.
Project management shared by people and AI agents, with persistent project state through MCP.
Unofficial community ClickUp MCP via personal API token. Not affiliated with ClickUp.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConnects Azure DevOps work items to Claude Code via MCP, enabling fetching, listing, updating tickets and automating PR creation.-
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude, Cursor, VS Code, and Windsurf to manage workspaces, projects, tasks, and AI agents through natural language, with a hosted OAuth server or a local stdio package. Also supports generating MCP tools from any OpenAPI spec.2,105 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude, Cursor, VS Code, Windsurf, and other MCP clients to manage workspaces, projects, tasks, and AI agents through natural language, using a hosted OAuth server or local stdio package.2,105 npmMIT
- AlicenseNot gradedqualityAmaintenanceConnects a workspace and project management platform to Claude, Cursor, VS Code, Windsurf, and other MCP clients, letting users list workspaces, create and manage projects and tasks, and build, train, and prompt AI agents. Also generates MCP tools from any OpenAPI spec.2,105 npmMIT