feat(mcp): platform-mcp —— EIP4 MCP server 标准接入 Claude Code/Codex/OpenCode (G2)
- 新增 platform-mcp 模块(stdio MCP server,MCP Java SDK 1.1.0 / jackson2 路线) - 注册 7 个 MCP 工具:eip4_auto_develop / list_page_recipes / validate_page_schema / list_components / access_check / list_entities / entity_attributes 忠实转发 EIP4 REST,复用人审红线(产物恒 READY_FOR_HUMAN_REVIEW),不另开权限面 - 工具逻辑 TDD(Eip4McpTools 9 单测,注入 mock REST client) - 真实 stdio JSON-RPC e2e:initialize 协商 + tools/list 返回 7 工具(schema 正确) + tools/call 链路(死端口优雅 isError) - 坑:父 pom 为 amis 校验钉死 networknt 1.5.2,与 MCP 需要的 2.0.0(含 dialect.Dialects) 冲突 → platform-mcp 显式覆盖 2.0.0(仅本模块) - 文档:GAP 标记 G2 完成、平台 README + skills/README 加 MCP 接入说明 接入:claude mcp add eip4 -- java -jar platform-mcp/target/platform-mcp-0.1.0-SNAPSHOT.jar --base-url <env> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ EIP4 平台正式工程(路线 A'):双层制模块化单体——**保真层供
|
||||
| platform-flow-gateway | P3 占位:Flowable 网关 | |
|
||||
| platform-ai | P5 AI Agent 开发底座:草稿/变更包/本地门禁/自动修复/人工部署包 | Agent 不直连线上执行生产变更 |
|
||||
| platform-cli | EIP4 Agent 受控命令入口:`init` 一键接入(Claude Code/Codex/OpenCode)、环境探测、AI 自动开发、发布编排 | Agent 优先通过 CLI/API 操作 |
|
||||
| platform-mcp | EIP4 MCP server(stdio):把 AI/元数据 REST 端点包成 MCP 工具,供 Claude Code/Codex/OpenCode 经标准协议接入 | 忠实转发 REST,复用人审红线,不另开权限面 |
|
||||
| platform-parity | C1 对拍框架:录制/重放/RowDiff/自对拍 CLI | P1 一级交付物 |
|
||||
| platform-app | Boot 启动器,组装全部模块 | ArchUnit 规则在此模块测试里 |
|
||||
|
||||
@@ -95,6 +96,11 @@ java -jar platform-cli/target/platform-cli-0.1.0-SNAPSHOT.jar release import-pre
|
||||
java -jar platform-cli/target/platform-cli-0.1.0-SNAPSHOT.jar release diff --left target/ai-runs/package-old.json --right target/ai-runs/package.json
|
||||
java -jar platform-cli/target/platform-cli-0.1.0-SNAPSHOT.jar release rollback-plan --package-file target/ai-runs/package.eip4pkg.json --output target/ai-runs/rollback-plan.json
|
||||
|
||||
# EIP4 MCP server(stdio):把下面这些 AI/元数据端点包成 MCP 工具,供 Claude Code/Codex/OpenCode 用标准协议调用
|
||||
mvn -pl platform-mcp package
|
||||
claude mcp add eip4 -- java -jar platform-mcp/target/platform-mcp-0.1.0-SNAPSHOT.jar --base-url http://localhost:8093
|
||||
# 或设 EIP4_BASE_URL;默认 http://localhost:8084。手动启动:java -jar platform-mcp/target/platform-mcp-0.1.0-SNAPSHOT.jar
|
||||
|
||||
# Typed page schema
|
||||
curl http://localhost:8084/api/page/schema/components
|
||||
curl -X POST http://localhost:8084/api/page/schema/validate \
|
||||
|
||||
Reference in New Issue
Block a user