The Feishu/Lark OpenAPI MCP server allows you to quickly connect AI agents to the Feishu/Lark platform, enabling them to access and manipulate data through Feishu/Lark APIs. This tool encapsulates various Feishu/Lark features including messaging, document operations, calendar management, and more.
Before using lark-mcp, you'll need to:
# Using Homebrew
brew install node
# Verify installation
node -v
npm -v
Download and install from Node.js website or use nvm-windows:
# After installing nvm-windows
nvm install latest
nvm use <version_number>
Install the lark-mcp tool globally:
npm install -g @larksuiteoapi/lark-mcp
Add this to your AI tool configuration file:
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>"
]
}
}
}
To use with user identity:
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>",
"-u",
"<your_user_token>"
]
}
}
}
Enable specific APIs or presets using the -t
parameter:
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -t im.v1.message.create,im.v1.message.list,preset.calendar.default
preset.light
- Lightweight common tools with reduced token usagepreset.default
- Default comprehensive tool setpreset.im.default
- Messaging and chat toolspreset.base.default
- Bitable database toolspreset.base.batch
- Batch operations for Bitablepreset.doc.default
- Document management toolspreset.task.default
- Task management toolspreset.calendar.default
- Calendar management toolsParameter | Short | Description | Example |
---|---|---|---|
--app-id |
-a |
Feishu/Lark App ID | -a cli_xxxx |
--app-secret |
-s |
Feishu/Lark App Secret | -s xxxx |
--domain |
-d |
API domain | -d https://open.larksuite.com |
--tools |
-t |
API tools to enable | -t im.v1.message.create,im.v1.chat.create |
--tool-name-case |
-c |
Tool name format | -c camel |
--language |
-l |
Tools language (zh/en) | -l zh |
--user-access-token |
-u |
User access token | -u u-xxxx |
--token-mode |
API token type | --token-mode user_access_token |
|
--mode |
-m |
Transport mode (stdio/sse) | -m sse |
--host |
SSE mode host | --host 0.0.0.0 |
|
--port |
-p |
SSE mode port | -p 3000 |
--config |
Config file path | --config ./config.json |
lark-mcp mcp -a cli_xxxx -s yyyyy
lark-mcp mcp -a cli_xxxx -s yyyyy -u u-zzzz
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -d https://open.larksuite.com
lark-mcp mcp -a cli_xxxx -s yyyyy -t im.v1.chat.create,im.v1.message.create
lark-mcp mcp -a cli_xxxx -s yyyyy -m sse --host 0.0.0.0 -p 3000
Create a JSON configuration file (config.json):
{
"appId": "cli_xxxx",
"appSecret": "xxxx",
"domain": "https://open.feishu.cn",
"tools": ["im.v1.message.create","im.v1.chat.create"],
"toolNameCase": "snake",
"language": "en",
"userAccessToken": "",
"tokenMode": "auto",
"mode": "stdio",
"host": "localhost",
"port": "3000"
}
Then use it:
lark-mcp mcp --config ./config.json
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m stdio
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse -p 3000
Access the SSE endpoint at http://<host>:<port>/sse
.
-t
to reduce enabled APIs or use a larger token modelThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.