maDMP架构MCP服务器
 
用于搜索和引用中定义的实体的MCP服务器 $defs maDMP(机器可操作数据管理计划)模式(1.2版)。
特性
MCP工具
| 工具名称 | 描述 |
|---|---|
list_definitions | 返回架构中所有定义名称和描述的列表 |
search_definitions | 按关键字搜索定义(名称和描述不区分大小写的部分匹配) |
get_definition | 检索给定定义名称的完整JSON模式结构(使用 $ref 分辨率选项) |
MCP资源
| URI模板 | 描述 |
|---|---|
schema://madmp/defs/{name} | 返回指定定义的JSON模式 $ref 断然的。支持列表和姓名填写 |
技术栈
- 语言:TypeScript(ES2022、ESM)
- MCP-SDK:
@modelcontextprotocol/sdk - 验证:Zod v4
- 测试:Vitest
- 过梁/格式化工具:ESLint+Prettier
设置
git clone
cd dmp-cs-madmp-schema-mcp
npm install脚本
npm run build # TypeScript compilation
npm run dev # Development run with tsx
npm start # Run compiled JS
npm test # Run tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage
npm run lint # ESLint check
npm run lint:fix # ESLint auto-fix
npm run typecheck # Type checking
npm run format # Prettier format
npm run format:check # Prettier format check项目结构
src/
├── index.ts # Entry point (server startup)
├── tools.ts # MCP tool registration
├── tools.test.ts # Tool tests
├── resources.ts # MCP resource registration
├── resources.test.ts # Resource tests
└── utils/
├── schema-loader.ts # Schema loading, index building, $ref resolution
└── schema-loader.test.ts # Schema loader tests
schema/
└── 1.2/
└── maDMP-schema-1.2.json # maDMP schema fileMCP客户端配置示例
{
"mcpServers": {
"madmp-schema": {
"command": "node",
"args": ["dist/index.js"]
}
}
}模式信息
本项目参考 schema/1.2/maDMP-schema-1.2.json 并针对中定义的每个实体 $defs 搜索部分(隶属关系、联系人、成本、数据集、项目等)。
许可证
看 许可证.
