Skip to main content
Glama
mingle98

LuckyCola MCP Server

by mingle98

LuckyCola MCP 服务

基于LuckyCola开放能力的MCP(Model Context Protocol)服务。

功能特性

  • 标准化的MCP接口,兼容各种MCP客户端

  • 环境变量配置,安全便捷

  • 在线图片合规性检查,确保内容安全

  • 菜谱查询工具,获取菜品制作方法

  • 丰富的文件操作功能,支持文件修改、删除、重命名等

  • 图片压缩功能,优化图片大小

  • 图片OCR功能,轻松获取图片中的文字信息

Related MCP server: GLM-4.5V MCP Server

安装依赖

cd luckycola-mcp
yarn install

编译项目

yarn build

环境变量配置

设置以下环境变量:

export LUCKYCOLA_OPEN_KEY="你账户在LuckyCola平台的APPKey"
export LUCKYCOLA_OPEN_UID="你账户在LuckyCola平台的uid"
export MCP_FILE_PATH="希望进行文件/图片操作的目录路径,例如: /Users/yourname/Desktop/testDir"

nodejs版本要求:v21.0.0及以上

获取API密钥和UID

  1. 访问 LuckyCola官网-用户中心

  2. 登录后进入"用户中心"页面,获取APPKey和用户ID(uid)

  3. 确保账号已相关API权限及额度

使用方法

直接运行

node build/index.js

作为MCP服务器

在MCP客户端(如Claude Desktop、Cursor等)中配置此服务:

npx方式使用

{
  "mcpServers": {
    "luckycola-mcp": {
      "command": "npx",
      "args": ["-y", "luckycola-mcp"],
      "env": {
        "LUCKYCOLA_OPEN_KEY": "你的APPKey",
        "LUCKYCOLA_OPEN_UID": "你的UID",
        "MCP_FILE_PATH": "希望进行文件/图片操作的目录路径,例如: /Users/yourname/Desktop/testDir"
      }
    }
  }
}

下载到本地使用

{
  "mcpServers": {
    "luckycola-mcp": {
      "command": "node",
      "args": ["/path/to/luckycola-mcp/build/index.js"],
      "env": {
        "LUCKYCOLA_OPEN_KEY": "你的APPKey",
        "LUCKYCOLA_OPEN_UID": "你的UID",
        "MCP_FILE_PATH": "希望进行文件/图片操作的目录路径,例如: /Users/yourname/Desktop/testDir"
      }
    }
  }
}

API接口

checkImage

检查在线图片是否合规的工具

参数:

参数名

类型

说明

imgUrl

string

需要检查的图片URL

返回:

  • 成功时返回图片合规性检测结果,包括安全状态、安全分数、检测详情等。

  • 失败时返回错误信息。

返回示例:

{
  "content": [
    {
      "type": "text",
      "text": "图片合规检测结果:\n\n提示: ...\n安全状态: 合规\n安全分数: 99.00%\n检测详情: {...}"
    }
  ]
}

getFoodMenu

获取菜品的菜谱(制作方法)

参数:

参数名

类型

说明

foodTitle

string

需要查询的菜品名称

返回:

  • 成功时返回菜谱详情,包括简介、图片、步骤、注意事项、配料、时长等。

  • 失败时返回错误信息。

返回示例:

{
  "content": [
    {
      "type": "text",
      "text": "番茄炒蛋的菜谱结果如下:\n\n{\"intro\":\"...\",\"image\":\"...\",\"steps\":[...],\"notice\":\"...\",\"ingredients\":[...],\"duration\":\"...\"}"
    }
  ]
}

使用示例

// 在MCP客户端中调用
// 检查图片合规
await callTool("checkImage", { imgUrl: "https://example.com/image.jpg" });

// 获取菜谱
await callTool("getFoodMenu", { foodTitle: "番茄炒蛋" });

文件操作工具(fileOperation)

重要说明: 使用文件操作工具前,建议先对AI说【"请对MCP_FILE_PATH目录下的文件进行接下来的任务"】,以确保AI明确操作目录。

