Skip to main content

飞书 MCP

这是一个通过 MCP 向飞书用户或群聊发送文本、文件的工具。它支持按名称查找收件人,并会将已成功发送的目标缓存到本机,以减少重复查询。

开始使用

1. 安装 uv

选择与你的操作系统对应的安装方式:

Windows(PowerShell)

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
winget install --id=astral-sh.uv -e

macOS(终端,需已安装 Homebrew)

brew install uv

Linux(终端)

curl -LsSf https://astral.sh/uv/install.sh | sh

安装完成后,重新打开终端或 Amazon Quick,确认命令可用:

uvx --version

2. 配置 MCP 客户端

在 Amazon Quick 中打开 Settings → Capabilities → MCP Servers,创建MCP Server → Paste JSON。

{
  "mcpServers": {
    "feishu": {
      "command": "uvx",
      "args": ["--from", "feishu-mcp==0.2.2", "feishu-mcp"],
      "description": "向飞书用户或群聊发送消息和文件,支持按名称查找收件人。",
      "env": {
        "FEISHU_APP_ID": "你的飞书应用 App ID",
        "FEISHU_APP_SECRET": "你的飞书应用 App Secret"
      }
    }
  }
}

保存配置并重启 MCP 客户端。首次启动时,uvx 会自动下载工具及其依赖;之后会复用本机缓存。

使用方式

配置完成后,可以直接让支持 MCP 的客户端完成以下操作:

  • 查找飞书用户或群聊:查询用户“张三”、查询群聊“研发部门”
  • 发送消息:向李四发送:项目已完成。
  • 发送文件:将 D:\\报告.xlsx 发送给李四

如果同名用户或群聊有多个匹配项,工具不会猜测收件人,而会提示你提供更准确的名称或直接提供飞书 open_id / chat_id。

飞书应用要求

使用前需要创建并启用一个飞书自建应用,并将它的 App ID 与 App Secret 填入 MCP 配置。应用还需申请与实际功能匹配的通讯录、消息发送、文件上传权限;若要按群聊名称查询,还需要 im:chat:readonly 权限。

请勿将 App Secret 写入代码、上传到仓库,或发送给他人。

更新

将配置中 feishu-mcp== 后的版本号改为新版本,重启 MCP 客户端即可更新。建议始终固定版本号,方便回滚和排查问题。

Metadata

Release files for feishu-mcp 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for feishu-mcp 0.2.2
File Interpreter ABI Platform Actions
feishu_mcp-0.2.2-py3-none-any.whl Python 3 none any Details for feishu_mcp-0.2.2-py3-none-any.whl

Release files / feishu_mcp-0.2.2-py3-none-any.whl

Download URL feishu_mcp-0.2.2-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a041a60577dddcfe31e4e12e422e3ce060924388f331a208dc8080df041446fa
BLAKE2b-256 checksum
How to use checksums
bafff91523e3f1e8f2357b3274d4289cc0c7c4f84daa52f71f6477471d2b1c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for feishu-mcp 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page