К основному содержанию
правило официальный · GitHub

power-platform-mcp-development — правило для GitHub Copilot

Правило задаёт требования к кастомным коннекторам Power Platform с MCP для Microsoft Copilot Studio. Оно пригодится при проектировании схем, авторизации и тестов.

Установить в GitHub Copilot · Вручную: положить файлы Все способы и платформы ↓
.github/instructions/power-platform-mcp-development.instructions.md
Открыть на GitHub

Что делает power-platform-mcp-development

Правило нацеливает GitHub Copilot на разработку коннекторов Power Platform с интеграцией MCP. Оно требует JSON-RPC 2.0, заголовок x-ms-agentic-protocol: mcp-streamable-1.0, поддержку REST и вызова MCP-инструментов. Ответы нужно приводить к ограничениям Copilot Studio: без ссылочных типов, с одиночными типами и самодостаточными схемами.

В рекомендациях есть OAuth 2.0, проверка аудитории токена, наборы параметров подключения и варианты OAuth или API key. Скрипт script.csx преобразует JSON-RPC, обрабатывает ошибки и ответы MCP. Для описания коннектора используется Swagger 2.0 с operationId, схемами ответов, статусами HTTP и заголовками.

Правило также охватывает методы tools/list, tools/call, resources/list, MIME-типы ресурсов, потоковые ответы и проверку возможностей сервера. Без удаления $ref и упрощения anyOf/oneOf схемы не соответствуют ограничениям Copilot Studio.

Какие задачи решает

  • спроектировать MCP-коннектор для Power Platform
  • преобразовать JSON-RPC-ответы для Copilot Studio
  • описать схемы Swagger 2.0 без $ref
  • настроить OAuth 2.0 и проверку аудитории токена
  • проверить вызов инструментов и ресурсов MCP

Примеры запросов агенту

  • Создай кастомный коннектор Power Platform для MCP с JSON-RPC 2.0 и заголовком x-ms-agentic-protocol: mcp-streamable-1.0.
  • Проверь схемы коннектора: убери $ref, упрости anyOf и подготовь их для Copilot Studio.
  • Добавь в script.csx преобразование ответов MCP и ошибки в формате JSON-RPC 2.0.

Как установить power-platform-mcp-development

Вручную: положить файлы

.github/instructions/power-platform-mcp-development.instructions.md

Поле applyTo задаёт, к каким файлам применять

По шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать

Вопросы о power-platform-mcp-development

Как установить power-platform-mcp-development в GitHub Copilot?

Создайте файл .github/instructions/power-platform-mcp-development.instructions.md и поместите в него правило.

Что делает power-platform-mcp-development?

Правило помогает разрабатывать кастомные коннекторы Power Platform с MCP для Microsoft Copilot Studio: задаёт требования к протоколу, схемам, безопасности, скриптам и тестированию.

Какие схемы нужны Copilot Studio?

Схемы должны быть самодостаточными: без $ref, с одиночными типами вместо массивов типов и без конструкций anyOf/oneOf, которые не поддерживает Copilot Studio.

Исходный текст

power-platform-mcp-development.instructions.md · MIT
---
description: 'Instructions for developing Power Platform custom connectors with Model Context Protocol (MCP) integration for Microsoft Copilot Studio'
applyTo: '**/*.{json,csx,md}'
---

# Power Platform MCP Custom Connector Development

## Instructions

### MCP Protocol Integration
- Always implement JSON-RPC 2.0 standard for MCP communication
- Use `x-ms-agentic-protocol: mcp-streamable-1.0` header for Copilot Studio compatibility
- Structure endpoints to support both standard REST operations and MCP tool invocation
- Transform responses to comply with Copilot Studio constraints (no reference types, single types only)

### Schema Design Best Practices
- Remove `$ref` and other reference types from JSON schemas as Copilot Studio cannot handle them
- Use single types instead of arrays of types in schema definitions
- Flatten `anyOf`/`oneOf` constructs to single schemas for Copilot Studio compatibility
- Ensure all tool input schemas are self-contained without external references

### Authentication and Security
- Implement OAuth 2.0 with MCP security best practices within Power Platform constraints
- Use connection parameter sets for flexible authentication configuration
- Validate token audience to prevent passthrough attacks
- Add MCP-specific security headers for enhanced validation
- Support multiple authentication methods (OAuth standard, OAuth enhanced, API key fallback)

### Custom Script Implementation
- Handle JSON-RPC transformation in the custom script (script.csx)
- Implement proper error handling with JSON-RPC error response format
- Add token validation and audience checking in authentication flow
- Transform MCP server responses for Copilot Studio compatibility
- Use connection parameters for dynamic security configuration

### Swagger Definition Guidelines
- Use Swagger 2.0 specification for Power Platform compatibility
- Implement proper `operationId` values for each endpoint
- Define clear parameter schemas with appropriate types and descriptions
- Add comprehensive response schemas for all success and error cases
- Include proper HTTP status codes and response headers

### Resource and Tool Management
- Structure MCP resources to be consumable as tool outputs in Copilot Studio
- Ensure proper MIME type declarations for resource content
- Add audience and priority annotations for better Copilot Studio integration
- Implement resource transformation to meet Copilot Studio requirements

### Connection Parameter Configuration
- Use enum dropdowns for OAuth version and security level selection
- Provide clear parameter descriptions and constraints
- Support multiple authentication parameter sets for different deployment scenarios
- Include validation rules and default values where appropriate
- Enable dynamic configuration through connection parameter values

### Error Handling and Logging
- Implement comprehensive error responses following JSON-RPC 2.0 error format
- Add detailed logging for authentication, validation, and transformation steps
- Provide clear error messages that help with troubleshooting
- Include proper HTTP status codes aligned with error conditions

### Testing and Validation
- Test connector with actual MCP server implementations
- Validate schema transformations work correctly with Copilot Studio
- Verify authentication flows for all supported parameter sets
- Ensure proper error handling for various failure scenarios
- Test connection parameter configurations and dynamic behavior

## Additional Guidelines

### Power Platform Certification Requirements
- Include comprehensive documentation (readme.md, CUSTOMIZE.md)
- Provide clear setup and configuration instructions
- Document all authentication options and security considerations
- Include proper publisher and stack owner information
- Ensure compliance with Power Platform connector certification standards

### MCP Server Compatibility
- Design for compatibility with standard MCP server implementations
- Support common MCP methods like `tools/list`, `tools/call`, `resources/list`
- Handle streaming responses appropriately for `mcp-streamable-1.0` protocol
- Implement proper protocol negotiation and capability detection

### Copilot Studio Integration
- Ensure tool definitions work correctly within Copilot Studio's constraints
- Test resource access and tool invocation from Copilot Studio interface
- Validate that transformed schemas produce expected behavior in conversations
- Confirm proper integration with Copilot Studio's agent framework

© github · MIT · github/awesome-copilot

Похожие правила IDE

Все правила IDE по теме «Бэкенд и API» →

Из того же набора861

Весь набор →
qa-engineering-best-practices Правило для GitHub Copilot с набором инструкций по тестированию: пирамида тестов, именование, ассерты, баг-репорты. Пригодится, когда Copilot пишет тесты в вашем проекте. ★ 40 418звёзд репо python-mcp-server Набор инструкций для GitHub Copilot по разработке MCP-серверов на Python SDK версии 2. Помогает ассистенту писать код по спецификации 2026-07-28 без устаревших методов. ★ 40 418звёзд репо powershell Правило для GitHub Copilot, которое заставляет его писать идиоматичные скрипты PowerShell по гайдлайнам Microsoft. Пригодится, если в проекте есть .ps1 и .psm1. ★ 40 418звёзд репо powershell-pester-6 Задаёт стандарты написания тестов на Pester v6 для PowerShell. Помогает генерировать надёжные спецификации в файлах *.Tests.ps1 без устаревших конструкций v5. ★ 40 418звёзд репо power-platform-connector Правило для GitHub Copilot, которое подсказывает, как писать JSON-схемы кастомных коннекторов Power Platform: Swagger 2.0, apiProperties и settings. ★ 40 418звёзд репо power-bi-security-rls-best-practices Набор инструкций по настройке Row-Level Security (RLS) в Power BI. Помогает генерировать шаблоны DAX, SQL-предикаты и код для Embedded-аналитики. ★ 40 418звёзд репо power-bi-report-design-best-practices Правило помогает выбирать визуализации и проектировать структуру отчётов Power BI. Пригодится, когда нужно продумать страницу, диаграмму или навигацию. ★ 40 418звёзд репо power-bi-devops-alm-best-practices Правило для GitHub Copilot: подсказывает агенту, как вести Power BI-проект в Git, собирать CI/CD и раскатывать отчёты по средам. ★ 40 418звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой