power-platform-mcp-connector-suite
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePower Platform MCP Connector Suite
Power Platform MCP连接器套件
Generate comprehensive Power Platform custom connector implementations with Model Context Protocol integration for Microsoft Copilot Studio.
为Microsoft Copilot Studio生成集成Model Context Protocol(MCP)的完整Power Platform自定义连接器实现方案。
MCP Capabilities in Copilot Studio
Copilot Studio中的MCP功能
Currently Supported:
- ✅ Tools: Functions that the LLM can call (with user approval)
- ✅ Resources: File-like data that agents can read (must be tool outputs)
Not Yet Supported:
- ❌ Prompts: Pre-written templates (prepare for future support)
当前已支持:
- ✅ 工具:大语言模型(LLM)可调用的函数(需用户授权)
- ✅ 资源:Agent可读取的类文件数据(必须是工具输出)
暂未支持:
- ❌ 提示词:预编写的模板(可提前为未来支持做准备)
Connector Generation
连接器生成
Create complete Power Platform connector with:
Core Files:
- with
apiDefinition.swagger.jsonx-ms-agentic-protocol: mcp-streamable-1.0 - with connector metadata and authentication
apiProperties.json - with custom C# transformations for MCP JSON-RPC handling
script.csx - with connector documentation
readme.md
MCP Integration:
- POST endpoint for JSON-RPC 2.0 communication
/mcp - McpResponse and McpErrorResponse schema definitions
- Copilot Studio constraint compliance (no reference types, single types)
- Resource integration as tool outputs (Resources and Tools supported; Prompts not yet supported)
创建包含以下内容的完整Power Platform连接器:
核心文件:
- 带有的
x-ms-agentic-protocol: mcp-streamable-1.0apiDefinition.swagger.json - 包含连接器元数据和认证配置的
apiProperties.json - 用于处理MCP JSON-RPC的自定义C#转换脚本
script.csx - 连接器文档
readme.md
MCP集成:
- 用于JSON-RPC 2.0通信的POST 端点
/mcp - McpResponse和McpErrorResponse架构定义
- 符合Copilot Studio约束(无引用类型、单一类型)
- 资源作为工具输出集成(支持资源与工具;暂不支持提示词)
Schema Validation & Troubleshooting
架构验证与故障排查
Validate schemas for Copilot Studio compliance:
- ✅ No reference types () in tool inputs/outputs
$ref - ✅ Single type values only (not )
["string", "number"] - ✅ Primitive types: string, number, integer, boolean, array, object
- ✅ Resources as tool outputs, not separate entities
- ✅ Full URIs for all endpoints
Common issues and fixes:
- Tools filtered → Remove reference types, use primitives
- Type errors → Single types with validation logic
- Resources unavailable → Include in tool outputs
- Connection failures → Verify header
x-ms-agentic-protocol
验证架构是否符合Copilot Studio规范:
- ✅ 工具输入/输出中无引用类型()
$ref - ✅ 仅使用单一类型值(而非)
["string", "number"] - ✅ 原始类型:字符串、数字、整数、布尔值、数组、对象
- ✅ 资源作为工具输出,而非独立实体
- ✅ 所有端点使用完整URI
常见问题与修复方案:
- 工具被过滤 → 移除引用类型,使用原始类型
- 类型错误 → 为单一类型添加验证逻辑
- 资源不可用 → 将资源包含在工具输出中
- 连接失败 → 验证头信息
x-ms-agentic-protocol
Context Variables
上下文变量
- Connector Name: [Display name for the connector]
- Server Purpose: [What the MCP server should accomplish]
- Tools Needed: [List of MCP tools to implement]
- Resources: [Types of resources to provide]
- Authentication: [none, api-key, oauth2, basic]
- Host Environment: [Azure Function, Express.js, etc.]
- Target APIs: [External APIs to integrate with]
- 连接器名称:[连接器的显示名称]
- 服务器用途:[MCP服务器的预期功能]
- 所需工具:[需实现的MCP工具列表]
- 资源:[需提供的资源类型]
- 认证方式:[none, api-key, oauth2, basic]
- 宿主环境:[Azure Function, Express.js等]
- 目标API:[需集成的外部API]
Generation Modes
生成模式
Mode 1: Complete New Connector
模式1:全新完整连接器
Generate all files for a new Power Platform MCP connector from scratch, including CLI validation setup.
从头生成Power Platform MCP连接器的所有文件,包括CLI验证配置。
Mode 2: Schema Validation
模式2:架构验证
Analyze and fix existing schemas for Copilot Studio compliance using paconn and validation tools.
使用paconn和验证工具分析并修复现有架构,使其符合Copilot Studio规范。
Mode 3: Integration Troubleshooting
模式3:集成故障排查
Diagnose and resolve MCP integration issues with Copilot Studio using CLI debugging tools.
使用CLI调试工具诊断并解决Copilot Studio的MCP集成问题。
Mode 4: Hybrid Connector
模式4:混合连接器
Add MCP capabilities to existing Power Platform connector with proper validation workflows.
为现有Power Platform连接器添加MCP功能,并配置合理的验证工作流。
Mode 5: Certification Preparation
模式5:认证准备
Prepare connector for Microsoft certification submission with complete metadata and validation compliance.
准备符合微软认证提交要求的连接器,包含完整元数据和合规验证。
Mode 6: OAuth Security Hardening
模式6:OAuth安全加固
Implement OAuth 2.0 authentication enhanced with MCP security best practices and advanced token validation.
实现集成MCP安全最佳实践的OAuth 2.0认证,并添加高级令牌验证机制。
Expected Output
预期输出
1. apiDefinition.swagger.json
- Swagger 2.0 format with Microsoft extensions
- MCP endpoint: with proper protocol header
POST /mcp - Compliant schema definitions (primitive types only)
- McpResponse/McpErrorResponse definitions
2. apiProperties.json
- Connector metadata and branding (required)
iconBrandColor - Authentication configuration
- Policy templates for MCP transformations
3. script.csx
- JSON-RPC 2.0 message handling
- Request/response transformations
- MCP protocol compliance logic
- Error handling and validation
4. Implementation guidance
- Tool registration and execution patterns
- Resource management strategies
- Copilot Studio integration steps
- Testing and validation procedures
1. apiDefinition.swagger.json
- 带有微软扩展的Swagger 2.0格式
- 包含正确协议头的MCP端点:
POST /mcp - 符合规范的架构定义(仅使用原始类型)
- McpResponse/McpErrorResponse定义
2. apiProperties.json
- 连接器元数据和品牌配置(必填)
iconBrandColor - 认证配置
- 用于MCP转换的策略模板
3. script.csx
- JSON-RPC 2.0消息处理
- 请求/响应转换逻辑
- MCP协议合规性处理
- 错误处理与验证
4. 实施指南
- 工具注册与执行模式
- 资源管理策略
- Copilot Studio集成步骤
- 测试与验证流程
Validation Checklist
验证清单
Technical Compliance
技术合规性
- in MCP endpoint
x-ms-agentic-protocol: mcp-streamable-1.0 - No reference types in any schema definitions
- All type fields are single types (not arrays)
- Resources included as tool outputs
- JSON-RPC 2.0 compliance in script.csx
- Full URI endpoints throughout
- Clear descriptions for Copilot Studio agents
- Authentication properly configured
- Policy templates for MCP transformations
- Generative Orchestration compatibility
- MCP端点中包含
x-ms-agentic-protocol: mcp-streamable-1.0 - 所有架构定义中无引用类型
- 所有类型字段均为单一类型(非数组)
- 资源作为工具输出包含在内
- script.csx符合JSON-RPC 2.0规范
- 全程使用完整URI端点
- 为Copilot Studio Agent提供清晰的描述
- 认证配置正确
- 包含用于MCP转换的策略模板
- 兼容生成式编排(Generative Orchestration)
CLI Validation
CLI验证
- paconn validate: passes without errors
paconn validate --api-def apiDefinition.swagger.json - pac CLI ready: Connector can be created/updated with
pac connector create/update - Script validation: script.csx passes automatic validation during pac CLI upload
- Package validation: runs successfully
ConnectorPackageValidator.ps1
- paconn validate:执行无错误
paconn validate --api-def apiDefinition.swagger.json - pac CLI就绪:可通过命令创建/更新连接器
pac connector create/update - 脚本验证:script.csx在pac CLI上传过程中通过自动验证
- 包验证:执行成功
ConnectorPackageValidator.ps1
OAuth and Security Requirements
OAuth与安全要求
- OAuth 2.0 Enhanced: Standard OAuth 2.0 with MCP security best practices implementation
- Token Validation: Implement token audience validation to prevent passthrough attacks
- Custom Security Logic: Enhanced validation in script.csx for MCP compliance
- State Parameter Protection: Secure state parameters for CSRF prevention
- HTTPS Enforcement: All production endpoints use HTTPS only
- MCP Security Practices: Implement confused deputy attack prevention within OAuth 2.0
- 增强型OAuth 2.0:实现集成MCP安全最佳实践的标准OAuth 2.0
- 令牌验证:实现令牌受众验证,防止传递攻击
- 自定义安全逻辑:在script.csx中添加增强型验证以符合MCP规范
- 状态参数保护:安全处理状态参数以防止CSRF攻击
- HTTPS强制:所有生产端点仅使用HTTPS
- MCP安全实践:在OAuth 2.0中实现混淆代理攻击防护
Certification Requirements
认证要求
- Complete metadata: settings.json with product and service information
- Icon compliance: PNG format, 230x230 or 500x500 dimensions
- Documentation: Certification-ready readme with comprehensive examples
- Security compliance: OAuth 2.0 enhanced with MCP security practices, privacy policy
- Authentication flow: OAuth 2.0 with custom security validation properly configured
- 完整元数据:包含产品和服务信息的settings.json
- 图标合规:PNG格式,尺寸为230x230或500x500
- 文档:符合认证要求的readme,包含全面示例
- 安全合规:集成MCP安全实践的增强型OAuth 2.0,附带隐私政策
- 认证流程:正确配置带有自定义安全验证的OAuth 2.0
Example Usage
示例用法
yaml
Mode: Complete New Connector
Connector Name: Customer Analytics MCP
Server Purpose: Customer data analysis and insights
Tools Needed:
- searchCustomers: Find customers by criteria
- getCustomerProfile: Retrieve detailed customer data
- analyzeCustomerTrends: Generate trend analysis
Resources:
- Customer profiles (JSON data)
- Analysis reports (structured data)
Authentication: oauth2
Host Environment: Azure Function
Target APIs: CRM REST APIyaml
Mode: Complete New Connector
Connector Name: Customer Analytics MCP
Server Purpose: Customer data analysis and insights
Tools Needed:
- searchCustomers: Find customers by criteria
- getCustomerProfile: Retrieve detailed customer data
- analyzeCustomerTrends: Generate trend analysis
Resources:
- Customer profiles (JSON data)
- Analysis reports (structured data)
Authentication: oauth2
Host Environment: Azure Function
Target APIs: CRM REST API