feishu-mcp-zjt
v0.4.2
Published
MCP tools for querying and updating Feishu Base boards and querying Feishu docs via lark-cli
Readme
Feishu MCP
MCP server for querying and updating Feishu Base boards and querying Feishu docs through lark-cli.
This package exposes Feishu Base read/write tools and document search/fetch tools to MCP clients such as Codex, Claude Desktop, or other clients that support stdio MCP servers.
Requirements
- Node.js 18 or later
lark-cliinstalled and available inPATH- A valid
lark-clilogin session with access to the target Feishu Base
Check your Feishu CLI login before using the MCP server:
lark-cli whoamiInstall
Use it directly with npx:
npx -y feishu-mcp-zjtOr install it globally:
npm install -g feishu-mcp-zjt
feishu-mcpMCP Client Config
For the fastest and most stable startup, install the package globally and point your MCP client at the installed feishu-mcp command:
{
"mcpServers": {
"feishu-mcp": {
"command": "feishu-mcp"
}
}
}If lark-cli is not in the default PATH, pass its absolute path through FEISHU_CLI_BIN:
{
"mcpServers": {
"feishu-mcp": {
"command": "feishu-mcp",
"env": {
"FEISHU_CLI_BIN": "/absolute/path/to/lark-cli"
}
}
}
}You can also tune or disable the in-process read cache:
{
"mcpServers": {
"feishu-mcp": {
"command": "feishu-mcp",
"env": {
"FEISHU_MCP_CACHE_TTL_MS": "300000"
}
}
}
}Set FEISHU_MCP_CACHE_TTL_MS to 0 to disable caching. The default is 300000 milliseconds.
Available Tools
whoami: show the current Feishu CLI identity and token statusresolve_board: resolve a Feishu board title or URL to a Base tokensearch_docs: search Feishu docs, wiki pages, and spreadsheet files by keywordfetch_doc: fetch a Feishu document or wiki page by URL or tokenupdate_doc: safely update a Feishu document or wiki page with narrow edits onlyupdate_record: update a single record in a Base tablebatch_update_records: update multiple records in a Base table with the same patchlist_blocks: list dashboards, tables, workflows, and other Base blockslist_tables: list tables in a Baselist_fields: list fields for a Base tablequery_default_work_items: fast query for the default需求管理看板bugs, tasks, requirements, and iterations with built-in token, table IDs, and core fieldssearch_records: search records in a Base table by keywordlist_records: list records in a Base table with paginationget_record: fetch one or more records by record IDexpand_linked_records: expand link fields and fetch linked records
Local Development
npm install
npm startRun a syntax check:
npm run checkPreview the npm package contents:
npm run pack:dry-runPublish
Update the version before publishing:
npm version patch
npm publishFor an internal npm registry, configure registry through your .npmrc or publish command. If publishing this package publicly, keep publishConfig.access set to public.
Environment
FEISHU_CLI_BIN: optional path to thelark-cliexecutable. Defaults tolark-cli.FEISHU_MCP_CACHE_TTL_MS: optional TTL for cached read calls in milliseconds. Defaults to300000; set to0to disable.
Notes
- The server shells out to
lark-cli, so it reuses the current machine's Feishu login state. - Read calls such as table/field listing, record search, record get, document search/fetch, and board resolve are cached in memory for the configured TTL. Update calls are never cached.
- Users must have permission to the Feishu Base they want to query.
- Write tools only update the fields you pass in
patch; prefer narrow patches and confirm field names withlist_fieldsfirst. - For tasks that can affect multiple records, prefer
batch_update_recordsonly when every target should receive the same patch. - Keep document work read-first: use
search_docsto find the target, thenfetch_docto inspect it before any follow-up action. update_doconly allowsstr_replace,block_insert_after,block_replace, andblock_delete; it does not expose overwrite, append, or move/copy operations.block_deleterequires an explicitconfirmflag in the tool input.- Tool responses are returned as formatted JSON text for easy inspection by MCP clients.
