Lark MCP server

Provides a bridge to Lark/Feishu workplace collaboration platform, enabling access to employee information and messaging capabilities with automatic authentication and token management.
Back to servers
Provider
lorrylockie
Release date
Mar 04, 2025
Language
TypeScript
Package
Stats
69 downloads
1 star

The Lark MCP Server implements the Model Context Protocol to enable integration with Lark/Feishu APIs, allowing large language models to interact with Lark services. This server enables AI assistants to access information from your Lark workspace when properly configured.

Prerequisites

  • Node.js 16 or higher
  • A Lark/Feishu application with App ID and App Secret
  • Claude for Desktop or another MCP client

Installation

Install and build the server with npm:

npm install
npm run build

Running the Server

You can start the server using one of two methods:

Using Command Line Arguments (Recommended)

npx lark-mcp <app_id> <app_secret>

Replace <app_id> and <app_secret> with your Lark application credentials.

Using Environment Variables

export LARK_APP_ID=your_app_id
export LARK_APP_SECRET=your_app_secret
npx lark-mcp

Available Tools

The server currently provides the following capabilities:

get-user-info

This tool retrieves employee information using their ID number.

Example usage in Claude: Simply ask a question like:

Please look up employee information for ID 12345

Configuration Priority

The server prioritizes credentials in the following order:

  1. Command line arguments
  2. Environment variables
  3. Default values (if any)

Error Handling

The server includes several error handling features:

  • Validation of credentials before startup
  • Proper handling of API errors with feedback to the client
  • Detailed error messages for troubleshooting

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