LabscoMCP early access ↗
ztxtxwdMCP SERVER

Feishu OAuth MCP Server

A remote Feishu docs server you deploy on your own Cloudflare account, with Feishu OAuth built in.

by ztxtxwd ↗Team Wikis & Documentation PlatformsCommunity

LABSCO SUMMARY

Tools sized for a client, not transcribed from an API.

The author's stated difference from Feishu's official server is not coverage but shape: API-to-tool conversion produces tools too large to use in Cursor, so the complex ones here — block creation, nested blocks — were reworked to fit. Scope matters when you choose it: the tools cover documents, their comments and spreadsheets; Bitable is not among them.

What it is

A remote MCP server for Feishu (Lark) documents that you deploy to Cloudflare Workers yourself. Users sign in with their Feishu account and the server manages and refreshes the user_access_token for them, so nothing has to be pasted into a client config. It is adapted from Cloudflare's remote-mcp-github-oauth demo with GitHub OAuth replaced by Feishu OAuth.

What you get

  • Documents: create one, read its details, its plain-text content or all of its blocks, and look up the signed-in user
  • Document editing: build blocks of each supported type — text, nine heading levels, lists, quotes, code, equations, to-dos, callouts, grids, Mermaid, timelines and more — create them, and delete one block or a batch
  • Image, file and video blocks uploaded from a local path or Base64 content
  • Markdown or HTML converted into Feishu block structures, ready to insert
  • Spreadsheets: create, read and update one, and add, copy, query, protect or delete its sheets — plus reading a document's comments
  • An OAuth 2.1 implementation that authenticates MCP clients and keeps Feishu tokens in Cloudflare KV
  • Per-user state through Durable Objects, so which tools a user sees can depend on who signed in
  • An /sse endpoint reachable directly by URL from Cursor, or through npx -y mcp-remote for clients that need a stdio bridge

Requirements

A Cloudflare account and a Feishu Open Platform application, plus Node.js 18+ and npm. Set FEISHU_APP_ID, FEISHU_APP_SECRET and COOKIE_ENCRYPTION_KEY as Wrangler secrets, create the OAUTH_KV namespace, and register https://feishu-mcp-server.<your-subdomain>.workers.dev/callback as the redirect URL in the app's security settings; locally the same values go in .dev.vars against http://localhost:8788/callback. The app needs permissions including auth:user.id:read, task:task:read, offline_access and user_profile. Access control is simple and worth knowing: every authenticated Feishu user can reach every tool.

Setup effort

Build from source — git clone https://github.com/ztxtxwd/open-feishu-mcp-server.git