The Feishu MCP Server is a tool that provides AI-powered coding tools like Cursor, Windsurf, and Cline with capabilities to access, edit, and process Feishu documents. Based on the Model Context Protocol (MCP), it enables structured document processing with support for folders, content retrieval, document editing, and searching.
The quickest way to get started is using NPX:
npx feishu-mcp@latest --feishu-app-id=<YOUR_APP_ID> --feishu-app-secret=<YOUR_APP_SECRET> --feishu-auth-type=<tenant/user>
Clone the repository
git clone https://github.com/cso1z/Feishu-MCP.git
cd Feishu-MCP
Install dependencies
pnpm install
Configure environment variables
Copy .env.example to .env and edit with your Feishu credentials:
FEISHU_APP_ID=cli_xxxxx
FEISHU_APP_SECRET=xxxxx
PORT=3333
FEISHU_AUTH_TYPE=tenant/user
Start the server
pnpm run dev
| Variable | Required | Description | Default |
|---|---|---|---|
FEISHU_APP_ID |
✅ | Feishu application ID | - |
FEISHU_APP_SECRET |
✅ | Feishu application secret | - |
PORT |
❌ | Server port | 3333 |
FEISHU_AUTH_TYPE |
❌ | Authentication type: user or tenant |
tenant |
For tools like Cursor or Cline, add this to your configuration:
{
"mcpServers": {
"feishu-mcp": {
"command": "npx",
"args": ["-y", "feishu-mcp", "--stdio"],
"env": {
"FEISHU_APP_ID": "<YOUR_APP_ID>",
"FEISHU_APP_SECRET": "<YOUR_APP_SECRET>",
"FEISHU_AUTH_TYPE": "<tenant/user>"
}
},
"feishu_local": {
"url": "http://localhost:3333/sse?userKey=123456"
}
}
}
⚠️ Important: Before using this tool, you must configure a Feishu application.
You can find the official guide on creating a Feishu application at Feishu's official documentation.
When creating new documents, it's recommended to provide a Feishu folder token (either a specific folder or root folder) for better document organization. If unsure about which subfolder to use, the LLM can automatically find the most suitable subfolder within your specified folder.
How to get a folder token? Open the Feishu folder page and copy the URL (e.g.,
https://.../drive/folder/xxxxxxxxxxxxxxxxxxxxxx). The token is the last string of characters in the URL.
When running MCP locally, both local absolute paths and http/https network image URLs are supported. In a server environment, only network image links are supported.
Mathematical formulas can be used within text blocks using LaTeX syntax, such as 1+2=3, \frac{a}{b}, \sqrt{x}, etc. Multiple formulas can be included in a single text block alongside regular text.
When switching from tenant to user authentication, you need to configure appropriate permissions. To distinguish between different users, add a userKey query parameter to the MCP server URL. This value should be a unique user identifier, so make it as random as possible.
The server supports a wide range of document management and editing features:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "feishu-mcp" '{"command":"npx","args":["-y","feishu-mcp","--stdio"],"env":{"FEISHU_APP_ID":"<\u4f60\u7684\u98de\u4e66\u5e94\u7528ID>","FEISHU_APP_SECRET":"<\u4f60\u7684\u98de\u4e66\u5e94\u7528\u5bc6\u94a5>"}}'
See the official Claude Code MCP documentation for more details.
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.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"feishu-mcp": {
"command": "npx",
"args": [
"-y",
"feishu-mcp",
"--stdio"
],
"env": {
"FEISHU_APP_ID": "<\u4f60\u7684\u98de\u4e66\u5e94\u7528ID>",
"FEISHU_APP_SECRET": "<\u4f60\u7684\u98de\u4e66\u5e94\u7528\u5bc6\u94a5>"
}
}
}
}
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.
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"feishu-mcp": {
"command": "npx",
"args": [
"-y",
"feishu-mcp",
"--stdio"
],
"env": {
"FEISHU_APP_ID": "<\u4f60\u7684\u98de\u4e66\u5e94\u7528ID>",
"FEISHU_APP_SECRET": "<\u4f60\u7684\u98de\u4e66\u5e94\u7528\u5bc6\u94a5>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect