Name | lark-helper-mcp JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A Model Context Protocol (MCP) server for Lark (Feishu) integration |
upload_time | 2025-09-01 07:47:44 |
maintainer | None |
docs_url | None |
author | philoveritas |
requires_python | >=3.12 |
license | None |
keywords |
mcp
lark
feishu
claude
ai
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Lark Helper MCP Server
一个用于 [Lark (飞书)](https://www.larksuite.com/) 集成的 [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) 服务器。
## 功能特性
- 🚀 基于 FastMCP 构建的高性能 MCP 服务器
- 📱 支持向飞书用户和群聊发送文本消息
- 🔐 安全的环境变量配置管理
- 🛠 支持多种安装和运行方式
## 环境要求
- Python 3.12+
- 有效的飞书应用凭据(App ID 和 App Secret)
## 安装
### 方法一:使用 uvx(推荐)
```bash
# 临时运行
uvx lark-helper-mcp
# 或永久安装
uv tool install lark-helper-mcp
```
### 方法二:使用 pip
```bash
pip install lark-helper-mcp
```
### 方法三:开发安装
```bash
git clone <repository-url>
cd lark-helper-mcp
uv sync
uv run python main.py
```
## 配置
在运行之前,需要设置以下环境变量:
```bash
export LARK_APP_ID=your_app_id_here
export LARK_APP_SECRET=your_app_secret_here
```
或者创建 `.env` 文件:
```env
LARK_APP_ID=your_app_id_here
LARK_APP_SECRET=your_app_secret_here
```
### 获取飞书应用凭据
1. 访问 [飞书开放平台](https://open.feishu.cn/)
2. 创建一个新的应用或选择现有应用
3. 在应用详情页面获取 App ID 和 App Secret
4. 确保应用有发送消息的权限
## 使用方法
### 作为独立服务器运行
```bash
# 使用 uvx
uvx lark-helper-mcp
# 或使用已安装的命令
lark-helper-mcp
# 或使用 Python 模块
python -m lark_helper_mcp
```
### 在 Claude Desktop 中使用
在 Claude Desktop 的配置文件中添加:
```json
{
"mcpServers": {
"lark-helper": {
"command": "uvx",
"args": ["lark-helper-mcp"],
"env": {
"LARK_APP_ID": "your_app_id_here",
"LARK_APP_SECRET": "your_app_secret_here"
}
}
}
}
```
## 可用工具
### `send_text_message`
向指定的飞书用户或群聊发送文本消息。
**参数:**
- `receive_id` (string): 接收者 ID
- `receive_id_type` (string): 接收者 ID 类型,支持:
- `user_id`: 用户 ID
- `open_id`: Open ID
- `chat_id`: 群聊 ID
- `text_content` (string): 要发送的文本内容
**示例使用:**
```python
# 发送消息给用户
send_text_message(
receive_id="user123",
receive_id_type="user_id",
text_content="Hello from MCP!"
)
# 发送消息到群聊
send_text_message(
receive_id="oc_chat456",
receive_id_type="chat_id",
text_content="团队通知:会议将在10分钟后开始"
)
```
## 开发
### 环境设置
```bash
# 克隆仓库
git clone <repository-url>
cd lark-helper-mcp
# 创建虚拟环境并安装依赖
uv venv
uv sync
# 运行开发服务器
uv run python main.py
```
### 代码质量检查
```bash
# 运行 linter
ruff check
# 格式化代码
ruff format
```
### 构建和发布
```bash
# 构建包
uv build
# 发布到 PyPI(需要配置 PyPI 凭据)
twine upload dist/*
```
## 许可证
MIT License - 详见 [LICENSE](LICENSE) 文件。
## 贡献
欢迎提交 Issue 和 Pull Request!
## 支持
如有问题,请在 [GitHub Issues](https://github.com/philoveritas/lark-helper-mcp/issues) 中提出。
Raw data
{
"_id": null,
"home_page": null,
"name": "lark-helper-mcp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "mcp, lark, feishu, claude, ai",
"author": "philoveritas",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/8c/85/de58054fb37dd9ef1b0278d36b8e3cf3a73e44de9080a15a33efbc34330d/lark_helper_mcp-0.1.0.tar.gz",
"platform": null,
"description": "# Lark Helper MCP Server\n\n\u4e00\u4e2a\u7528\u4e8e [Lark (\u98de\u4e66)](https://www.larksuite.com/) \u96c6\u6210\u7684 [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) \u670d\u52a1\u5668\u3002\n\n## \u529f\u80fd\u7279\u6027\n\n- \ud83d\ude80 \u57fa\u4e8e FastMCP \u6784\u5efa\u7684\u9ad8\u6027\u80fd MCP \u670d\u52a1\u5668\n- \ud83d\udcf1 \u652f\u6301\u5411\u98de\u4e66\u7528\u6237\u548c\u7fa4\u804a\u53d1\u9001\u6587\u672c\u6d88\u606f\n- \ud83d\udd10 \u5b89\u5168\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u7ba1\u7406\n- \ud83d\udee0 \u652f\u6301\u591a\u79cd\u5b89\u88c5\u548c\u8fd0\u884c\u65b9\u5f0f\n\n## \u73af\u5883\u8981\u6c42\n\n- Python 3.12+\n- \u6709\u6548\u7684\u98de\u4e66\u5e94\u7528\u51ed\u636e\uff08App ID \u548c App Secret\uff09\n\n## \u5b89\u88c5\n\n### \u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528 uvx\uff08\u63a8\u8350\uff09\n\n```bash\n# \u4e34\u65f6\u8fd0\u884c\nuvx lark-helper-mcp\n\n# \u6216\u6c38\u4e45\u5b89\u88c5\nuv tool install lark-helper-mcp\n```\n\n### \u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 pip\n\n```bash\npip install lark-helper-mcp\n```\n\n### \u65b9\u6cd5\u4e09\uff1a\u5f00\u53d1\u5b89\u88c5\n\n```bash\ngit clone <repository-url>\ncd lark-helper-mcp\nuv sync\nuv run python main.py\n```\n\n## \u914d\u7f6e\n\n\u5728\u8fd0\u884c\u4e4b\u524d\uff0c\u9700\u8981\u8bbe\u7f6e\u4ee5\u4e0b\u73af\u5883\u53d8\u91cf\uff1a\n\n```bash\nexport LARK_APP_ID=your_app_id_here\nexport LARK_APP_SECRET=your_app_secret_here\n```\n\n\u6216\u8005\u521b\u5efa `.env` \u6587\u4ef6\uff1a\n\n```env\nLARK_APP_ID=your_app_id_here\nLARK_APP_SECRET=your_app_secret_here\n```\n\n### \u83b7\u53d6\u98de\u4e66\u5e94\u7528\u51ed\u636e\n\n1. \u8bbf\u95ee [\u98de\u4e66\u5f00\u653e\u5e73\u53f0](https://open.feishu.cn/)\n2. \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u6216\u9009\u62e9\u73b0\u6709\u5e94\u7528\n3. \u5728\u5e94\u7528\u8be6\u60c5\u9875\u9762\u83b7\u53d6 App ID \u548c App Secret\n4. \u786e\u4fdd\u5e94\u7528\u6709\u53d1\u9001\u6d88\u606f\u7684\u6743\u9650\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n### \u4f5c\u4e3a\u72ec\u7acb\u670d\u52a1\u5668\u8fd0\u884c\n\n```bash\n# \u4f7f\u7528 uvx\nuvx lark-helper-mcp\n\n# \u6216\u4f7f\u7528\u5df2\u5b89\u88c5\u7684\u547d\u4ee4\nlark-helper-mcp\n\n# \u6216\u4f7f\u7528 Python \u6a21\u5757\npython -m lark_helper_mcp\n```\n\n### \u5728 Claude Desktop \u4e2d\u4f7f\u7528\n\n\u5728 Claude Desktop \u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\uff1a\n\n```json\n{\n \"mcpServers\": {\n \"lark-helper\": {\n \"command\": \"uvx\",\n \"args\": [\"lark-helper-mcp\"],\n \"env\": {\n \"LARK_APP_ID\": \"your_app_id_here\",\n \"LARK_APP_SECRET\": \"your_app_secret_here\"\n }\n }\n }\n}\n```\n\n## \u53ef\u7528\u5de5\u5177\n\n### `send_text_message`\n\n\u5411\u6307\u5b9a\u7684\u98de\u4e66\u7528\u6237\u6216\u7fa4\u804a\u53d1\u9001\u6587\u672c\u6d88\u606f\u3002\n\n**\u53c2\u6570\uff1a**\n- `receive_id` (string): \u63a5\u6536\u8005 ID\n- `receive_id_type` (string): \u63a5\u6536\u8005 ID \u7c7b\u578b\uff0c\u652f\u6301\uff1a\n - `user_id`: \u7528\u6237 ID\n - `open_id`: Open ID\n - `chat_id`: \u7fa4\u804a ID\n- `text_content` (string): \u8981\u53d1\u9001\u7684\u6587\u672c\u5185\u5bb9\n\n**\u793a\u4f8b\u4f7f\u7528\uff1a**\n```python\n# \u53d1\u9001\u6d88\u606f\u7ed9\u7528\u6237\nsend_text_message(\n receive_id=\"user123\", \n receive_id_type=\"user_id\", \n text_content=\"Hello from MCP!\"\n)\n\n# \u53d1\u9001\u6d88\u606f\u5230\u7fa4\u804a\nsend_text_message(\n receive_id=\"oc_chat456\", \n receive_id_type=\"chat_id\", \n text_content=\"\u56e2\u961f\u901a\u77e5\uff1a\u4f1a\u8bae\u5c06\u572810\u5206\u949f\u540e\u5f00\u59cb\"\n)\n```\n\n## \u5f00\u53d1\n\n### \u73af\u5883\u8bbe\u7f6e\n\n```bash\n# \u514b\u9686\u4ed3\u5e93\ngit clone <repository-url>\ncd lark-helper-mcp\n\n# \u521b\u5efa\u865a\u62df\u73af\u5883\u5e76\u5b89\u88c5\u4f9d\u8d56\nuv venv\nuv sync\n\n# \u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\nuv run python main.py\n```\n\n### \u4ee3\u7801\u8d28\u91cf\u68c0\u67e5\n\n```bash\n# \u8fd0\u884c linter\nruff check\n\n# \u683c\u5f0f\u5316\u4ee3\u7801\nruff format\n```\n\n### \u6784\u5efa\u548c\u53d1\u5e03\n\n```bash\n# \u6784\u5efa\u5305\nuv build\n\n# \u53d1\u5e03\u5230 PyPI\uff08\u9700\u8981\u914d\u7f6e PyPI \u51ed\u636e\uff09\ntwine upload dist/*\n```\n\n## \u8bb8\u53ef\u8bc1\n\nMIT License - \u8be6\u89c1 [LICENSE](LICENSE) \u6587\u4ef6\u3002\n\n## \u8d21\u732e\n\n\u6b22\u8fce\u63d0\u4ea4 Issue \u548c Pull Request\uff01\n\n## \u652f\u6301\n\n\u5982\u6709\u95ee\u9898\uff0c\u8bf7\u5728 [GitHub Issues](https://github.com/philoveritas/lark-helper-mcp/issues) \u4e2d\u63d0\u51fa\u3002\n",
"bugtrack_url": null,
"license": null,
"summary": "A Model Context Protocol (MCP) server for Lark (Feishu) integration",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/philoveritas/lark-helper-mcp",
"Issues": "https://github.com/philoveritas/lark-helper-mcp/issues",
"Repository": "https://github.com/philoveritas/lark-helper-mcp"
},
"split_keywords": [
"mcp",
" lark",
" feishu",
" claude",
" ai"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b61b175ab6280583f072b8eed08274ec31d1993a513e3d1f3217282a08e8d33f",
"md5": "500614aad6ed556685bf1e92c47222b8",
"sha256": "ef18e7bff9725b04011f56bf0de35f6f86e5016a1f559860099399e3095d273e"
},
"downloads": -1,
"filename": "lark_helper_mcp-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "500614aad6ed556685bf1e92c47222b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 6430,
"upload_time": "2025-09-01T07:47:43",
"upload_time_iso_8601": "2025-09-01T07:47:43.505580Z",
"url": "https://files.pythonhosted.org/packages/b6/1b/175ab6280583f072b8eed08274ec31d1993a513e3d1f3217282a08e8d33f/lark_helper_mcp-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8c85de58054fb37dd9ef1b0278d36b8e3cf3a73e44de9080a15a33efbc34330d",
"md5": "66df5ffb7311674e25a1dd674b9286a4",
"sha256": "1f6e7c140c3e5d3285be11ef04327b0c8e4e1a157fb1ea64d641bdca14f0f3cb"
},
"downloads": -1,
"filename": "lark_helper_mcp-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "66df5ffb7311674e25a1dd674b9286a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 5814,
"upload_time": "2025-09-01T07:47:44",
"upload_time_iso_8601": "2025-09-01T07:47:44.957882Z",
"url": "https://files.pythonhosted.org/packages/8c/85/de58054fb37dd9ef1b0278d36b8e3cf3a73e44de9080a15a33efbc34330d/lark_helper_mcp-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-01 07:47:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "philoveritas",
"github_project": "lark-helper-mcp",
"github_not_found": true,
"lcname": "lark-helper-mcp"
}