Feishu/Lark

Provides Feishu/Lark Open Platform API access via MCP for messaging, docs, calendar, and more with flexible auth and transport options.
  • typescript

0

GitHub Stars

typescript

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kaipany-lark-mcp-kaipany": {
      "command": "npx",
      "args": [
        "-y",
        "@larksuiteoapi/lark-mcp",
        "mcp",
        "-a",
        "<your_app_id>",
        "-s",
        "<your_app_secret>"
      ],
      "env": {
        "APP_ID": "<your_app_id>",
        "APP_SECRET": "<your_app_secret>"
      }
    }
  }
}

You can connect AI agents to Feishu/Lark using the MCP server to call Feishu/Lark Open Platform APIs directly. This enables automation for messaging, calendar, documents, and more while giving you flexible transport options and token configurations for secure API access.

How to use

Set up the MCP server locally and connect your AI tools to it. You will run a local MCP client that communicates either through standard input/output (stdio) or via Server-Sent Events (SSE) over HTTP. Start with your Feishu/Lark App ID and App Secret to authenticate, and choose which API tools you want to enable. For user context, you can supply a user access token so API calls run on behalf of a user.

How to install

Prerequisites you need before installing: Node.js and npm. If you do not have them, install Node.js from the official site and verify the versions in your terminal.

# Install the MCP tool globally
npm install -g @larksuiteoapi/lark-mcp

Using the MCP with an external client (stdio mode)

Configure your MCP client to run the stdio server and expose your API credentials. You can start the MCP server as a local process and point your AI tool to it.

{
  "mcpServers": {
    "lark-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@larksuiteoapi/lark-mcp",
        "mcp",
        "-a",
        "<your_app_id>",
        "-s",
        "<your_app_secret>"
      ]
    }
  }
}

Using a user context with a token

If you want API calls to act as a specific user, include a user access token in your configuration.

{
  "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 and presets

You can enable specific tools or presets to tailor the MCP capabilities to your needs. Use the -t option to include only selected APIs or presets such as preset.calendar.default for calendar tasks.

lark-mcp mcp -a <your_app_id> -s <your_app_secret> -t im.v1.chat.create,im.v1.message.create

Transport modes and endpoints

Choose between stdio and SSE. StdIO is ideal for integration with AI tools through standard input/output. SSE exposes an HTTP endpoint for event-based communication.

# SSE mode example (listening on localhost by default)
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m sse -p 3000
# Stdio mode example
lark-mcp mcp -a <your_app_id> -s <your_app_secret> -m stdio

Using a configuration file

You can store settings in a JSON config file and reference it when starting the MCP server.

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

Notes on tokens and domain configuration

  • Token mode can be auto, tenant_access_token, or user_access_token. Use auto unless you need explicit control over the token type.

  • You can point the MCP server to the Lark international domain or a custom KA domain using the domain option.

Security and permissions

Ensure your Feishu/Lark app has the necessary permissions for the APIs you enable. Some operations may require higher-level permissions that must be approved in the developer console.

Troubleshooting

If you encounter token expiration, configure a token refresh strategy or periodically re-authenticate. For connection issues, verify your App ID/Secret and network access to Feishu/Lark Open Platform.

Notes on usage with Windows and encoding

If you run into garbled characters in Windows terminals, switch to UTF-8 encoding with chcp 65001 and adjust the terminal font if needed.

Transport and endpoint summary

The MCP server can operate in stdio mode for local AI tool integration or in SSE mode to provide an HTTP endpoint for event-driven clients. Pick the mode that best fits your deployment scenario.

Available tools

im.v1.chat.create

Create a group chat message or chat payload in a Feishu/Lark workspace.

im.v1.chat.list

Retrieve the list of group chats for a user or workspace.

im.v1.message.create

Send a message to a chat or conversation.

im.v1.message.list

Get a list of messages from a chat or conversation.

docx.v1.document.rawContent

Get raw content of a document.

bitable.v1.app.create

Create a base (bitable) instance.

bitable.v1.appTable.create

Create a data table within a base.

bitable.v1.appTable.list

List data tables within a base.

drive.v1.permissionMember.create

Add a member with permissions to a drive resource.

calendar.v4.calendarEvent.create

Create a calendar event.

calendar.v4.calendarEvent.get

Get calendar event details.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Feishu/Lark MCP Server - kaipany/lark-mcp-kaipany | VeilStrat