Skip to main content

MCP Server My Lark Doc

A Model Context Protocol server for searching and accessing Lark(Feishu) documents.

Features

Document Content Access

  • Supports both Lark Doc and Wiki document types
  • Automatically handles document type detection and ID extraction
  • Returns raw content in text format for LLM processing

Authentication

  • OAuth-based user authentication
  • Automatic token refresh and expiration management
  • Customizable OAuth callback server

Error Handling

  • Comprehensive error reporting for authentication issues
  • Clear feedback for invalid document URLs
  • Detailed error messages for troubleshooting

Installation

uvx mcp-server-my-lark-doc

Configuration

Get your Lark App ID and App Secret

Visit the Lark Open Platform: https://open.larkoffice.com/app

Make Sure your Lark App has Permissions below

wiki:wiki:readonly
wiki:node:read
docx:document:readonly
search:docs:read

Environment Variables

Before using this MCP server, you need to set up your Lark application credentials:

  1. Create a Lark application in Lark Open Platform
  2. Get your App ID and App Secret
  3. Configure environment variables:
export LARK_APP_ID="your_app_id"
export LARK_APP_SECRET="your_app_secret"
export OAUTH_HOST="localhost"               # OAuth callback server host (default: localhost)
export OAUTH_PORT="9997"                   # OAuth callback server port (default: 9997)

Usage

Configure in Claude desktop:

"mcpServers": {
    "lark_doc": {
        "command": "uvx",
        "args": ["mcp-server-my-lark-doc"],
        "env": {
            "LARK_APP_ID": "your app id",
            "LARK_APP_SECRET": "your app secret",
            "OAUTH_HOST": "localhost",   // optional   
            "OAUTH_PORT": "9997"        // optional  
        }
    }
}

Available Tools

  1. get_lark_doc_content

  2. search_wiki

    • Purpose: Search documents in Lark Wiki
    • Args:
      • query (string) - Search keywords
      • page_size (int, optional) - Number of results to return (default: 10)
    • Returns: JSON string containing search results with following fields:
      • title: Document title
      • url: Document URL
      • create_time: Document creation time
      • update_time: Document last update time

Error Messages

Common error messages and their solutions:

  • "Lark client not properly initialized": Check your LARK_APP_ID and LARK_APP_SECRET
  • "Invalid Lark document URL format": Verify the document URL format
  • "Failed to get document content": Check document permissions and token validity
  • "Failed to get app access token": Check your application credentials and network connection
  • "Failed to get wiki document real ID": Check if the wiki document exists and you have proper permissions
  • "Document content is empty": The document might be empty or you might not have access to its content
  • "Authorization timeout": ser didn't complete authorization within 5 minutes

Development Notes

OAuth Callback Server

Default configuration:

  • Host: localhost

  • Port: 9997 Customize via environment variables:

  • OAUTH_HOST: Set callback server host

  • OAUTH_PORT: Set callback server port

License

MIT License

Metadata

Release files for mcp-server-my-larksuite-doc 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-my-larksuite-doc 0.0.2
File Size Uploaded
mcp_server_my_larksuite_doc-0.0.2.tar.gz 66.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-my-larksuite-doc 0.0.2
File Interpreter ABI Platform
mcp_server_my_larksuite_doc-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 74.6 kB

Release files / mcp_server_my_larksuite_doc-0.0.2.tar.gz

Download URL mcp_server_my_larksuite_doc-0.0.2.tar.gz
Size 66.6 kB
Tags Source
SHA-256 checksum
How to use checksums
74d4cc98b5f963f3f5a8f3dd83869ed25976240f70c3f5de8b0a05aab83c64be
BLAKE2b-256 checksum
How to use checksums
f7032c47998bd208c65d8b385474203efb0cf3951de490dc77401a35bb3a2c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / mcp_server_my_larksuite_doc-0.0.2-py3-none-any.whl

Download URL mcp_server_my_larksuite_doc-0.0.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f40a4b85ae6a39eada076041ca9a9d22f1cc6d26a458283c8123fb8d94d19efb
BLAKE2b-256 checksum
How to use checksums
d23b89f1009ce3be8e0e6e3d17b63ee843561c2dbd04599b1907db03fbeae698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page