Feishu MCP Proxy

Feishu MCP Proxy

A local reverse proxy for Feishu MCP services that automatically manages tenant_access_token, enabling AI agents to interact with Feishu documents and tools seamlessly.

Category
Visit Server

README

Feishu MCP Proxy

飞书 MCP 服务的本地反向代理,自动管理 tenant_access_token 的获取和刷新,让你的 AI Agent 无需关心 token 过期问题。

架构

Claude Code / AI Agent
  │
  │ POST http://localhost:9099/mcp
  ▼
┌─────────────────────────┐
│   Feishu MCP Proxy      │
│   - 自动获取 TAT        │
│   - 后台定时刷新        │
│   - 透明转发请求        │
└─────────────────────────┘
  │
  │ POST https://mcp.feishu.cn/mcp
  │ + X-Lark-MCP-TAT: t-xxx
  ▼
Feishu MCP Server

前置条件

  1. Python 3.10+
  2. 在飞书开放平台创建自建应用,获取 App ID 和 App Secret
  3. 为应用申请所需的 API 权限(如 docx:document:readonly, docx:document:create 等)

安装

git clone https://github.com/Tim-Siu/feishu-mcp-proxy.git
cd feishu-mcp-proxy
pip install .

或开发模式安装:

pip install -e .

配置

cp .env.example .env

编辑 .env 文件:

FEISHU_APP_ID=cli_xxxxxxxxxxxxxxxx
FEISHU_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

可选配置

环境变量 说明 默认值
FEISHU_ALLOWED_TOOLS 允许的工具列表(逗号分隔) 全部工具
PROXY_HOST 监听地址 localhost
PROXY_PORT 监听端口 9099
LOG_LEVEL 日志级别 INFO

启动

python -m feishu_mcp_proxy

或使用安装后的命令:

feishu-mcp-proxy

启动后可通过 /health 端点检查状态:

curl http://localhost:9099/health

Claude Code 集成

一键配置

claude mcp add feishu --transport http http://localhost:9099/mcp

这会自动将飞书 MCP 添加到你的 Claude Code 配置中。

手动配置

也可以在项目目录下创建 .mcp.json:

{
  "mcpServers": {
    "feishu": {
      "type": "streamableHttp",
      "url": "http://localhost:9099/mcp"
    }
  }
}

启动 proxy 后,Claude Code 即可直接使用飞书 MCP 工具(如 fetch-doc, create-doc, search-doc 等),无需手动管理 token。

支持的 MCP 工具

工具 说明
search-doc 搜索云文档
create-doc 创建云文档
fetch-doc 查看云文档内容
update-doc 更新云文档
list-docs 列出知识空间下的文档
get-comments 查看文档评论
add-comments 添加文档评论
search-user 搜索用户
get-user 获取用户信息
fetch-file 获取文件内容

License

MIT

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