lark-cli-mcp
Provides tools for interacting with Feishu/Lark (ByteDance's collaboration platform) via the official lark-cli, enabling creation and editing of Feishu docs, Base tables, Wiki pages, and Drive files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lark-cli-mcpCreate a Feishu doc titled 'Weekly notes' from this Markdown table: | Item | Status |"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lark-cli-mcp
Run the official Feishu/Lark CLI (lark-cli) as a remote MCP server, so Claude, ChatGPT or any MCP client can create and edit Feishu docs, Base tables, Wiki pages and Drive files without getting a shell on your server.
lark-cli is what Feishu now recommends for AI agents, but it has no MCP mode. Wrapping it in a generic "run a command" MCP server either gives the agent a shell or breaks on Markdown (tables contain |, titles contain <). This project sits in between: one MCP tool, one binary, a small refusal policy, and a hardened container.
What you get
One tool,
lark_cli(args, stdin).argsis the argv afterlark-cli;stdinfeeds flags that accept-, so Markdown with tables, quotes and<tags>goes through untouched.No shell anywhere. The argv list goes straight to
subprocess.run;&&,$(...)and backticks are just text.A refusal policy, on by default:
only the listed domains run (docs, drive, markdown, wiki, base, sheets, contact, plus schema, skills, doctor, help, whoami);
config,update,profileandauth login/logoutare refused, so the agent cannot change which app or account it acts as;--yes(lark-cli's marker for high-risk writes) is refused;@filearguments are refused, so the agent cannot read files from the container into a document;raw
apicalls are GET-only.
Streamable HTTP with a required bearer token (32+ characters, compared in constant time).
A container that runs as a non-root user with a read-only root filesystem, no capabilities and
no-new-privileges.lark-cliis downloaded from the official release and checked against a pinned SHA-256.
What the agent can do is still bounded by the scopes you grant the Feishu app and the user who logs in. Grant the least you need. You can also open the MCP layer up (LARK_CLI_ALLOWED_DOMAINS=*) and control everything with Feishu scopes; config/profile/update, auth login/logout and @file stay refused either way. Ready-made scope lists for the Feishu console's bulk import are in feishu-scopes/. See docs/architecture.md for the design and the four permission layers, and SECURITY.md for the threat model.
Related MCP server: mcp-tool-server
Quick start
git clone https://github.com/Gsxcheng/lark-cli-mcp && cd lark-cli-mcp
cp .env.example .env && sed -i "s/^MCP_BEARER_TOKEN=.*/MCP_BEARER_TOKEN=$(openssl rand -hex 32)/" .env
docker compose -f deploy/docker-compose.yml up -d --build
# One-time setup, done by you, not by the agent:
docker exec -it lark-cli-mcp lark-cli config init --new # create or bind a Feishu app in the browser
docker exec -it lark-cli-mcp lark-cli auth login --domain docs,drive,markdown,wiki,base,sheets,contact
docker exec lark-cli-mcp lark-cli auth statusTo reuse an existing app instead of --new: docker exec -it lark-cli-mcp lark-cli config init --app-id <app id> --app-secret-stdin.
The server listens on 127.0.0.1:3310 at /mcp. Put a reverse proxy or tunnel in front of it before exposing it; see docs/cloudflare-mcp-portal.md for Cloudflare Tunnel + Access + MCP Portal.
From mainland China, build with mirrors:
docker compose -f deploy/docker-compose.yml build \
--build-arg LARK_CLI_PREFER_MIRROR=1 \
--build-arg PIP_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simpleExample call
{
"args": ["docs", "+create", "--as", "user", "--doc-format", "markdown", "--title", "Weekly notes", "--content", "-"],
"stdin": "# This week\n\n| Item | Status |\n|---|---|\n| Launch | done |"
}The tool returns exit=<code>, then stdout and stderr. Refused calls return REFUSED: <reason> and never start lark-cli.
Configuration
Variable | Default | Meaning |
| required | Clients send |
| empty | Comma-separated Host values to accept. Empty turns DNS-rebinding protection off, which is what you want behind a proxy that rewrites nothing. |
|
| HTTP path of the MCP endpoint. |
| see above | Comma-separated first arguments that may run. |
| off | Allow |
| off | Allow |
| off | Allow non-GET raw |
|
| Seconds before a call is killed. |
|
| Characters of output returned to the client. |
Development
pip install -e '.[test]'
pytestThe tests use a fake lark-cli, so they need no Feishu account.
Status
Early (v0.1). Covered by unit tests with a fake lark-cli and checked in the hardened container; first real deployment in progress. Built against lark-cli 1.0.98 and the MCP Python SDK 2.3.0. Not affiliated with Feishu, Lark or ByteDance.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP Server that enables LLMs to interact with the local filesystem.4131,391 npm24MIT
- AlicenseNot gradedqualityDmaintenanceA secure, production-grade MCP server that provides filesystem operations, AST math evaluation, and system diagnostics for LLM agents.MIT
- FlicenseAqualityDmaintenanceExposes the official lark-cli as an MCP server, enabling agents to execute arbitrary CLI commands, query API schemas, and manage authentication.41-
- AlicenseCqualityCmaintenanceA full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official Model Context Protocol specification, offering standardized request/response schemas, large-file streaming I/O, multi-transport remote deployment, and comprehensive text search & replace functionality for LLM agent integration.22Apache 2.0