Content
# Tool List
[](https://pypi.org/project/lark-mcp-bridge/)
[](https://pypi.org/project/lark-mcp-bridge/)
[](LICENSE)
Wrap [lark-cli](https://github.com/larksuite/cli) as a [MCP](https://modelcontextprotocol.io/) Server to enable AI assistants to operate Lark.
Supports Lark (China version) and Lark (International version), depending on lark-cli configuration. Currently verified only in Lark environment.
## Why Choose lark-mcp-bridge
## Features
- **Zero Developer Threshold** — No need to create a Lark open platform application, no App ID/Secret, and no manual permission configuration. `lark-cli auth login` login once and use, with the same permissions as the web version of Lark
- **Full Domain Coverage** — Not just documents, but also messages, calendars, multi-dimensional tables, spreadsheets, emails, tasks, cloud spaces, knowledge bases, meetings, and more, with 14 domains and 219 APIs available
- **Agent Autonomous Exploration** — Agents can dynamically discover operations in any domain through `lark.discover`, with complete JSON Schema (parameter name, type, enumeration, required) for each operation, eliminating the need for Agents to guess parameters
- **Security and Control** — Whitelist strategy + risk grading + destructive operation confirmation + audit logs
- **Structured Error Handling** — Categorized error codes (authentication expired, rate limiting, insufficient permissions…) + Chinese recovery suggestions, enabling Agents to autonomously repair issues
- **Context-Friendly** — Gradual exposure, schema loaded on demand, without loading a large number of tool definitions at once, occupying Agent context window (tested to save 95% token)
- **Standard MCP Protocol** — Compatible with any MCP client (Amazon Quick, Claude Desktop, Cursor, opencode, etc.)
## Background
AI work assistants (such as Amazon Quick, Claude Desktop, Anthropic Coworker) cannot directly execute shell commands or call external APIs due to security design. They extend capabilities through the MCP protocol — MCP is the only channel for such assistants to connect to external services. This project enables such assistants to operate Lark.
For coding tools with terminal permissions (Claude Code, Cursor, etc.), they can also obtain structured Lark operation capabilities through MCP, without needing to parse CLI output themselves.
## Prerequisites
- Python 3.12+
- [lark-cli](https://github.com/larksuite/cli) installed and logged in (`lark-cli auth login`)
## Installation
```bash
pip install lark-mcp-bridge
```
Or in development mode:
```bash
git clone https://github.com/Oliclee/lark-mcp-bridge.git
cd lark-mcp-bridge
pip install -e ".[dev]"
```
## Usage
### MCP Client Configuration
After configuration, the Agent will automatically start the server, without needing manual operation.
**Recommended configuration (available after pip install):**
```json
{
"mcpServers": {
"lark": {
"command": "lark-mcp-bridge"
}
}
}
```
**Or using Python module:**
```json
{
"mcpServers": {
"lark": {
"command": "python",
"args": ["-m", "lark_mcp_bridge.server"]
}
}
}
```
Client configuration locations:
- **Amazon Quick Desktop**: Settings → Capabilities → MCP → Add Local
- **Claude Code / Claude Desktop**: `~/.claude/mcp.json`
- **Cursor**: Settings → MCP Servers → Add (type: command)
- **opencode**: `opencode.json`
- **Codex**: `~/.codex/config.toml`
Codex uses TOML format:
```toml
[mcp_servers.lark]
command = "python"
args = ["-m", "lark_mcp_bridge.server"]
```
## Working Principle
```
AI Client ⇄ MCP (stdio) ⇄ lark-mcp-bridge ⇄ lark-cli ⇄ Lark API
```
The bridge does not directly call the Lark HTTP API. Authentication and token management are handled by lark-cli, ensuring your credentials do not pass through third parties.
### Built-in Tools
The following tools are available out-of-the-box, callable directly by Agents:
| Tool | Function | Example Instruction |
|------|----------|----------------------|
| `lark.im.messages-send` | Send Message | "Send a message to Zhang San to explain the meeting tomorrow" |
| `lark.calendar.agenda` | View Schedule | "Check my schedule for today" |
| `lark.calendar.schedule-meeting` | Schedule Meeting | "Help me schedule a meeting with Xiao Ming at 3 PM tomorrow" |
| `lark.base.record-search` | Search Multi-dimensional Table | "Search for records with status 'in progress' in the project table" |
| `lark.docs.fetch` | Read Document | "Read the content of this document: https://feishu.cn/docx/xxx" |
| `lark.contact.search-user` | Search Contact | "Help me find Alice's Lark account" |
| `lark.sheets.read` | Read Spreadsheet | "Read data from cells A1:D10 in this spreadsheet" |
| `lark.sheets.write` | Write Spreadsheet | "Write these data into cell A1 of the spreadsheet" |
| `lark.task.list` | View Task List | "Check my unfinished tasks" |
| `lark.task.create` | Create Task | "Create a task: complete the report by next Friday" |
| `lark.mail.send` | Send Email | "Send an email to alice@company.com about project progress" |
| `lark.mail.list` | View Email List | "Check emails received today" |
| `lark.drive.upload` | Upload File | "Upload report.pdf to cloud space" |
| `lark.drive.download` | Download File | "Download this file to local" |
| `lark.wiki.search` | Search Knowledge Base | "Search for API design specifications in the knowledge base" |
| `lark.wiki.get-node` | Get Knowledge Base Node | "Get the content of this knowledge base page" |
| `lark.vc.search` | Search Meeting Records | "Find the product review meeting last week" |
| `lark.vc.notes` | Get Meeting Notes | "Get notes from this meeting" |
| `lark.minutes.search` | Search Minutes | "Search for meeting recordings containing 'budget'" |
### Dynamic Discovery: Agent Autonomous Exploration, No Guessing
The 19 tools listed above are high-frequency selections. However, Lark has 14 domains and 219 APIs — Agents do not need to remember them all and do not need to guess parameters.
Agents can call `lark.discover(domain="mail")` to get a complete definition of all operations under that domain (parameter name, type, required, example value). This means:
- **Not limited to fixed tool lists** — Even if an operation does not have a built-in shortcut, Agents can find and use it through discovery
- **No need to guess parameters** — Each operation has a complete JSON Schema definition
- **No need to wait for version updates** — New commands added by lark-cli are automatically discoverable
```
User: "Help me check OKR progress"
Agent: → lark.discover(domain="okr") → Discover 23 available operations → Choose the appropriate one to call
```
## Development
```bash
pip install -e ".[dev]"
pytest
```
See detailed design documents in [docs/INDEX.md](docs/INDEX.md).
## Disclaimer
This project is a community open-source project, not officially affiliated with Lark or ByteDance. "Lark" and "Feishu" are registered trademarks of ByteDance.
**Regarding Security Protection**: This project has built-in whitelist strategy, risk grading, and destructive operation confirmation mechanisms to prevent misuse. However, AI assistant behavior is driven by model reasoning and cannot guarantee 100% compliance with user expectations. Users should:
- Monitor write, modify, and delete operations executed by AI assistants
- Verify in a test environment before using in important environments
- Understand that this tool executes operations as the user's identity, with consequences equivalent to the user's actions
By using this tool, you understand and accept that the project authors are not responsible for any data loss, misuse, or other damages caused. Please comply with [Lark Open Platform Terms of Service](https://open.feishu.cn/document/common-capabilities/terms-of-service).
## License
MIT