Feishu/Lark MCP server

Integrates with Feishu/Lark's collaboration suite, enabling AI assistants to interact with productivity tools through the official Node.js SDK.
Back to servers
Provider
Lark Technologies
Release date
Apr 17, 2025
Language
TypeScript
Package
Stats
1.5K downloads
72 stars

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.

Prerequisites

Creating a Feishu/Lark Application

Before using lark-mcp, you'll need to:

  1. Visit the Feishu Open Platform or Lark Open Platform and log in
  2. Click "Console" to create a new application
  3. Obtain the App ID and App Secret for authentication
  4. Add the necessary permissions for your application
  5. Set up OAuth 2.0 redirect URLs if you need user access tokens

Installing Node.js

On macOS

# Using Homebrew
brew install node

# Verify installation
node -v
npm -v

On Windows

Download and install from Node.js website or use nvm-windows:

# After installing nvm-windows
nvm install latest
nvm use <version_number>

Installation

Install the lark-mcp tool globally:

npm install -g @larksuiteoapi/lark-mcp

Basic Usage

Integration with AI Tools (Trae/Cursor/Claude)

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>"
      ]
    }
  }
}

Custom API Configuration

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

Available Presets

  • preset.light - Lightweight common tools with reduced token usage
  • preset.default - Default comprehensive tool set
  • preset.im.default - Messaging and chat tools
  • preset.base.default - Bitable database tools
  • preset.base.batch - Batch operations for Bitable
  • preset.doc.default - Document management tools
  • preset.task.default - Task management tools
  • preset.calendar.default - Calendar management tools

Advanced Configuration

Command Line Parameters

Parameter 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

Examples

Basic Usage with App Authentication

lark-mcp mcp -a cli_xxxx -s yyyyy

Using User Identity

lark-mcp mcp -a cli_xxxx -s yyyyy -u u-zzzz

Using International Lark Domain

lark-mcp mcp -a <your_app_id> -s <your_app_secret> -d https://open.larksuite.com

Enabling Only Specific APIs

lark-mcp mcp -a cli_xxxx -s yyyyy -t im.v1.chat.create,im.v1.message.create

Using SSE Mode

lark-mcp mcp -a cli_xxxx -s yyyyy -m sse --host 0.0.0.0 -p 3000

Using Configuration File

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

Transport Modes

stdio mode (Default)

lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m stdio

SSE mode

lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse -p 3000

Access the SSE endpoint at http://<host>:<port>/sse.

Troubleshooting

  • Connection issues: Verify network, APP_ID, and APP_SECRET are correct
  • Token errors: User access tokens expire after 2 hours and need refreshing
  • Permission errors: Check if your app has the necessary API permissions
  • Token limit exceeded: Use -t to reduce enabled APIs or use a larger token model

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later