Skip to content
Back to search

lark-openapi-mcp

飞书/Lark官方 OpenAPI MCP

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/larksuite--lark-openapi-mcp/badge.svg)](/listings/larksuite--lark-openapi-mcp)

HTML

<a href="/listings/larksuite--lark-openapi-mcp"><img src="/api/listings/larksuite--lark-openapi-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Before using the lark-mcp tool, you need to install the Node.js environment.

**Using the Official Installer (Recommended)**:

1. Visit the [Node.js website](https://nodejs.org/) 2. Download and install the LTS version 3. After installation, verify in the terminal:

node -v
npm -v

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 215 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Feishu/Lark OpenAPI MCP
  2. [![npm version](https://img.shields.io/npm/v/@larksuiteoapi/lark-mcp.svg)](https://www.npmjs.com/package/@larksuiteoapi/lark-mcp)
  3. [![npm downloads](https://img.shields.io/npm/dm/@larksuiteoapi/lark-mcp.svg)](https://www.npmjs.com/package/@larksuiteoapi/lark-mcp)
  4. [![Node.js Version](https://img.shields.io/node/v/@larksuiteoapi/lark-mcp.svg)](https://nodejs.org/)
  5. English | [中文](./README_ZH.md)
  6. [Developer Documentation Retrieval MCP](./docs/recall-mcp/README.md)
  7. [Official Document](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mcp_integration/mcp_introduction)
  8. [Trouble Shooting](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mcp_integration/use_cases)
  9. > **⚠️ Beta Version Notice**: This tool is currently in Beta stage. Features and APIs may change, so please stay updated with version releases.
  10. This is the Feishu/Lark official OpenAPI MCP (Model Context Protocol) tool designed to help users quickly connect to the Feishu/Lark platform and enable efficient collaboration between AI Agents and Feishu/Lark. The tool encapsulates Feishu/Lark Open Platform API interfaces as MCP tools, allowing AI assistants to directly call these interfaces and implement various automation scenarios such as document processing, conversation management, calendar scheduling, and more.
  11. ## Preparation
  12. ### Creating a Feishu/Lark Application
  13. Before using the lark-mcp tool, you need to create a Feishu/Lark application:
  14. 1. Visit the [Feishu Open Platform](https://open.feishu.cn/) or [Lark Open Platform](https://open.larksuite.com/) and log in
  15. 2. Click "Console" and create a new application
  16. 3. Obtain the App ID and App Secret, which will be used for API authentication
  17. 4. Add the necessary permissions for your application based on your usage scenario
  18. 5. If you need to call APIs as a user, set the OAuth 2.0 redirect URL to http://localhost:3000/callback
  19. For detailed application creation and configuration guidelines, please refer to the [Feishu Open Platform Documentation - Creating an Application](https://open.feishu.cn/document/home/introduction-to-custom-app-development/self-built-application-development-process#a0a7f6b0).
  20. ### Installing Node.js
  21. Before using the lark-mcp tool, you need to install the Node.js environment.
  22. **Using the Official Installer (Recommended)**:
  23. 1. Visit the [Node.js website](https://nodejs.org/)
  24. 2. Download and install the LTS version
  25. 3. After installation, verify in the terminal:
  26. ```bash
  27. node -v
  28. npm -v
  29. ```
  30. ## Quick Start
  31. ### Using with Trae/Cursor/Claude
  32. To integrate Feishu/Lark functionality in AI tools like Trae, Cursor or Claude, install using the button below.
  33. [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=lark-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsYXJrc3VpdGVvYXBpL2xhcmstbWNwIiwibWNwIiwiLWEiLCJ5b3VyX2FwcF9pZCIsIi1zIiwieW91cl9hcHBfc2VjcmV0Il19)
  34. [![Install MCP Server](./assets/trae-cn.svg)](trae-cn://trae.ai-ide/mcp-import?source=lark&type=stdio&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsYXJrc3VpdGVvYXBpL2xhcmstbWNwIiwibWNwIiwiLWEiLCJ5b3VyX2FwcF9pZCIsIi1zIiwieW91cl9hcHBfc2VjcmV0Il19) [![Install MCP Server](./assets/trae.svg)](trae://trae.ai-ide/mcp-import?source=lark&type=stdio&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsYXJrc3VpdGVvYXBpL2xhcmstbWNwIiwibWNwIiwiLWEiLCJ5b3VyX2FwcF9pZCIsIi1zIiwieW91cl9hcHBfc2VjcmV0Il19)
  35. or add the following to your configuration file:
  36. ```json
  37. {
  38. "mcpServers": {
  39. "lark-mcp": {
  40. "command": "npx",
  41. "args": [
  42. "-y",
  43. "@larksuiteoapi/lark-mcp",
  44. "mcp",
  45. "-a",
  46. "<your_app_id>",
  47. "-s",
  48. "<your_app_secret>"
  49. ]
  50. }
  51. }
  52. }
  53. ```
  54. If you need to access APIs with **user identity**, you need to login first using the login command in the terminal. Note that you need to configure the application's redirect URL in the developer console first, default is http://localhost:3000/callback
  55. ```bash
  56. # Login and get user access token
  57. npx -y @larksuiteoapi/lark-mcp login -a cli_xxxx -s yyyyy
  58. # Or optionally, login with specific OAuth scope - if not specified, all permissions will be authorized by default
  59. npx -y @larksuiteoapi/lark-mcp login -a cli_xxxx -s yyyyy --scope offline_access docx:document
  60. ```
  61. Then add the following to your configuration file:
  62. ```json
  63. {
  64. "mcpServers": {
  65. "lark-mcp": {
  66. "command": "npx",
  67. "args": [
  68. "-y",
  69. "@larksuiteoapi/lark-mcp",
  70. "mcp",
  71. "-a",
  72. "<your_app_id>",
  73. "-s",
  74. "<your_app_secret>",
  75. "--oauth",
  76. "--token-mode", "user_access_token"
  77. ]
  78. }
  79. }
  80. }
  81. ```
  82. Note: When enabling `--oauth`, it's recommended to explicitly set `--token-mode` to `user_access_token`, which means calling APIs with user access tokens, suitable for accessing user resources or scenarios requiring user authorization (such as reading personal documents, sending IM messages). If you keep the default `auto`, some APIs AI may fallback to `tenant_access_token`, which could result in insufficient permissions or inability to access user private data.
  83. ### Domain Configuration
  84. Based on your usage scenario, lark-mcp supports configuring different domain environments:
  85. **Feishu (China Version)**:
  86. - Default uses `https://open.feishu.cn` domain
  87. - Suitable for users in China
  88. **Lark (International Version)**:
  89. - Uses `https://open.larksuite.com` domain
  90. - Suitable for overseas users or international version of Lark
  91. To switch to the international version of Lark, add the `--domain` parameter in your configuration:
  92. ```json
  93. {
  94. "mcpServers": {
  95. "lark-mcp": {
  96. "command": "npx",
  97. "args": [
  98. "-y",
  99. "@larksuiteoapi/lark-mcp",
  100. "mcp",
  101. "-a",
  102. "<your_app_id>",
  103. "-s",
  104. "<your_app_secret>",
  105. "--domain",
  106. "https://open.larksuite.com"
  107. ]
  108. }
  109. }
  110. }
  111. ```
  112. > **💡 Tip**: Ensure your application is created in the corresponding domain environment's open platform. International version applications cannot be used with Feishu China version, and vice versa.
  113. ## Custom API Configuration
  114. > ⚠️ **File Upload/Download**: File upload and download operations are not yet supported
  115. > ⚠️ **Document Editing**: Direct editing of Feishu cloud documents is not supported (only importing and reading are available)
  116. By default, the MCP service enables common APIs. To enable other tools or only specific APIs or presets, you can specify them using the `-t` parameter in the MCP Client configuration (JSON):
  117. ```json
  118. {
  119. "mcpServers": {
  120. "lark-mcp": {
  121. "command": "npx",
  122. "args": [
  123. "-y",
  124. "@larksuiteoapi/lark-mcp",
  125. "mcp",
  126. "-a", "<your_app_id>",
  127. "-s", "<your_app_secret>",
  128. "-t", "im.v1.message.create,im.v1.message.list,im.v1.chat.create,preset.calendar.default"
  129. ]
  130. }
  131. }
  132. }
  133. ```
  134. For detailed information about all preset tool collections and which tools are included in each preset, please refer to the [Preset Tool Collections Reference](./docs/reference/tool-presets/presets.md).
  135. A complete list of all supported Feishu/Lark tools can be found in [tools.md](./docs/reference/tool-presets/tools-en.md).
  136. > **⚠️ Notice**:Non-preset APIs have not undergone compatibility testing, and the AI may not perform optimally during the process of understanding and using them.
  137. ### Development Integration
  138. Developers can refer to the minimal example for integrating with Agent: [`lark-samples/mcp_quick_demo`](https://github.com/larksuite/lark-samples/tree/main/mcp_quick_demo).
  139. You can also refer to the Lark bot integration example: [`lark-samples/mcp_larkbot_demo/nodejs`](https://github.com/larksuite/lark-samples/tree/main/mcp_larkbot_demo/nodejs).
  140. This example demonstrates how to integrate MCP capabilities into Feishu/Lark bots, triggering tool calls and message sending through bot conversations, suitable for scenarios that integrate existing tools into Bot.
  141. ### Advanced Configuration
  142. For detailed configuration options and deployment scenarios, please refer to our [Configuration Guide](./docs/usage/configuration/configuration.md).
  143. For detailed information about all available command line parameters and their usage, please refer to the [Command Line Reference](./docs/reference/cli/cli.md).
  144. ## FAQ
  145. - [FAQ (Frequently Asked Questions)](./docs/troubleshooting/faq.md)
  146. - [Common Issues and Use Cases](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mcp_integration/use_cases)
  147. ## Related Links
  148. - [Feishu Open Platform](https://open.feishu.cn/)
  149. - [Development Documentation: OpenAPI MCP](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mcp_integration/mcp_introduction)
  150. - [Lark International Open Platform](https://open.larksuite.com/)
  151. - [Feishu Open Platform API Documentation](https://open.feishu.cn/document/home/index)
  152. - [Node.js Website](https://nodejs.org/)
  153. - [npm Documentation](https://docs.npmjs.com/)
  154. ## Feedback
  155. Issues are welcome to help improve this tool. If you have any questions or suggestions, please raise them in the GitHub repository.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.