$npx -y skills add github/awesome-copilot --skill power-platform-mcp-connector-suiteGenerate complete Power Platform custom connector with MCP integration for Copilot Studio - includes schema generation, troubleshooting, and validation
| 1 | # Power Platform MCP Connector Suite |
| 2 | |
| 3 | Generate comprehensive Power Platform custom connector implementations with Model Context Protocol integration for Microsoft Copilot Studio. |
| 4 | |
| 5 | ## MCP Capabilities in Copilot Studio |
| 6 | |
| 7 | **Currently Supported:** |
| 8 | - ✅ **Tools**: Functions that the LLM can call (with user approval) |
| 9 | - ✅ **Resources**: File-like data that agents can read (must be tool outputs) |
| 10 | |
| 11 | **Not Yet Supported:** |
| 12 | - ❌ **Prompts**: Pre-written templates (prepare for future support) |
| 13 | |
| 14 | ## Connector Generation |
| 15 | |
| 16 | Create complete Power Platform connector with: |
| 17 | |
| 18 | **Core Files:** |
| 19 | - `apiDefinition.swagger.json` with `x-ms-agentic-protocol: mcp-streamable-1.0` |
| 20 | - `apiProperties.json` with connector metadata and authentication |
| 21 | - `script.csx` with custom C# transformations for MCP JSON-RPC handling |
| 22 | - `readme.md` with connector documentation |
| 23 | |
| 24 | **MCP Integration:** |
| 25 | - POST `/mcp` endpoint for JSON-RPC 2.0 communication |
| 26 | - McpResponse and McpErrorResponse schema definitions |
| 27 | - Copilot Studio constraint compliance (no reference types, single types) |
| 28 | - Resource integration as tool outputs (Resources and Tools supported; Prompts not yet supported) |
| 29 | |
| 30 | ## Schema Validation & Troubleshooting |
| 31 | |
| 32 | **Validate schemas for Copilot Studio compliance:** |
| 33 | - ✅ No reference types (`$ref`) in tool inputs/outputs |
| 34 | - ✅ Single type values only (not `["string", "number"]`) |
| 35 | - ✅ Primitive types: string, number, integer, boolean, array, object |
| 36 | - ✅ Resources as tool outputs, not separate entities |
| 37 | - ✅ Full URIs for all endpoints |
| 38 | |
| 39 | **Common issues and fixes:** |
| 40 | - Tools filtered → Remove reference types, use primitives |
| 41 | - Type errors → Single types with validation logic |
| 42 | - Resources unavailable → Include in tool outputs |
| 43 | - Connection failures → Verify `x-ms-agentic-protocol` header |
| 44 | |
| 45 | ## Context Variables |
| 46 | |
| 47 | - **Connector Name**: [Display name for the connector] |
| 48 | - **Server Purpose**: [What the MCP server should accomplish] |
| 49 | - **Tools Needed**: [List of MCP tools to implement] |
| 50 | - **Resources**: [Types of resources to provide] |
| 51 | - **Authentication**: [none, api-key, oauth2, basic] |
| 52 | - **Host Environment**: [Azure Function, Express.js, etc.] |
| 53 | - **Target APIs**: [External APIs to integrate with] |
| 54 | |
| 55 | ## Generation Modes |
| 56 | |
| 57 | ### Mode 1: Complete New Connector |
| 58 | Generate all files for a new Power Platform MCP connector from scratch, including CLI validation setup. |
| 59 | |
| 60 | ### Mode 2: Schema Validation |
| 61 | Analyze and fix existing schemas for Copilot Studio compliance using paconn and validation tools. |
| 62 | |
| 63 | ### Mode 3: Integration Troubleshooting |
| 64 | Diagnose and resolve MCP integration issues with Copilot Studio using CLI debugging tools. |
| 65 | |
| 66 | ### Mode 4: Hybrid Connector |
| 67 | Add MCP capabilities to existing Power Platform connector with proper validation workflows. |
| 68 | |
| 69 | ### Mode 5: Certification Preparation |
| 70 | Prepare connector for Microsoft certification submission with complete metadata and validation compliance. |
| 71 | |
| 72 | ### Mode 6: OAuth Security Hardening |
| 73 | Implement OAuth 2.0 authentication enhanced with MCP security best practices and advanced token validation. |
| 74 | |
| 75 | ## Expected Output |
| 76 | |
| 77 | **1. apiDefinition.swagger.json** |
| 78 | - Swagger 2.0 format with Microsoft extensions |
| 79 | - MCP endpoint: `POST /mcp` with proper protocol header |
| 80 | - Compliant schema definitions (primitive types only) |
| 81 | - McpResponse/McpErrorResponse definitions |
| 82 | |
| 83 | **2. apiProperties.json** |
| 84 | - Connector metadata and branding (`iconBrandColor` required) |
| 85 | - Authentication configuration |
| 86 | - Policy templates for MCP transformations |
| 87 | |
| 88 | **3. script.csx** |
| 89 | - JSON-RPC 2.0 message handling |
| 90 | - Request/response transformations |
| 91 | - MCP protocol compliance logic |
| 92 | - Error handling and validation |
| 93 | |
| 94 | **4. Implementation guidance** |
| 95 | - Tool registration and execution patterns |
| 96 | - Resource management strategies |
| 97 | - Copilot Studio integration steps |
| 98 | - Testing and validation procedures |
| 99 | |
| 100 | ## Validation Checklist |
| 101 | |
| 102 | ### Technical Compliance |
| 103 | - [ ] `x-ms-agentic-protocol: mcp-streamable-1.0` in MCP endpoint |
| 104 | - [ ] No reference types in any schema definitions |
| 105 | - [ ] All type fields are single types (not arrays) |
| 106 | - [ ] Resources included as tool outputs |
| 107 | - [ ] JSON-RPC 2.0 compliance in script.csx |
| 108 | - [ ] Full URI endpoints throughout |
| 109 | - [ ] Clear descriptions for Copilot Studio agents |
| 110 | - [ ] Authentication properly configured |
| 111 | - [ ] Policy templates for MCP transformations |
| 112 | - [ ] Generative Orchestration compatibility |
| 113 | |
| 114 | ### CLI Validation |
| 115 | - [ ] **paconn validate**: `paconn validate --api-def apiDefinition.swagger.json` passes without errors |
| 116 | - [ ] **pac CLI ready**: Connector can be created/updated with `pac connector create/update` |
| 117 | - [ ] **Script validation**: script.csx passes automatic validation during pac CLI upload |
| 118 | - [ ] **Package validation**: `ConnectorPackageValidator.ps1` runs successfully |
| 119 | |
| 120 | ### OAuth and Security Requirements |
| 121 | - [ ] **OAuth 2.0 Enhanced**: Standard OAuth 2.0 with MCP security best practices implementation |
| 122 | - |