fileOperation工具支持对MCP_FILE_PATH目录下的文件进行多种操作,包括:删除、重命名、读取、写入、列出文件、JSON与Excel互转、图片压缩、图片OCR识别等。每种操作均有对应参数和典型场景,详见下表和案例。

操作类型与参数说明

操作类型(operation)

说明

主要参数

典型场景与提示词示例

delete

删除指定文件

filename

删除test.txt文件:"请删除test.txt文件"

rename

重命名文件

filename, newFilename

文件重命名:"请把a.docx重命名为b.docx"

read

读取文件内容(支持docx纯文本)

filename

读取内容:"请读取test.txt的内容""请读取word文档a.docx内容"

write

写入/追加内容到文件(支持docx)

filename, content, mode

覆盖写入:"请将'你好世界'写入test.txt"追加写入:"请在test.txt追加'再见'"

list

列出目录下文件(可只列文件)

onlyFiles

查看文件列表:"请列出目录下所有文件""只列出普通文件"

json2xlsx

JSON转Excel(.xlsx)

filename, content

"请将以下JSON内容保存为excel文件data.xlsx:{...}"

xlsx2json

Excel转JSON

filename, newFilename

"请将data.xlsx转换为JSON文件"

compressImage

图片压缩(支持jpg/png/gif)

filename, quality, output

"请压缩图片a.png,质量80,输出为a_compressed.png"

ocrToImageBase64

图片OCR识别(jpg/png,≤2M)

filename

"请识别图片a.jpg中的文字"

详细参数说明

  • filename:要操作的文件名(相对于MCP_FILE_PATH)

  • newFilename:新文件名(重命名/转换时用)

  • content:写入内容或json2xlsx的JSON字符串

  • mode:写入模式,append为追加,overwrite为覆盖,默认覆盖

  • onlyFiles:list操作时是否只列普通文件,默认false

  • quality:图片压缩质量,1-100,默认80

  • output:压缩后输出文件名,默认在原文件名后加_compressed

使用案例与推荐提示词

1. 删除文件

请删除test.txt文件

2. 重命名文件

请把a.docx重命名为b.docx

3. 读取文件内容

请读取test.txt的内容
请读取word文档a.docx内容

4. 写入/追加内容到文件

请将"你好世界"写入test.txt
请在test.txt追加"再见"

5. 列出目录下文件

请列出目录下所有文件
只列出普通文件

6. JSON转Excel

请将以下JSON内容保存为excel文件data.xlsx:[{"姓名":"张三","年龄":18},{"姓名":"李四","年龄":20}]

7. Excel转JSON

请将data.xlsx转换为JSON文件

8. 图片压缩

请压缩图片a.png,质量80,输出为a_compressed.png

9. 图片OCR识别

请识别图片a.jpg中的文字

注意事项:

  • 文件操作均在MCP_FILE_PATH指定目录下进行,确保有读写权限。

  • 图片OCR仅支持jpg/png格式且文件≤2M。

  • 图片压缩支持jpg/png/gif,gif为动图时会自动处理色彩数。

  • Excel/Word操作请确保文件扩展名正确(.xlsx/.docx)。

  • 若遇权限错误,请参考下方"故障排除"章节。

项目结构

luckycola-mcp/
├── build/                  # 编译后输出目录
├── src/                    # 源码目录
│   ├── api/                # API接口配置
│   │   └── index.ts
│   ├── config/             # 配置相关
│   │   └── constants.ts
│   ├── services/           # 业务服务
│   │   └── service.ts
│   ├── types/              # 类型定义
│   │   └── index.ts
│   ├── utils/              # 工具函数
│   │   └── index.ts
│   └── index.ts            # 入口文件
├── package.json
├── tsconfig.json
├── LICENSE
└── README.md

工具函数说明

  • formatQuery(parameters: Record<string, string>): string
    用于将对象参数格式化为URL查询字符串,按key排序。


