Summary
Let your AI work in Lark (Feishu) as your own custom app and bot: read and send group messages, look up colleagues and departments, read documents and wiki pages, read and write Base (Bitable) records, manage calendar events and tasks, and review approval requests. App ID and App Secret.
Guided setup
Connect Lark / Feishu to Microsoft Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Lark / Feishu in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Lark / Feishu
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Lark / Feishu, choose Lark or Feishu, paste the App ID and App Secret of your custom app, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Lark / Feishu + Microsoft Copilot
Let your AI work in Lark (Feishu) as your own custom app and bot: read and send group messages, look up colleagues and departments, read documents and wiki pages, read and write Base (Bitable) records, manage calendar events and tasks, and review approval requests. App ID and App Secret.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
LARK_BASE_URL, LARK_APP_ID, LARK_APP_SECRET
Step 1 — Get credentials
Setting up takes about 15 minutes. You need the needs an organisation admin for the release.
- Open the developer console: https://open.larksuite.com/app for Lark (international), https://open.feishu.cn/app for Feishu. Click Create Custom App.
- Under Credentials & Basic Info copy the App ID (starts with
cli_) intoLARK_APP_IDand the App Secret intoLARK_APP_SECRET. Pick the matching platform inLARK_BASE_URL: a Lark app does not work on the Feishu host and the other way round. - Under Add Features enable Bot.
- Under Permissions & Scopes add the scopes of the areas you want (list below). For the directory also set the contacts permission range (which departments the app may see).
- Under Version Management & Release create a version and submit it; an organisation admin approves it. Scopes only work after the version that contains them is released.
- Add the bot to the group chats it should read or write in, and give the app access to the documents, folders, wikis and Bases it should use (share them with the app, or add it as a document app).
The connector exchanges App ID and App Secret for a token that lasts about 2 hours and renews it by itself.
Scopes by area (add the read-only one where you only read)
- Messages:
im:message:send_as_botto send,im:message:readonly(orim:message) to read,im:message.group_msgto read the history of groups. - Chats:
im:chat:readonly(orim:chat). - Directory:
contact:contact.base:readonlyandcontact:department.organize:readonly;contact:user.id:readonlyto find users by e-mail or mobile;contact:user.email:readonly,contact:user.phone:readonlyandcontact:user.employee_id:readonlyfor those fields. - Drive and documents:
drive:drive:readonly,docx:document:readonly,wiki:wiki:readonly. - Base:
bitable:app:readonlyto read,bitable:appto write. - Calendar:
calendar:calendar:readonlyto read,calendar:calendarto create events and invite attendees. - Tasks:
task:tasklist:read,task:task:read,task:task:write. - Approval:
approval:approval:readonly.
Where to start: lark_get_bot_info checks the credentials (it needs no scope). lark_list_chats shows the groups the bot is in; lark_list_messages reads one of them.
Messages and chats: lark_list_chats, lark_get_chat, lark_list_chat_members, lark_list_messages, lark_get_message, lark_send_text_message, lark_send_message (rich text, cards, shares), lark_reply_to_message, lark_edit_message and lark_recall_message (switched off at install).
Directory: lark_list_child_departments and lark_list_department_users walk the organisation from department 0; lark_get_user reads one person; lark_lookup_user_ids turns an e-mail or mobile into a user id.
Documents: lark_list_drive_files, lark_get_document_content (plain text of a docx) and lark_get_wiki_node (turns a wiki link into the document or Base behind it).
Base (Bitable): lark_list_bitable_tables, lark_list_bitable_fields, lark_search_bitable_records, lark_create_bitable_record, lark_update_bitable_record and lark_delete_bitable_record (switched off at install).
Calendar: lark_list_calendars, lark_list_calendar_events, lark_get_calendar_event, lark_create_calendar_event and lark_add_event_attendees.
Tasks and approvals: lark_list_tasklists, lark_list_tasklist_tasks, lark_get_task, lark_create_task, lark_list_approval_instances and lark_get_approval_instance.
Field notes
- Ids: users are
open_id(ou_..., different per app) by default, chatsoc_..., messagesom_..., departmentsod-.... Tokens of documents and Bases are the last part of their URL; a/wiki/link must first be resolved to itsobj_token. - Message content is JSON text: a text message is
{"text":"hello"}. The text tools build it for you. - Times: message filters and calendar times are Unix seconds; message
create_time, tasks and approvals use Unix milliseconds. All are passed as text. - Errors come as a JSON body with a non-zero
codeand amsg, often with HTTP 200 or 400.99991672names the scope that is missing: add it and release a new app version.99991663means the token was refused (wrong host for the app, or the app is disabled). - Access is per resource: a scope alone is not enough. The bot must be a member of a chat, and a document, wiki, Base or calendar must be shared with the app. A "no permission" or "forbidden" answer for a single item means exactly that.
- Rate limits: most calls 50 per second and 1,000 per minute per app; sending is limited to 5 messages per second per chat or person; Base calls 20 per second, Base writes 50 per second. Code
99991400means slow down. - Not covered: acting as a user (personal chats, "my tasks", document search), uploading files and images, and creating approval requests.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Microsoft Copilot
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.
- In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
- Enter a Server name (for example
AnythingMCP), a Server description that says what the connector does, and the Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server. - Under authentication, choose API key, set Type to Header and the header name to
X-API-Key, then select Create. - In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
- Try it in the agent's Test pane: ask for something that needs the
Lark / Feishutools. - Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.
Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.
Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.
Available tools
| Tool | What it does |
|---|---|
lark_get_bot_info | Read the bot of this app: app_name, open_id (the id the bot has as a chat member and message sender), avatar_url and activate_status (2… |
lark_list_chats | List the group chats the bot is a member of: chat_id, name, description, owner_id, external (true when people of other organisations take… |
lark_get_chat | Read one group chat: name, description, owner_id, chat_mode, chat_type (private or public), chat_tag, user_count, bot_count, external, and… |
lark_list_chat_members | List the people in a group chat: member_id (open_id by default), name and tenant_key, plus member_total. Bots are not listed. The bot must… |
lark_list_messages | Read the message history of a chat (or of a thread): items[] with message_id, msg_type (text, post, image, file, interactive and so on)… |
lark_get_message | Read one message by its id: items[0] with msg_type, create_time, sender, body.content (JSON text), mentions, chat_id and whether it was… |
lark_send_text_message | Send a text message as the bot to a group chat or to a person. Returns the message with message_id. The bot must be in the group, or the… |
lark_send_message | Send a message of any type as the bot: rich text (post), a card (interactive), a shared chat or user, or an image or file already uploaded… |
lark_reply_to_message | Reply with a text message to a message, as the bot, in the same chat or as a thread. Returns the reply with message_id. The bot must be in… |
lark_edit_message | Replace the text of a text message the bot sent. Members see it marked as edited. Lark allows a message to be edited up to 20 times.… |
lark_recall_message | Recall (delete for everyone) a message the bot sent, within the time the organisation allows for recalls (24 hours by default). As the… |
lark_list_department_users | List the employees directly in a department: name, en_name, open_id, union_id, department_ids, job_title, status (is_activated, is_frozen… |
lark_get_user | Read one employee: name, en_name, open_id, union_id, department_ids, job_title, leader_user_id, city, employee_no, status and, with the… |
lark_lookup_user_ids | Find users by work e-mail address or mobile number: user_list[] with the email or mobile asked for and the user_id found (open_id by… |
lark_list_child_departments | List the departments below a department: name, open_department_id, department_id, parent_department_id, leader_user_id, member_count and… |
lark_list_drive_files | List the files and folders in a Drive folder the app can see: files[] with token, name, type (doc, docx, sheet, bitable, mindnote, file… |
lark_get_document_content | Read the plain text of a Lark document (new Docs, type docx): data.content holds the whole text without formatting. The app needs read… |
lark_get_wiki_node | Resolve a wiki page to the document behind it: node with space_id, title, obj_type (docx, doc, sheet, bitable, mindnote, file), obj_token… |
lark_list_bitable_tables | List the tables of a Base (Bitable): items[] with table_id, name and revision, plus total. The app needs access to the Base (add it under… |
lark_list_bitable_fields | List the fields (columns) of a Base table: field_name, field_id, type (1 text, 2 number, 3 single select, 4 multi select, 5 date, 7… |
lark_search_bitable_records | Read the records (rows) of a Base table, optionally filtered and sorted: items[] with record_id and fields (keyed by field name; text… |
lark_create_bitable_record | Add one record (row) to a Base table. Returns the record with record_id and the stored fields. The app needs edit access to the Base. Field… |
lark_update_bitable_record | Change fields of one record of a Base table. Only the fields you pass are overwritten; the others keep their values. Returns the updated… |
lark_delete_bitable_record | Delete one record (row) from a Base table. The row is gone for everyone and can only be brought back from the Base history by a person.… |
lark_list_calendars | List the calendars the app can see: calendar_list[] with calendar_id, summary, description, type (primary, shared, resource), permissions… |
lark_list_calendar_events | List the events of a calendar, optionally within a time range: items[] with event_id, summary, description, start_time and end_time… |
lark_get_calendar_event | Read one calendar event: summary, description, start_time, end_time, status, location, vchat (meeting link), recurrence, reminders and… |
lark_create_calendar_event | Create an event in a calendar the app may write to (its own primary calendar, or a shared calendar where it is a writer). Returns the event… |
lark_add_event_attendees | Invite people, group chats or meeting rooms to a calendar event. Returns the attendees with their attendee_id and rsvp_status. Invited… |
lark_list_tasklists | List the task lists the app can read: items[] with guid, name, creator, owner, members, url, created_at and updated_at (Unix milliseconds).… |
lark_list_tasklist_tasks | List the tasks of a task list: items[] with guid, summary, completed_at (0 while open), start, due (timestamp in Unix milliseconds)… |
lark_get_task | Read one task: summary, description, start, due, completed_at, status (todo or done), members (assignees and followers), tasklists… |
lark_create_task | Create a task, optionally with a due date, assignees and a task list. Returns the task with guid and url. A task created by the app without… |
lark_list_approval_instances | List the ids of the approval requests of one approval definition created within a time range: instance_code_list plus page_token and… |
lark_get_approval_instance | Read one approval request: approval_name, status (PENDING, APPROVED, REJECTED, CANCELED, DELETED), the applicant (user_id, open_id… |
Example prompts
- "Summarise today's messages in the sales group chat."
- "Find all records in our Base table Leads where Status is New."
- "Who works in the Marketing department?"
- "Create a calendar event tomorrow at 10:00 and invite Wang Lei."
- "Show the approval requests submitted this week."
FAQ
What do I need to set up? A custom app in the Lark or Feishu developer console: copy the App ID and App Secret, enable Bot, add the scopes of the areas you want, and have an organisation admin approve the released version. Then add the bot to the group chats and share the documents, Bases and calendars with the app. A Lark app does not work on the Feishu host and the other way round.
What can it see? Only what the app and its bot were given: the chats the bot is in, the directory range you set, and the documents, wikis, Bases and calendars shared with it. It never reads a user's private chats or files. Acting as a user, uploading files and creating approval requests are not covered.
Which tools install switched off? lark_recall_message and lark_delete_bitable_record. Switch them on on the connector page only if the AI should use them.
Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.
What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.
The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.
Next steps
Was this guide helpful?