83 lines
2.5 KiB
Markdown
83 lines
2.5 KiB
Markdown
# lark-mcp MCP Server Setup
|
|
|
|
## Overview
|
|
|
|
The [lark-mcp](https://github.com/whatevertogo/FeiShuSkill) package wraps the official Feishu/Lark MCP server
|
|
(`@larksuiteoapi/lark-mcp`), exposing 19 tools for bitable, IM, document search, and wiki operations.
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
hermes mcp add lark-mcp \
|
|
--command npx \
|
|
--args -y --args @larksuiteoapi/lark-mcp --args mcp \
|
|
--args -a --args <FEISHU_APP_ID> \
|
|
--args -s --args <FEISHU_APP_SECRET>
|
|
```
|
|
|
|
## Common Pitfall: `hermes mcp add` produces malformed config
|
|
|
|
**Symptom**: After adding via CLI, `hermes mcp test lark-mcp` fails with "Connection closed".
|
|
|
|
**Root cause**: `hermes mcp add` may include the literal string `--args` as a positional argument
|
|
in the config's `args` list, producing:
|
|
```yaml
|
|
args:
|
|
- -y
|
|
- --args # ← should NOT be here
|
|
- '@larksuiteoapi/lark-mcp'
|
|
- --args # ← should NOT be here
|
|
- mcp
|
|
```
|
|
|
|
**Fix**: Manually edit `~/.hermes/config.yaml` under `mcp_servers.lark-mcp`:
|
|
```yaml
|
|
lark-mcp:
|
|
command: npx
|
|
args:
|
|
- -y
|
|
- '@larksuiteoapi/lark-mcp'
|
|
- mcp
|
|
- -a
|
|
- cli_xxxxxxxxxx
|
|
- -s
|
|
- your_secret_here
|
|
enabled: true
|
|
```
|
|
|
|
The `--args` tokens must NOT appear in the final config — only the actual argument values.
|
|
|
|
## Enabling after fix
|
|
|
|
After correcting the config, the MCP tools load on next session start. To load immediately:
|
|
- Hermes CLI: `/reload-mcp` then `/reset`
|
|
- Or restart Hermes
|
|
|
|
## Available Tools (19 total)
|
|
|
|
| Category | Tools |
|
|
|----------|-------|
|
|
| Bitable | `bitable_v1_app_create`, `bitable_v1_appTable_create/list`, `bitable_v1_appTableField_list`, `bitable_v1_appTableRecord_create/search/update` |
|
|
| IM | `im_v1_message_create/list`, `im_v1_chat_create/list`, `im_v1_chatMembers_get` |
|
|
| Document | `docx_builtin_search`, `docx_v1_document_rawContent`, `docx_builtin_import` |
|
|
| Wiki | `wiki_v1_node_search`, `wiki_v2_space_getNode` |
|
|
| Drive | `drive_v1_permissionMember_create` |
|
|
| Contact | `contact_v3_user_batchGetId` |
|
|
|
|
## Tool Naming Convention
|
|
|
|
When calling from Hermes: `mcp__lark-mcp__tool_name` (double underscore between server and tool).
|
|
|
|
## Required Permissions
|
|
|
|
The Feishu app needs these permissions in the developer console:
|
|
|
|
| Permission | Required for |
|
|
|------------|-------------|
|
|
| `im:message` | Send/receive messages |
|
|
| `im:chat` | Create groups, list members |
|
|
| `bitable:app` | Multi-dimensional table operations |
|
|
| `docx:document` | Read document content |
|
|
| `drive:drive` | Search documents, import files |
|
|
| `wiki:wiki` | Knowledge base operations |
|