Skip to main content

MCP Server Doc

A Model Context Protocol server for searching and accessing Lark 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-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"

Usage

Configure in Claude desktop:

"mcpServers": {
    "lark_doc": {
        "command": "uvx",
        "args": ["mcp-server-doc"],
        "env": {
            "LARK_APP_ID": "your app id",
            "LARK_APP_SECRET": "your app secret",
        }
    }
}

Available Tools

  1. get_lark_doc_content

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

License

MIT License

Metadata

Release files for mcp-server-lark-doc 0.0.1

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-lark-doc 0.0.1
File Size Uploaded
mcp_server_lark_doc-0.0.1.tar.gz 51.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-lark-doc 0.0.1
File Interpreter ABI Platform
mcp_server_lark_doc-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 57.4 kB

Release files / mcp_server_lark_doc-0.0.1.tar.gz

Download URL mcp_server_lark_doc-0.0.1.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8171ac424b2204649bd7100cce64cc4fe250e2ce36edfba1edcb74b4a3b14302
BLAKE2b-256 checksum
How to use checksums
f8913f442f40e5b9fbc2ff69ec5396b7dcf659f41761dccd24f09bd45dd92369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / mcp_server_lark_doc-0.0.1-py3-none-any.whl

Download URL mcp_server_lark_doc-0.0.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f390135e8092658cd4378a6f206604a88a302534f7555e8f39623c9b6d2c467
BLAKE2b-256 checksum
How to use checksums
a3502db201efab320a8dddaf7b0b4d876423365d2385a1004a16adaffb0ce9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.0.1 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