lark-wiki-migration
MCP server for migrating Feishu/Lark wiki spaces, preserving the document tree structure via the migrate_feishu_wiki tool.
README
English | 中文
Lark Wiki Migration
A cross-AI-product migration tool for Feishu (Lark) wiki spaces. Give it a source wiki link and a target wiki link, and it migrates all docx documents from the source space to the target, preserving the tree structure.
Available through:
- CLI:
lark-wiki-migrate <source> <target> - Claude Code skill: triggered by natural language
- MCP Server: any MCP-compatible AI product (Codex, Workbuddy, etc.)
Prerequisites
- Lark CLI installed and configured:
lark-cli config init - User authentication completed:
lark-cli auth login --domain all - The logged-in account must have both:
- Read permission on the source wiki space
- Create document permission on the target wiki space
Installation
git clone https://github.com/LiChunyu77/lark-wiki-migration.git
cd lark-wiki-migration
./install.sh
install.sh will:
- Symlink the
lark-wiki-migratecommand into~/.local/bin - Automatically install the Claude Code skill if
~/.claude/skillsis detected
After installation, make sure ~/.local/bin is in your PATH:
export PATH="$HOME/.local/bin:$PATH"
CLI Usage
# Migrate
lark-wiki-migrate "https://my.feishu.cn/wiki/SOURCE" "https://my.feishu.cn/wiki/TARGET"
# Preview only, create nothing
lark-wiki-migrate "https://my.feishu.cn/wiki/SOURCE" "https://my.feishu.cn/wiki/TARGET" --dry-run
# Skip confirmation
lark-wiki-migrate "https://my.feishu.cn/wiki/SOURCE" "https://my.feishu.cn/wiki/TARGET" --yes
Claude Code Usage
Restart Claude Code after installation, then say:
Migrate https://my.feishu.cn/wiki/SOURCE to https://my.feishu.cn/wiki/TARGET
Claude will automatically invoke lark-wiki-migrate and return the result.
MCP Server Usage
Works with any MCP-compatible AI client.
-
Configure the MCP server:
{ "mcpServers": { "lark-wiki-migration": { "command": "python3", "args": ["/absolute/path/to/mcp_server.py"] } } } -
The client will expose a
migrate_feishu_wikitool that accepts:source: source wiki URL or tokentarget: target wiki URL or tokendry_run: optional, scan only without creating anything
How It Works
lark-cli docs +fetchreads the source document XMLlark-cli docs +create --doc-format xmlcreates native docx documents under the target wiki- Recursively walks the source wiki tree, preserving the hierarchy
Output
Each migration creates a dedicated working directory under ~/lark-wiki-migrations/ by default:
~/lark-wiki-migrations/
└── wiki-migration-<slug>-<timestamp>/
├── manifest.json
├── source_tree.json
└── migration_state.json
source_tree.json: source wiki structuremigration_state.json: resumable migration statemanifest.json: metadata for this migration run
Environment Variables
export LARK_WIKI_MIGRATION_DIR=~/my-migrations # Custom working directory base path
Notes
- Only docx documents are migrated; embedded spreadsheets, bitables, whiteboards, and similar objects are not fully migrated
- Images and attachments are usually preserved, but access-restricted resources may fail
- The tool only uses the local
lark-clilogin session; it does not collect, upload, or store any credentials - The tool operates through official APIs and can only access content your account already has permission to access — it does not bypass any permission restrictions
- Compared with manually copying/exporting documents one by one, this tool supports batch migration, preserves the wiki hierarchy, and can resume interrupted migrations
- Make sure you have legitimate access to both the source and target wiki spaces
- Use of this tool must comply with the Feishu Open Platform terms of service and your organization's IP policies
License
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.