Power Platform编排代理
一种智能会话编排代理,通过与客户端无关的MCP(模型上下文协议)服务器自动化企业级Power Platform项目设置和管理。
概述
此代理将项目设置时间从数周缩短到数小时,同时确保一致性和符合企业标准。它内置了原生MCP(模型上下文协议)集成,提供了一个与客户端无关的接口,可以与任何兼容MCP的客户端一起使用,包括Claude Desktop、自定义应用程序和自动化工具。
主要特点
- 基于模板的项目设置:标准“S项目”模板,有3个环境和12周的持续时间
- Azure DevOps编排:使用MCP服务器实现完整的项目、冲刺和存储库自动化
- 电源平台集成:通过直接API集成进行环境配置和数据模型部署
- 客户端不可知接口:MCP协议支持与任何兼容的客户端(Claude Desktop、自定义应用程序、自动化工具)集成
- 企业安全:服务主体身份验证和全面的审计日志记录
- 零外部依赖:在没有工作流引擎的情况下直接集成API
建筑
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ MCP Clients │ │ Orchestrator │ │ Azure DevOps │
│ Claude Desktop, │───▶│ MCP Server │───▶│ REST APIs │
│ Custom Apps, │ │ │ └─────────────────┘
│ Automation Tools│ │ │
└─────────────────┘ │ │ ┌─────────────────┐
│ │───▶│ Power Platform │
│ │ │ REST APIs │
└─────────────────┘ └─────────────────┘技术栈
- MCP协议:支持多个客户端的与客户端无关的集成层
- Azure DevOps MCP:项目和工作项管理
- Power平台API:直接Dataverse Web API和Admin API集成
- TypeScript:强类型企业级代码库
- Node.js:运行时环境
快速开始
MCP客户端使用(推荐)
# Install globally for npx usage
npm install -g power-platform-orchestration-agent
# Run MCP server
npx power-platform-orchestrator
# Or install locally and run
git clone https://github.com/your-org/power-platform-orchestration-agent
cd power-platform-orchestration-agent
npm install
npm run build
npm run start:mcp为了发展
# Clone and install
git clone https://github.com/your-org/power-platform-orchestration-agent
cd power-platform-orchestration-agent
npm install
# Copy environment template
cp .env.example .env
# Configure your environment variables
# Edit .env with your Azure credentials
# Build the project
npm run build
# Start MCP server in development mode
npm run mcp:dev配置
所需的环境变量
最低设置(建议首次使用):
# Azure DevOps Configuration
AZURE_DEVOPS_ORG=your-org-name
AZURE_DEVOPS_PAT=your-personal-access-token
# Azure Authentication
AZURE_USE_INTERACTIVE_AUTH=true
AZURE_TENANT_ID=your-tenant-id完整设置(如果您已经有服务负责人):
# Azure DevOps Configuration
AZURE_DEVOPS_ORG=your-org-name
AZURE_DEVOPS_PAT=your-personal-access-token
# Azure Service Principal
AZURE_CLIENT_ID=your-service-principal-client-id
AZURE_CLIENT_SECRET=your-service-principal-secret
AZURE_TENANT_ID=your-tenant-id备注:如果您还没有Azure服务主体,系统可以通过交互式身份验证帮助创建Azure服务主体。
MCP集成
该项目提供了一个统一的MCP服务器,可以协调多种服务集成:
可用的MCP工具
create_project-使用Azure DevOps集成创建新的Power Platform项目get_project_status-监控项目创建进度和状态list_templates-列出可用的项目模板validate_prd-验证项目需求文件get_template_details-获取详细的模板信息
服务集成
- Azure DevOps:项目创建、工作项管理、存储库设置
- Power Platform:环境配置、解决方案管理、组件部署
- 微软图形:应用注册、服务主体创建、权限管理
客户端配置
对于Claude Desktop,添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"power-platform-orchestrator": {
"command": "npx",
"args": ["power-platform-orchestration-agent"],
"env": {
"AZURE_DEVOPS_ORG": "your-org",
"AZURE_DEVOPS_PAT": "your-token",
"AZURE_CLIENT_ID": "your-client-id",
"AZURE_CLIENT_SECRET": "your-secret",
"AZURE_TENANT_ID": "your-tenant-id"
}
}
}
}项目结构
src/
├── integrations/ # MCP server integrations
│ ├── azure-devops/ # Azure DevOps API client
│ └── power-platform/ # Power Platform API client
├── templates/ # Project templates (YAML)
├── workflows/ # Orchestration logic
├── config/ # Configuration management
├── types/ # TypeScript interfaces
└── utils/ # Shared utilities发展
可用脚本
npm run mcp:dev # Start MCP server in development mode
npm run start:mcp # Start MCP server (production)
npm run build # Build TypeScript
npm run test # Run tests
npm run lint # Check code style
npm run typecheck # Run TypeScript checks代码质量标准
- 零容忍
any类型 -企业级安全型 - 全面的接口 -自文档化代码
- TDD方法 -集成优先测试(60/30/10分割)
- API直接集成 -无CLI依赖关系
文档
测试
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm run test:coverage贡献
- 遵循TypeScript严格模式指南
- 保持零
any类型策略 - 为新功能编写集成测试
- 更新API变更文档
许可证
MIT许可证-请参阅 许可证 了解详情。