注意事项

  1. 确保网络连接正常,能够访问LuckyCola API

  2. API调用需要消耗额度,请注意使用量

故障排除

常见错误

  1. 环境变量未设置:确保设置了正确的APPKey和uid

  2. 网络连接问题:检查网络连接和防火墙设置

  3. API配额不足:检查LuckyCola账户余额和API调用次数

  4. 提示词不合规:确保提示词符合内容安全规范

  5. npx权限问题:当正确配置但无法成功连接时,可能是npx权限问题,可以在控制台直接执行:【npx -y luckycola-mcp】 查看是否有相关报错提示

许可证

ISC License

Available Tools

3 tools
checkImageC

检查在线图片内容是否合规

ParametersJSON Schema
NameRequiredDescriptionDefault
imgUrlYes需要检查的图片URL

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks compliance but doesn't explain what '合规' (compliant) means, what standards are used, whether it's a read-only or mutation operation, potential side effects, or response behavior. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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

Conciseness5/5

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

The description is a single, clear sentence: '检查在线图片内容是否合规'. It is front-loaded with the core purpose and contains no unnecessary words or redundancy, making it highly efficient and easy to parse.

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

Completeness2/5

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

Given the complexity of a compliance-checking tool with no annotations and no output schema, the description is insufficient. It doesn't explain what '合规' entails, what the output might look like (e.g., pass/fail, details), or any behavioral traits like error handling. This leaves the agent with incomplete context for effective use.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'imgUrl' documented as '需要检查的图片URL' (URL of the image to check). The description doesn't add any additional meaning beyond this, such as format details or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter documentation.

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 tool's purpose as '检查在线图片内容是否合规' (check if online image content is compliant). It specifies the verb '检查' (check) and the resource '在线图片内容' (online image content), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'fileOperation' or 'getFoodMenu', which are unrelated, so it doesn't fully address sibling 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, exclusions, or contexts for usage. While sibling tools are unrelated, the lack of any usage context or comparison leaves the agent without direction on applicability.

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

fileOperationC

对FILE_PATH目录下的文件进行删除、重命名、读取和写入操作,以及图片压缩

ParametersJSON Schema
NameRequiredDescriptionDefault
operationYes操作类型:delete/read/rename/write/list/json2xlsx/xlsx2json/compressImage/ocrToImageBase64
filenameYes要操作的文件名(相对于FILE_PATH),当为json2xlsx任务时为.xlsx的文件名
newFilenameNo新文件名,注意word文件以.docx结尾,excel文件以.xlsx结尾
contentNo写入内容,仅在write时需要
modeNo写入模式,append为追加,overwrite为覆盖,默认覆盖
onlyFilesNolist操作时是否只列普通文件,默认false
qualityNo图片压缩质量,1-100,默认80
outputNo压缩后输出文件名,默认在原文件名后加_compressed

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions operations like delete, rename, read, write, and image compression, implying both read and write capabilities, but doesn't detail critical behaviors such as permission requirements, error handling, rate limits, or what happens during destructive operations like delete. For a multi-operation tool with potential mutations, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is a single, efficient sentence that lists key operations without unnecessary fluff. It's front-loaded with the main actions, though it could be slightly more structured by grouping related operations. There's no wasted text, making it concise, but it lacks depth which affects completeness.

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

Completeness2/5

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

Given the tool's complexity with 8 parameters, multiple operations (including destructive ones like delete), and no annotations or output schema, the description is incomplete. It doesn't cover behavioral aspects, return values, error conditions, or how operations interact. For a tool handling file operations with varied actions, more context is needed to guide the agent effectively.

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

Parameters3/5

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

The schema description coverage is 100%, so the schema already documents all 8 parameters with descriptions and enums. The description adds minimal value beyond the schema by listing operation types and mentioning image compression, but it doesn't provide additional semantics like parameter interactions or usage examples. Given the high schema coverage, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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 the tool performs operations on files in the FILE_PATH directory, listing specific actions like delete, rename, read, write, and image compression. However, it's vague about the exact scope (e.g., 'fileOperation' is generic) and doesn't clearly distinguish from sibling tools like 'checkImage' or 'getFoodMenu', which might have overlapping or related functions. It provides a basic purpose but lacks specificity in differentiation.

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?

