This MCP server provides Feishu/Lark API integration for AI tools, allowing them to interact with Feishu/Lark services like messages, documents, calendars, and more through a standardized Model Context Protocol interface.
Before using the lark-mcp tool, you need to:
Create a Feishu/Lark application:
Install Node.js:
node -v
npm -v
To use with 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>"
]
}
}
}
For API access with user identity, first log in via terminal:
# Login and get user access token
npx -y @larksuiteoapi/lark-mcp login -a cli_xxxx -s yyyyy
# Optionally specify OAuth scope
npx -y @larksuiteoapi/lark-mcp login -a cli_xxxx -s yyyyy --scope offline_access docx:document
Then update your configuration to include the OAuth flag:
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>",
"--oauth"
]
}
}
}
By default, common APIs are enabled. To enable specific APIs or presets:
npx -y @larksuiteoapi/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 tool set with fewer but commonly used toolspreset.default
- Default tool set containing all preset toolspreset.im.default
- Instant messaging related toolspreset.base.default
- Base related toolspreset.base.batch
- Base batch operation toolspreset.doc.default
- Document related toolspreset.task.default
- Task management toolspreset.calendar.default
- Calendar event management toolsmcp
command:Parameter | Short | Description |
---|---|---|
--app-id |
-a |
Feishu/Lark application App ID |
--app-secret |
-s |
Feishu/Lark application App Secret |
--domain |
-d |
API domain (default: https://open.feishu.cn) |
--tools |
-t |
API tools to enable (comma-separated) |
--tool-name-case |
-c |
Tool name format (snake, camel, dot, kebab) |
--language |
-l |
Tools language (zh or en) |
--user-access-token |
-u |
User access token |
--token-mode |
API token type (auto, tenant_access_token, user_access_token) | |
--oauth |
Enable MCP Auth Server | |
--scope |
OAuth scope for user access token | |
--mode |
-m |
Transport mode (stdio, streamable, sse) |
--host |
Host in SSE/Streamable mode | |
--port |
-p |
Port in SSE/Streamable mode |
--config |
Configuration file path |
stdio mode (Default) - For integration with AI tools like Trae/Cursor/Claude
npx -y @larksuiteoapi/lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m stdio
SSE mode - HTTP interface with Server-Sent Events
npx -y @larksuiteoapi/lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse --host 0.0.0.0 -p 3000
streamable mode - StreamableHTTP-based interface
npx -y @larksuiteoapi/lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m streamable --host 0.0.0.0 -p 3000
Create a JSON file (e.g., 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",
"tokenMode": "auto",
"mode": "stdio",
"oauth": true,
"scope": "offline_access docx:document"
}
Then run:
npx -y @larksuiteoapi/lark-mcp mcp --config ./config.json
--oauth
flag for auto-refresh-t
to reduce enabled APIs or use a model with larger token supportTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "lark-mcp" '{"command":"npx","args":["-y","@larksuiteoapi/lark-mcp","mcp","-a","<your_app_id>","-s","<your_app_secret>"]}'
See the official Claude Code MCP documentation for more details.
There 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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect