mapeye-mcp-server
v1.0.0
Published
MapEye MCP Server — 地图样式资源自动化检验,支持 AI 调用
Maintainers
Readme
👁️ mapeye-mcp-server
MCP Server for MapAsset Validation — 让 AI 能够自动检测地图样式资源的完整性、一致性和异常值。
安装
方式一:npx 直接运行(发布后)
npx mapeye-mcp-server方式二:从源码运行
git clone <repo>
cd mapeye-mcp-server
npm install
npm run build
node dist/index.js配置
Kiro / VS Code
.kiro/settings/mcp.json 或 .vscode/settings.json:
{
"mcpServers": {
"mapeye": {
"command": "npx",
"args": ["mapeye-mcp-server"]
}
}
}从源码配置
{
"mcpServers": {
"mapeye": {
"command": "node",
"args": ["/path/to/mapeye-mcp-server/dist/index.js"]
}
}
}Tools(6 个)
1. validate_mapasset
一键全量检测,返回完整报告。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 |
返回:文件统计、错误/警告/提示数量、各检测模块详细结果。
2. scan_mapasset
扫描文件夹,返回分类统计。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 |
返回:各类文件(style/config/icon/material 等)的数量和文件名列表。
3. check_styleiconslist
检测 styleiconslist.data 完整性。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 |
返回:注册文件列表、磁盘缺失文件、未注册文件。
4. check_config_scenes
检测 config 场景配置。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 |
返回:每个 config 文件的场景数、缺失 style、重复场景。
5. check_image_dimensions
检测图片尺寸异常。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 |
返回:尺寸为 0 或超过 4096 的图片列表。
6. check_icon_references
检测已解密 JSON 中的 icon 引用是否存在。需配合 mapasset-mcp-server 的 convert_data_to_json 使用。
| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | folderPath | string | ✅ | MapAsset 文件夹绝对路径 | | jsonData | object | ✅ | 已解密的 style/material JSON | | sourceFile | string | ❌ | 来源文件名 |
返回:引用的 icon 总数、缺失的 icon 列表。
Resources(2 个)
| 资源 | URI | 说明 |
|------|-----|------|
| 检测项说明 | mapeye://docs/check-items | 全部检测项的详细说明 |
| 文件类型说明 | mapeye://docs/file-types | MapAsset 各类文件的命名规则和用途 |
Prompts(2 个)
| Prompt | 说明 |
|--------|------|
| validate-workflow | 完整检测工作流指引,引导 AI 按步骤执行检测 |
| fix-suggestions | 根据检测结果给出修复建议 |
与 mapasset-mcp-server 配合使用
MapEye 的文件存在性检测不依赖任何外部工具。但对于 .data 文件的内容级深度检测(icon 引用、关联性、异常值),需要先用 mapasset-mcp-server 解密:
AI 工作流:
1. mapeye: validate_mapasset → 获取基础检测报告
2. mapasset: convert_data_to_json → 解密 style/material 文件
3. mapeye: check_icon_references → 检测解密后的 icon 引用发布到 npm
npm login
npm publish发布后用户即可通过 npx mapeye-mcp-server 使用。
