{"kind":"Skill","metadata":{"namespace":"community","name":"power-platform-mcp-connector-suite","version":"0.1.0"},"spec":{"description":"Generate complete Power Platform custom connector with MCP integration for Copilot Studio - includes schema generation, troubleshooting, and validation","files":{"SKILL.md":"---\nname: power-platform-mcp-connector-suite\ndescription: 'Generate complete Power Platform custom connector with MCP integration for Copilot Studio - includes schema generation, troubleshooting, and validation'\n---\n\n# Power Platform MCP Connector Suite\n\nGenerate comprehensive Power Platform custom connector implementations with Model Context Protocol integration for Microsoft Copilot Studio.\n\n## MCP Capabilities in Copilot Studio\n\n**Currently Supported:**\n- ✅ **Tools**: Functions that the LLM can call (with user approval)\n- ✅ **Resources**: File-like data that agents can read (must be tool outputs)\n\n**Not Yet Supported:**\n- ❌ **Prompts**: Pre-written templates (prepare for future support)\n\n## Connector Generation\n\nCreate complete Power Platform connector with:\n\n**Core Files:**\n- `apiDefinition.swagger.json` with `x-ms-agentic-protocol: mcp-streamable-1.0`\n- `apiProperties.json` with connector metadata and authentication\n- `script.csx` with custom C# transformations for MCP JSON-RPC handling\n- `readme.md` with connector documentation\n\n**MCP Integration:**\n- POST `/mcp` endpoint for JSON-RPC 2.0 communication\n- McpResponse and McpErrorResponse schema definitions\n- Copilot Studio constraint compliance (no reference types, single types)\n- Resource integration as tool outputs (Resources and Tools supported; Prompts not yet supported)\n\n## Schema Validation \u0026 Troubleshooting\n\n**Validate schemas for Copilot Studio compliance:**\n- ✅ No reference types (`$ref`) in tool inputs/outputs\n- ✅ Single type values only (not `[\"string\", \"number\"]`)\n- ✅ Primitive types: string, number, integer, boolean, array, object\n- ✅ Resources as tool outputs, not separate entities\n- ✅ Full URIs for all endpoints\n\n**Common issues and fixes:**\n- Tools filtered → Remove reference types, use primitives\n- Type errors → Single types with validation logic\n- Resources unavailable → Include in tool outputs\n- Connection failures → Verify `x-ms-agentic-protocol` header\n\n## Context Variables\n\n- **Connector Name**: [Display name for the connector]\n- **Server Purpose**: [What the MCP server should accomplish]\n- **Tools Needed**: [List of MCP tools to implement]\n- **Resources**: [Types of resources to provide]\n- **Authentication**: [none, api-key, oauth2, basic]\n- **Host Environment**: [Azure Function, Express.js, etc.]\n- **Target APIs**: [External APIs to integrate with]\n\n## Generation Modes\n\n### Mode 1: Complete New Connector\nGenerate all files for a new Power Platform MCP connector from scratch, including CLI validation setup.\n\n### Mode 2: Schema Validation\nAnalyze and fix existing schemas for Copilot Studio compliance using paconn and validation tools.\n\n### Mode 3: Integration Troubleshooting\nDiagnose and resolve MCP integration issues with Copilot Studio using CLI debugging tools.\n\n### Mode 4: Hybrid Connector\nAdd MCP capabilities to existing Power Platform connector with proper validation workflows.\n\n### Mode 5: Certification Preparation\nPrepare connector for Microsoft certification submission with complete metadata and validation compliance.\n\n### Mode 6: OAuth Security Hardening\nImplement OAuth 2.0 authentication enhanced with MCP security best practices and advanced token validation.\n\n## Expected Output\n\n**1. apiDefinition.swagger.json**\n- Swagger 2.0 format with Microsoft extensions\n- MCP endpoint: `POST /mcp` with proper protocol header\n- Compliant schema definitions (primitive types only)\n- McpResponse/McpErrorResponse definitions\n\n**2. apiProperties.json**\n- Connector metadata and branding (`iconBrandColor` required)\n- Authentication configuration\n- Policy templates for MCP transformations\n\n**3. script.csx**\n- JSON-RPC 2.0 message handling\n- Request/response transformations\n- MCP protocol compliance logic\n- Error handling and validation\n\n**4. Implementation guidance**\n- Tool registration and execution patterns\n- Resource management strategies\n- Copilot Studio integration steps\n- Testing and validation procedures\n\n## Validation Checklist\n\n### Technical Compliance\n- [ ] `x-ms-agentic-protocol: mcp-streamable-1.0` in MCP endpoint\n- [ ] No reference types in any schema definitions\n- [ ] All type fields are single types (not arrays)\n- [ ] Resources included as tool outputs\n- [ ] JSON-RPC 2.0 compliance in script.csx\n- [ ] Full URI endpoints throughout\n- [ ] Clear descriptions for Copilot Studio agents\n- [ ] Authentication properly configured\n- [ ] Policy templates for MCP transformations\n- [ ] Generative Orchestration compatibility\n\n### CLI Validation\n- [ ] **paconn validate**: `paconn validate --api-def apiDefinition.swagger.json` passes without errors\n- [ ] **pac CLI ready**: Connector can be created/updated with `pac connector create/update`\n- [ ] **Script validation**: script.csx passes automatic validation during pac CLI upload\n- [ ] **Package validation**: `ConnectorPackageValidator.ps1` runs successfully\n\n### OAuth and Security Requirements\n- [ ] **OAuth 2.0 Enhanced**: Standard OAuth 2.0 with MCP security best practices implementation\n- [ ] **Token Validation**: Implement token audience validation to prevent passthrough attacks\n- [ ] **Custom Security Logic**: Enhanced validation in script.csx for MCP compliance\n- [ ] **State Parameter Protection**: Secure state parameters for CSRF prevention\n- [ ] **HTTPS Enforcement**: All production endpoints use HTTPS only\n- [ ] **MCP Security Practices**: Implement confused deputy attack prevention within OAuth 2.0\n\n### Certification Requirements\n- [ ] **Complete metadata**: settings.json with product and service information\n- [ ] **Icon compliance**: PNG format, 230x230 or 500x500 dimensions\n- [ ] **Documentation**: Certification-ready readme with comprehensive examples\n- [ ] **Security compliance**: OAuth 2.0 enhanced with MCP security practices, privacy policy\n- [ ] **Authentication flow**: OAuth 2.0 with custom security validation properly configured\n\n## Example Usage\n\n```yaml\nMode: Complete New Connector\nConnector Name: Customer Analytics MCP\nServer Purpose: Customer data analysis and insights\nTools Needed:\n  - searchCustomers: Find customers by criteria\n  - getCustomerProfile: Retrieve detailed customer data\n  - analyzeCustomerTrends: Generate trend analysis\nResources:\n  - Customer profiles (JSON data)\n  - Analysis reports (structured data)\nAuthentication: oauth2\nHost Environment: Azure Function\nTarget APIs: CRM REST API\n```\n"},"import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/tree/541b7819d8c3545c6df122491af4fa1eae415779/plugins/power-platform-mcp-connector-development/skills/power-platform-mcp-connector-suite"}},"content_hash":[60,144,32,237,246,204,255,124,117,241,234,144,4,128,224,124,75,251,171,229,98,244,253,216,239,132,191,64,98,23,169,58],"trust_level":"unsigned","yanked":false}
