lark-wiki-migration

lark-wiki-migration

MCP server for migrating Feishu/Lark wiki spaces, preserving the document tree structure via the migrate_feishu_wiki tool.

Category
Visit Server

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

  1. Lark CLI installed and configured:
    lark-cli config init
    
  2. User authentication completed:
    lark-cli auth login --domain all
    
  3. 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-migrate command into ~/.local/bin
  • Automatically install the Claude Code skill if ~/.claude/skills is 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.

  1. Configure the MCP server:

    {
      "mcpServers": {
        "lark-wiki-migration": {
          "command": "python3",
          "args": ["/absolute/path/to/mcp_server.py"]
        }
      }
    }
    
  2. The client will expose a migrate_feishu_wiki tool that accepts:

    • source: source wiki URL or token
    • target: target wiki URL or token
    • dry_run: optional, scan only without creating anything

How It Works

  • lark-cli docs +fetch reads the source document XML
  • lark-cli docs +create --doc-format xml creates 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 structure
  • migration_state.json: resumable migration state
  • manifest.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-cli login 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured