Skip to main content
Glama
T0UGH

MCP Server My Lark Doc

by T0UGH

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

Related MCP server: feishu-mcp-server

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

Available Tools

2 tools
get_lark_doc_contentC

Get Lark document content

Args:
    documentUrl: Lark document URL
ParametersJSON Schema
NameRequiredDescriptionDefault
documentUrlYes

TDQS

C2.1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description provides no behavioral information beyond the basic action. With no annotations, the description should disclose safety (e.g., read-only), authentication requirements, or error behavior, but it says nothing. This leaves the agent blind to important execution traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short, but this is under-specification rather than conciseness. It lacks structure, such as separating the main description from parameter details. Every sentence does not earn its place because more essential information is omitted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and a single parameter, the description should explain the return value, expected behavior, and constraints (e.g., URL must be accessible). It provides nothing, making it wholly incomplete for an AI agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no description for the 'documentUrl' parameter, and the description only repeats the parameter name ('documentUrl: Lark document URL') without clarifying format, validity rules, or examples. Schema coverage is 0%, and the description fails to compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('Lark document content'), distinguishing it from the sibling 'search_wiki' which searches rather than retrieves content. However, it does not specify the format or scope of 'content' (e.g., plain text, structured data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidance is provided. The description does not mention when to use this tool instead of 'search_wiki' or any other alternative. It simply states the function without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_wikiC

Search Lark Wiki

Args:
    query: Search keywords
    page_size: Number of results to return (default: 10)
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
page_sizeNo

TDQS

C2.1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It fails to mention any side effects, rate limits, authentication needs, or result structure. The description is completely silent on behavioral aspects beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (two lines for parameters) and follows a docstring format. While it is concise, it may be too sparse, omitting useful information that could fit without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should explain return values. It does not describe what the search results contain. Additionally, with a sibling tool available, no clarification of relationship is provided, leaving the agent with incomplete context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must add meaning. It describes 'query' as 'Search keywords' and 'page_size' as 'Number of results to return (default: 10).' This adds minimal semantics but does not explain expected format or behavior beyond defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Search Lark Wiki,' which clearly indicates a search verb and resource. However, it does not differentiate from the sibling tool get_lark_doc_content, which might retrieve content of a specific document. The purpose is clear but lacks distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use search_wiki versus the sibling tool get_lark_doc_content. The description does not mention alternatives or exclusions, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.6
    • First observedget_lark_doc_content
    • First observedsearch_wiki

TDQS

C2.5/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one retrieves document content by URL, the other searches the wiki by keywords. There is no ambiguity or overlap.

Naming Consistency5/5

Both tools use a consistent verb_noun pattern with snake_case: 'get_lark_doc_content' and 'search_wiki'. The naming convention is uniform and predictable.

Tool Count2/5

With only 2 tools, the server feels underdeveloped for a document/wiki domain. Typical servers of this scope would include list, create, update, or delete operations, making this minimal.

Completeness2/5

The tool surface is incomplete for Lark Doc: it only provides content retrieval and wiki search, but lacks essential operations like listing documents, editing, or managing wiki pages. Major gaps exist.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/T0UGH/mcp_server_my_lark_doc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server