Lark MCP Custom

Lark MCP Custom

Enables interaction with Feishu (Lark) via MCP for sending messages, managing calendar events, searching documents, and reading/writing bitable records.

Category
Visit Server

README

自定义飞书 MCP Server

项目结构

lark-mcp-custom/
├── src/
│   ├── index.ts              # 入口:初始化 MCP Server + 注册工具
│   ├── lark-client.ts        # 飞书 SDK 客户端封装
│   └── tools/
│       ├── im-tools.ts       # 消息工具(发消息、群列表、消息历史)
│       ├── calendar-tools.ts # 日历工具(查询事件、创建事件)
│       └── docs-tools.ts     # 文档工具(搜索文档、多维表格读写)
├── .env.example
├── package.json
├── tsconfig.json
└── claude_desktop_config.example.json

已实现工具

工具名 功能
lark_send_message 发送文本消息到群或用户
lark_list_chats 获取机器人所在群列表
lark_get_messages 获取群内最近消息
lark_calendar_events 查询日历事件
lark_create_event 创建日历事件
lark_search_docs 搜索云空间文档
lark_bitable_list_records 读取多维表格记录
lark_bitable_create_record 向多维表格写入记录

安装和运行

前置条件

  • Node.js >= 20
  • 飞书企业自建应用(App ID + App Secret)

步骤

  1. 安装依赖
npm install
  1. 配置环境变量
cp .env.example .env
# 编辑 .env,填入 FEISHU_APP_ID 和 FEISHU_APP_SECRET
  1. 构建
npm run build
  1. 测试运行
FEISHU_APP_ID=cli_xxx FEISHU_APP_SECRET=xxx node dist/index.js
  1. 配置 Claude 桌面版(见下方)

配置 Claude 桌面版

编辑 Claude 配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "lark-mcp-custom": {
      "command": "node",
      "args": ["/你的绝对路径/lark-mcp-custom/dist/index.js"],
      "env": {
        "FEISHU_APP_ID": "cli_你的AppID",
        "FEISHU_APP_SECRET": "你的AppSecret"
      }
    }
  }
}

重启 Claude 桌面版后即可使用。

飞书应用权限配置

在飞书开放平台(https://open.feishu.cn/app)为应用开启以下权限:

IM(消息)

  • im:message 读写消息
  • im:chat:readonly 查看群信息

日历

  • calendar:calendar 读写日历

云文档 & 多维表格

  • drive:drive:readonly 搜索文档
  • bitable:app 多维表格读写

扩展开发

新增工具只需两步:

  1. src/tools/ 下创建新文件,导出 registerXxxTools(server, client) 函数
  2. src/index.ts 中 import 并调用

工具定义格式:

server.tool(
  "工具唯一名称",
  "工具功能描述(Claude 会看这个来决定何时调用)",
  { 参数: z.string().describe("参数说明") },
  async (params) => {
    // 调用飞书 API
    return { content: [{ type: "text", text: "返回结果" }] };
  }
);

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured