Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
validate_code_standards

验证给定的代码片段是否符合 M8 开发规范,返回不符合规范的问题列表和修改建议。

create_page

【推荐使用】一站式 M8 页面生成工具。自动完成:1.加载完整规范 2.生成代码 3.验证规范。用户只需描述页面需求即可,无需手动调用其他工具。

create_ioc_page

【低码组件生成】生成符合 M8 低码平台规范的组件代码。

🔴 重要:此工具会自动在项目根目录执行 npm run ioc create 命令创建组件!

⚠️ 【最重要】优先使用 em-组件库!

  • 轮播/走马灯:必须使用 em-swipe + em-swipe-item,禁止自行实现轮播

  • 图片展示:必须使用 em-image(支持懒加载、失败占位)

  • 列表/单元格:使用 em-cell / em-cell-group

  • 按钮:使用 em-button

  • 弹窗:使用 em-popup / em-dialog

  • 标签:使用 em-tag

  • 下拉刷新:使用 em-minirefresh

  • 只有在组件库没有匹配组件时,才允许自定义实现!

📋 使用前必读 - 开发流程

  1. 指定项目路径:必须提供 project_path 参数,指向包含 package.json 的项目根目录

  2. 自动创建组件:工具会在项目目录下执行 npm run ioc create ComponentName 创建组件目录结构

  3. 返回生成代码:返回完善后的代码内容,由 AI 助手覆盖写入对应文件

  4. ⚠️ 必须检查 base.js:确保 module_name 与组件文件夹名一致,name 为组件中文名

📁 生成的目录结构(自动创建):

  • js/base.js(🔴 必须检查:name 中文名、module_name 必须=目录名、version)

  • js/config.js(属性/事件配置 - 含详细可配置项)

  • mock/data.js(模拟数据 - 需与 index.vue 的数据结构匹配)

  • index.vue(组件主文件 - 🔴 必须使用 em- 组件库)

  • css/index.scss(样式)

  • plugin/eventgenerate/index.js(事件生成插件)

  • plugin/boxoptions/config.js(容器配置插件)

  • index.js(组件注册入口)

📌 支持的配置项类型:

  • text: 文本输入

  • boolean: 开关

  • color: 颜色选择器

  • number: 数字输入

  • image: 图片URL

  • uploadimage: 图片上传(推荐)

  • select: 下拉选择

  • array: 数组配置(配合 dynamic:true 和 template)

💡 配置设计建议

  • 布局类:showTitle, showIcon, showBorder, layout, columns

  • 样式类:backgroundColor, titleColor, titleSize, borderRadius

  • 交互类:clickable, disabled, loading

  • 数据类:使用 array 类型支持动态列表

get_prompt

获取配置给 AI (Cursor/Windsurf) 的最佳 System Prompt,包含核心规范和工具调用指令。建议将其复制到 .cursorrules 或 .windsurfrules 文件中。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/lipeng9401222/m8-codex-mcp'

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