Feishu bot + MCP + Codex bridge workspace.
- 中文说明: README.zh-CN.md
- Direct plain text messages can go through Codex bridge without requiring a
/codexprefix. - Image messages can be downloaded from Feishu message resources and forwarded to the bridge as multimodal input.
/codexis still supported for explicit bridge usage, along with/codex-reset,/codex-model, and/codex-dir./clearclears both regular chat memory and bridge session state.
SKILL.md: skill instructions for Codexagents/openai.yaml: skill UI metadatascripts/: operational PowerShell and shell scriptsworkspace/feishu_mcp_bot: Node.js Feishu bot projectworkspace/feishu_mcp_gui: Windows GUI controller for the botworkspace/output/lark-mcp-local-runtime: local MCP runtime package filesreferences/: supporting docs copied from the working setup
workspace/feishu_mcp_bot: intended to work on Windows and macOS/Linuxscripts/*.ps1: Windows-first operational scriptsscripts/*.sh: macOS/Linux operational scriptsworkspace/feishu_mcp_gui: Windows-only GUI based ongithub.com/lxn/walk
- Copy
workspace/feishu_mcp_bot/.env.exampletoworkspace/feishu_mcp_bot/.env - Fill in your own Feishu and OpenAI credentials
- Install dependencies in
workspace/feishu_mcp_bot - Start the bot:
powershell -ExecutionPolicy Bypass -File ".\scripts\start-feishu-bot.ps1" -RestartOr on macOS/Linux:
bash ./scripts/start-feishu-bot.sh --restart- Monitor health:
powershell -ExecutionPolicy Bypass -File ".\scripts\monitor-feishu-bot.ps1" -RunMcpHelpCheckOr on macOS/Linux:
bash ./scripts/monitor-feishu-bot.sh --run-mcp-help-check- Build the GUI:
powershell -ExecutionPolicy Bypass -File ".\workspace\feishu_mcp_gui\build-feishu-gui.ps1"The GUI is Windows-only. On macOS/Linux, use the shell scripts and the bot logs directly.
Use this sequence when configuring the bot in Feishu Open Platform:
- Create a self-built application in Feishu Open Platform.
- Enable the bot capability.
- Configure the permissions required by this repository.
- Set the OAuth redirect URL to
http://localhost:3000/callback. - Choose the event subscription mode:
- Feishu CN: prefer persistent connection
- Lark global or public callback scenarios: use webhook
- Subscribe at least to
im.message.receive_v1. - Start the local bot before testing subscriptions.
- Add the bot to a chat and send a message to verify the event path.
If you want image understanding:
- make sure your Feishu app has the permissions needed to read message resources
- make sure the model behind
CODEX_BRIDGE_MODEL/CODEX_BRIDGE_BASE_URLsupports image input
For webhook mode, configure the callback URL as:
http://<your_public_domain>/webhook/event
If you only need a quick minimum checklist, verify these four items first:
- bot capability is enabled
- required scopes are approved
- redirect URL is correct
im.message.receive_v1is subscribed
Approve a pending pairing:
powershell -ExecutionPolicy Bypass -File ".\scripts\approve-feishu-pairing.ps1" -Code YOUR_CODE -Remark 我On macOS/Linux:
bash ./scripts/approve-feishu-pairing.sh --code YOUR_CODE --remark 我Send a message to a bound recipient:
powershell -ExecutionPolicy Bypass -File ".\scripts\send-feishu-message.ps1" -Target 我 -Text "你好。"On macOS/Linux:
bash ./scripts/send-feishu-message.sh --target 我 --text "你好。"workspace/feishu_mcp_bot/.env.examplestill keepsCODEX_WORKDIRandCODEX_WORKDIR_ROOTSas examples pointing to your own business workspace. Replace them with your own paths.- The GUI and operational scripts are adjusted to use repository-relative defaults instead of machine-specific skill paths.
- The shell scripts assume
bash,curl,node,ps,grep,lsof, andnohupare available in PATH. - The shell scripts were added for macOS/Linux support, but were not end-to-end run against a live macOS environment in this Windows workspace.