Feishu/Lark OpenAPI
About
Connect AI agents to Feishu/Lark APIs for automating tasks like document processing, conversation management, and calendar scheduling.
Details
- Author
- kaipany
- Categories
- Productivity, Other, Communication, API, Community
- Tags
- #document, #calendar
Jump to
Setup
Install Feishu/Lark OpenAPI in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/kaipany/Lar-OpenAI-MCP
Follow the installation instructions in the repository README, then restart your MCP client.
Developer Documentation Retrieval MCP|Official Document
⚠️ Beta Version Notice: This tool is currently in Beta stage. Features and APIs may change, so please stay updated with version releases.
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.
-
Complete Feishu/Lark API Toolkit:Encapsulates almost all Feishu/Lark API interfaces, including message management, group management, document operations, calendar events, Bitable, and other core functional areas.
- Supports App Access Token authentication
- Supports User Access Token authentication
- Supports standard input/output stream (stdio) mode, suitable for integration with AI tools like Trae/Cursor/Claude
- Supports Server-Sent Events (SSE) mode, providing HTTP-based interfaces
Supports multiple configuration methods, adapting to different usage scenarios
A complete list of all supported Feishu/Lark tools can be found intools.md, where tools are categorized by project and version with descriptions.
Before using the lark-mcp tool, you need to create a Feishu/Lark application:
- Visit theFeishu Open PlatformorLark Open Platformand log in
- Click "Console" and create a new application
- Obtain the App ID and App Secret, which will be used for API authentication
- Add the necessary permissions for your application based on your usage scenario
- If you need to call APIs as a user, set up OAuth 2.0 redirect URLs and obtain user access tokens
For detailed application creation and configuration guidelines, please refer to theFeishu Open Platform Documentation - Creating an Applicationor theLark Open Platform Documentation.
Before using the lark-mcp tool, you need to install the Node.js environment.
- Visit theNode.js website
- Download and install the LTS version
- After installation, verify in the terminal:
node -v npm -v
node -v npm -v
- Downloadnvm-windows
- Install nvm-windows
- Use nvm to install Node.js:
nvm install latest nvm use <version_number>
To integrate Feishu/Lark functionality in AI tools like Trae,Cursor or Claude, add the following to your configuration file:
{ "mcpServers": { "lark-mcp": { "command": "npx", "args": [ "-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "<your_app_id>", "-s", "<your_app_secret>" ] } } }
To access APIs with user identity, you can add a user access token:
{ "mcpServers": { "lark-mcp": { "command": "npx", "args": [ "-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "<your_app_id>", "-s", "<your_app_secret>", "-u", "<your_user_token>" ] } } }
By default, the MCP service enables common APIs. To enable other tools or only specific APIs or presets, you can specify them using the-tparameter (separated by commas):
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -t im.v1.message.create,im.v1.message.list,im.v1.chat.create,preset.calendar.default
The following table details each API tool and its inclusion in different preset collections, helping you choose the appropriate preset for your needs:
Note: In the table, "✓" indicates the tool is included in that preset. Using-t preset.xxxwill only enable tools marked with "✓" in the corresponding column.
Thelark-mcp mcptool provides various command line parameters for flexible MCP service configuration:
-
Basic Usage(using application identity):
lark-mcp mcp -a cli_xxxx -s yyyyy -u u-zzzz
Note: User access tokens can be obtained through theFeishu Open Platform's authorization processorLark Open Platform's authorization process, or you can use the API debugging console to obtain them. After using a user access token, API calls will be made with that user's identity.
lark-mcp mcp -a cli_xxxx -s yyyyy --token-mode user_access_token
Note: This option allows you to explicitly specify which token type to use when calling APIs. Theautomode (default) will be determined by the LLM when calling the API.
# Lark international version lark-mcp mcp -a <your_app_id> -s <your_app_secret> -d https://open.larksuite.com # Custom domain (KA domain) lark-mcp mcp -a <your_app_id> -s <your_app_secret> -d https://open.your-ka-domain.com
Enabling Only Specific API Tools or Other API Tools:
lark-mcp mcp -a cli_xxxx -s yyyyy -t im.v1.chat.create,im.v1.message.create
Note: The-tparameter supports the following preset tool collections:
- preset.light- Lightweight tool set with fewer but commonly used tools, suitable for scenarios that require reduced token usage
- preset.default- Default tool set containing all preset tools
- preset.im.default- Instant messaging related tools, such as group management, message sending, etc.
- preset.base.default- Base related tools, such as table creation, record management, etc.
- preset.base.batch- Base batch operation tools, including batch create and update record functions
- preset.doc.default- Document related tools, such as document content reading, permission management, etc.
- preset.task.default- Task management related tools, such as task creation, member management, etc.
- preset.calendar.default- Calendar event management tools, such as creating calendar events, querying free/busy status, etc.
Using SSE Mode with Specific Port and Host:
lark-mcp mcp -a cli_xxxx -s yyyyy -m sse --host 0.0.0.0 -p 3000
Note: Setting the language to Chinese (-l zh) may consume more tokens. If you encounter token limit issues when integrating with large language models, consider using the default English setting (-l en).
Setting Tool Name Format to Camel Case:
lark-mcp mcp -a cli_xxxx -s yyyyy -c camel
Note: By setting the tool name format, you can change how tool names appear in the MCP. For example,im.v1.message.createin different formats:
- snake format (default):im_v1_message_create
- camel format:imV1MessageCreate
- kebab format:im-v1-message-create
- dot format:im.v1.message.create
Using Environment Variables Instead of Command Line Parameters:
# Set environment variables export APP_ID=cli_xxxx export APP_SECRET=yyyyy # Start the service (no need to specify -a and -s parameters) lark-mcp mcp
Besides command line parameters, you can also use a JSON format configuration file to set parameters:
Configuration file example (config.json):
{ "appId": "cli_xxxx", "appSecret": "xxxx", "domain": "https://open.feishu.cn", "tools": ["im.v1.message.create","im.v1.chat.create"], "toolNameCase": "snake", "language": "zh", "userAccessToken": "", "tokenMode": "auto", "mode": "stdio", "host": "localhost", "port": "3000" }
Note: Command line parameters have higher priority than configuration file. When using both command line parameters and configuration file, command line parameters will override corresponding settings in the configuration file.
- stdio mode (Default/Recommended): Suitable for integration with AI tools like Trae/Cursor or Claude, communicating through standard input/output streams.
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m stdio
- SSE mode: Provides an HTTP interface based on Server-Sent Events, suitable for scenarios where local execution is not possible.
# Default listens only on localhost lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse -p 3000 # Listen on all network interfaces (allowing remote access) lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse --host 0.0.0.0 -p 3000
After startup, the SSE endpoint will be accessible athttp://<host>:<port>/sse.
-
Issue: Unable to connect to Feishu/Lark APISolution: Check your network connection and ensure your APP_ID and APP_SECRET are correct. Verify that you can access the Feishu/Lark Open Platform API; you may need to configure a proxy.
Issue: Error when using user_access_tokenSolution: Check if the token has expired. user_access_token usually has a validity period of 2 hours and needs to be refreshed periodically. You can implement an automatic token refresh mechanism.
Issue: Unable to call certain APIs after starting the MCP service, with insufficient permissions errorsSolution: Check if your application has obtained the corresponding API permissions. Some APIs require additional high-level permissions, which can be configured in theDeveloper ConsoleorLark Developer Console. Ensure that permissions have been approved.
Issue: Image or file upload/download related API calls failSolution: The current version does not support file and image upload/download functionality. These APIs will be supported in future versions.
Issue: Command line displays garbled characters in Windows environmentSolution: Change the command line encoding to UTF-8 by executingchcp 65001in the command prompt. If using PowerShell, you may need to change the terminal font or PowerShell configuration.
Issue: Permission errors during installationSolution: On macOS/Linux, usesudo npm install -g @larksuiteoapi/lark-mcpfor installation, or modify the permissions of the npm global installation path. Windows users can try running the command prompt as administrator.
Issue: Token limit exceeded after starting the MCP serviceSolution: Try using-tto reduce the number of enabled APIs, or use a model that supports larger tokens (such as claude3.7).
Issue: Unable to connect or receive messages in SSE modeSolution: Check if the port is already in use and try changing to a different port. Ensure that the client is correctly connected to the SSE endpoint and is handling the event stream.
- Feishu Open Platform
- Lark International Open Platform
- Feishu Open Platform API Documentation
- Lark Open Platform API Documentation
- Node.js Website
- npm Documentation
Issues are welcome to help improve this tool. If you have any questions or suggestions, please raise them in the GitHub repository.
Connects AI agents to the Feishu/Lark platform to automate document processing, conversation management, and calendar scheduling via its OpenAPI.
Connect AI agents to Feishu/Lark APIs for document processing, conversation management, and calendar scheduling.
Connects AI agents to the Feishu/Lark platform for automating tasks like document processing, conversation management, and calendar scheduling.
Connect AI agents with the Feishu/Lark platform for automation, including document processing, conversation management, and calendar scheduling.
Connect AI agents with the Feishu/Lark platform for automation, including document processing, conversation management, and calendar scheduling.
Connects AI agents to the Feishu/Lark platform via its OpenAPI to automate tasks like document processing, conversation management, and calendar scheduling.
Integrates with the Cal.com Calendar API for appointment scheduling.
Interact with the Coda API to manage documents and pages, including creating, reading, updating, and deleting.
Provides various DingTalk services including contacts, department management, robot messaging, calendar, and tasks.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