The description offers no guidance on when to use this tool versus alternatives like 'checkImage' or 'getFoodMenu'. It lists operations but doesn't specify contexts, prerequisites, or exclusions. For example, it doesn't indicate if 'compressImage' is preferred over other image-related tools or when to choose specific operations. This leaves the agent without clear usage direction.

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

getFoodMenuC

获取菜品的菜谱(制作方法)

ParametersJSON Schema
NameRequiredDescriptionDefault
foodTitleYes需要查询的菜品名称

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets' a recipe, implying a read operation, but doesn't specify whether it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with no annotations, this leaves significant gaps in understanding its behavior 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.

Conciseness5/5

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

The description is a single, efficient sentence: '获取菜品的菜谱(制作方法)' ('Get the recipe (preparation method) for a dish'). It is front-loaded with the core action and resource, with no unnecessary words or redundancy. This makes it highly concise and easy to parse for an agent.

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

Completeness2/5

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

Given the tool's complexity (a single-parameter query tool), the description is minimal. With no annotations and no output schema, the description doesn't explain return values, error handling, or behavioral traits. While the purpose is clear, the lack of additional context makes it incomplete for effective agent use, especially in scenarios requiring nuanced understanding of the tool's operation.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'foodTitle' documented as '需要查询的菜品名称' ('name of the dish to query'). The description adds no additional meaning beyond this, as it doesn't elaborate on parameter formats, examples, or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

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 tool's purpose as '获取菜品的菜谱(制作方法)' which translates to 'Get the recipe (preparation method) for a dish.' This specifies the verb ('get') and resource ('recipe for a dish'), making it clear what the tool does. However, it doesn't distinguish from sibling tools like 'checkImage' or 'fileOperation' since they operate on different domains, but the description itself is unambiguous about its own function.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or scenarios where this tool is preferred over others. With sibling tools like 'checkImage' and 'fileOperation' that might handle related data (e.g., images of food or file operations on recipes), the lack of differentiation leaves the agent without context for selection.

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

TDQS

C2.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: checkImage handles image content compliance, fileOperation manages file system operations, and getFoodMenu retrieves recipe information. The domains (image moderation, file management, cooking) are completely separate, eliminating any risk of tool misselection.

Naming Consistency4/5

The naming follows a consistent verb_noun pattern (checkImage, getFoodMenu, fileOperation), with all tools using camelCase. The only minor deviation is that fileOperation uses 'Operation' as a noun rather than a specific resource, but this is still readable and maintains overall consistency.

Tool Count3/5

With only 3 tools, the count feels thin for a server that appears to cover multiple unrelated domains (image moderation, file operations, and cooking). While each tool is distinct, the set lacks cohesion and might suggest an overly broad or poorly scoped server purpose, making it borderline appropriate.

Completeness2/5

There are significant gaps in coverage for each implied domain. For image moderation, there's no tool to upload or modify images. For file operations, basic CRUD is covered but lacks listing or searching. For cooking, there's no way to create or update recipes. The surface is incomplete, likely causing agent failures in extended workflows.

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables comprehensive image editing operations including resizing, format conversion, cropping, compression, rotation, flipping, and batch processing. Supports JPEG, PNG, WebP, and AVIF formats with quality control and metadata extraction.
    8
    31
    18
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables multimodal AI capabilities through GLM-4.5V API for image processing, visual querying with OCR/QA/detection modes, and file content extraction from various formats including PDFs, documents, and images.
    3
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides OCR services powered by Google's Gemini API to extract text from images via file paths or base64 strings. It enables high-accuracy text recognition and CAPTCHA processing through simple MCP tools.
    7

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/mingle98/luckycola-mcp'

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