Generate a complete MCP server and Power Platform custom connector optimized for Microsoft Copilot Studio, including streamable HTTP, JSON-RPC 2.0, schema constraints, apiDefinition.swagger.json, apiProperties.json, script.csx, tools, resources-as-tool-outputs, deployment, and validation. Use when asked for a Power Platform MCP connector generator or Copilot Studio MCP integration.
Generate a Microsoft Copilot Studio-compatible MCP implementation by combining a streamable HTTP MCP server with Power Platform custom connector files and schemas that avoid constructs Copilot Studio filters or misinterprets.
When to invoke
"Generate a Power Platform MCP connector."
"Create an MCP server for Copilot Studio."
"Build a custom connector with x-ms-agentic-protocol."
"Scaffold apiDefinition.swagger.json, apiProperties.json, and script.csx for MCP."
"Make my MCP tools compatible with Microsoft Copilot Studio."
Inputs
Use $ARGUMENTS as the server purpose, target API, or tool list when provided. If details are missing, collect them before generating files.
Customer profiles, analysis reports; expose as tool outputs.
Authentication
Yes
none, api-key, oauth2.
Host Environment
Yes
Azure Function, Express.js, FastAPI.
Target APIs
Conditional
CRM System REST API or another external API.
Copilot Studio MCP pattern
Requirement
Implementation rule
Agentic protocol
Add x-ms-agentic-protocol: mcp-streamable-1.0 to the connector definition.
Transport
Provide a streamable HTTP endpoint at POST /mcp.
Wire protocol
Support JSON-RPC 2.0 request and response messages.
Connector shape
Follow Power Platform connector structure with apiDefinition.swagger.json, apiProperties.json, and optional script.csx.
Tool descriptions
Write clear tool descriptions for Copilot Studio and Generative Orchestration.
Schema compliance requirements
Constraint
Why
Rule
No reference types
Copilot Studio filters reference types in tool inputs/outputs.
Inline schemas; do not rely on $ref for tool payloads.
Single type values only
Arrays of multiple types are not reliably interpreted.
Use one type per schema field.
Avoid enum inputs
Copilot Studio may treat enum as plain string.
Use string plus validation and description.
Primitive-compatible fields
Tool schemas must remain callable by the agent.
Use string, number, integer, boolean, array, and object.
Full URI endpoints
Relative or partial endpoints can break connector execution.
Return full URIs from endpoints and tools.
Resources
Copilot Studio can use resources only when surfaced through tools.
Include resources as structured tool outputs.
Prompts
Prompts are not yet supported in Copilot Studio.
Generate prompt code only as server-side MCP capability, not as a Copilot Studio dependency.
Generated file structure
/apiDefinition.swagger.json (Power Platform connector schema)
/apiProperties.json (Connector metadata and configuration)
/script.csx (Custom code transformations and logic)
/server/ (MCP server implementation)
/tools/ (Individual MCP tools)
/resources/ (MCP resource handlers)
File or folder
Must contain
apiDefinition.swagger.json
POST /mcp, x-ms-agentic-protocol: mcp-streamable-1.0, compliant inline schema definitions, McpResponse, McpErrorResponse, and the paired McpResponse/McpErrorResponse contract.
apiProperties.json
Connector metadata, branding, authentication configuration, and policy templates if needed.
Resources are surfaced as tool outputs and prompts are labeled as not yet supported in Copilot Studio.
All endpoints return full URIs and tool descriptions are clear for Generative Orchestration.
1---2name: mcp-copilot-studio-server-generator3description: Generate a complete MCP server and Power Platform custom connector optimized for Microsoft Copilot Studio, including streamable HTTP, JSON-RPC 2.0, schema constraints, apiDefinition.swagger.json, apiProperties.json, script.csx, tools, resources-as-tool-outputs, deployment, and validation. Use when asked for a Power Platform MCP connector generator or Copilot Studio MCP integration.4---56<!-- Generated from harness/github-copilot/skills/mcp-copilot-studio-server-generator/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Power Platform MCP connector generator910Generate a Microsoft Copilot Studio-compatible MCP implementation by combining a streamable HTTP MCP server with Power Platform custom connector files and schemas that avoid constructs Copilot Studio filters or misinterprets.1112## When to invoke1314- "Generate a Power Platform MCP connector."15- "Create an MCP server for Copilot Studio."16- "Build a custom connector with `x-ms-agentic-protocol`."17- "Scaffold `apiDefinition.swagger.json`, `apiProperties.json`, and `script.csx` for MCP."18- "Make my MCP tools compatible with Microsoft Copilot Studio."1920## Inputs2122Use `$ARGUMENTS` as the server purpose, target API, or tool list when provided. If details are missing, collect them before generating files.2324| Context variable | Required | Examples |25| --- | --- | --- |26| Server Purpose | Yes | Customer data management and analysis. |27| Tools Needed | Yes | `searchCustomers`, `getCustomerDetails`, `analyzeCustomerTrends`. |28| Resources | Conditional | Customer profiles, analysis reports; expose as tool outputs. |29| Authentication | Yes | `none`, `api-key`, `oauth2`. |30| Host Environment | Yes | Azure Function, Express.js, FastAPI. |31| Target APIs | Conditional | CRM System REST API or another external API. |3233## Copilot Studio MCP pattern3435| Requirement | Implementation rule |36| --- | --- |37| Agentic protocol | Add `x-ms-agentic-protocol: mcp-streamable-1.0` to the connector definition. |38| Transport | Provide a streamable HTTP endpoint at POST `/mcp`. |39| Wire protocol | Support JSON-RPC 2.0 request and response messages. |40| Connector shape | Follow Power Platform connector structure with `apiDefinition.swagger.json`, `apiProperties.json`, and optional `script.csx`. |41| Tool descriptions | Write clear tool descriptions for Copilot Studio and Generative Orchestration. |4243## Schema compliance requirements4445| Constraint | Why | Rule |46| --- | --- | --- |47| No reference types | Copilot Studio filters reference types in tool inputs/outputs. | Inline schemas; do not rely on `$ref` for tool payloads. |48| Single type values only | Arrays of multiple types are not reliably interpreted. | Use one `type` per schema field. |49| Avoid enum inputs | Copilot Studio may treat enum as plain string. | Use `string` plus validation and description. |50| Primitive-compatible fields | Tool schemas must remain callable by the agent. | Use `string`, `number`, `integer`, `boolean`, `array`, and `object`. |51| Full URI endpoints | Relative or partial endpoints can break connector execution. | Return full URIs from endpoints and tools. |52| Resources | Copilot Studio can use resources only when surfaced through tools. | Include resources as structured tool outputs. |53| Prompts | Prompts are not yet supported in Copilot Studio. | Generate prompt code only as server-side MCP capability, not as a Copilot Studio dependency. |5455## Generated file structure5657```text58/apiDefinition.swagger.json (Power Platform connector schema)59/apiProperties.json (Connector metadata and configuration)60/script.csx (Custom code transformations and logic)61/server/ (MCP server implementation)62/tools/ (Individual MCP tools)63/resources/ (MCP resource handlers)64```6566| File or folder | Must contain |67| --- | --- |68| `apiDefinition.swagger.json` | POST `/mcp`, `x-ms-agentic-protocol: mcp-streamable-1.0`, compliant inline schema definitions, `McpResponse`, `McpErrorResponse`, and the paired `McpResponse/McpErrorResponse` contract. |69| `apiProperties.json` | Connector metadata, branding, authentication configuration, and policy templates if needed. |70| `script.csx` | C# transformations, JSON-RPC message handling glue, validation, processing, error handling, and logging. |71| `server/` | JSON-RPC 2.0 request/response handler, tool registration and execution, resource management, compatibility checks. |72| `tools/` | Individual tool implementations accepting primitive inputs/outputs and returning structured outputs. |73| `resources/` | MCP resource handlers whose content is surfaced through tool outputs when used by Copilot Studio. |7475## MCP component rules7677| Component | Copilot Studio support | Generation rule |78| --- | --- | --- |79| Tools | Supported in Copilot Studio. | Generate every requested business operation as a tool with primitive input schema and structured output. |80| Resources | Supported only when accessible through tools. | Return file-like data outputs from tools; do not rely on separate resource browsing. |81| Prompts | Not yet supported in Copilot Studio. | Include predefined templates only for MCP clients that support prompts; label the limitation. |8283## Validation checklist8485- [ ] No reference types in schemas.86- [ ] All `type` fields are single types.87- [ ] Enum handling uses `string` with validation.88- [ ] Resources are available through tool outputs.89- [ ] Endpoints return full URIs.90- [ ] JSON-RPC 2.0 compliance is implemented.91- [ ] `x-ms-agentic-protocol: mcp-streamable-1.0` is present.92- [ ] `McpResponse` and `McpErrorResponse` schemas are defined.93- [ ] Tool descriptions are clear for Copilot Studio.94- [ ] Generative Orchestration compatibility is checked.9596## Example input9798```yaml99Server Purpose: Customer data management and analysis100Tools Needed:101 - searchCustomers102 - getCustomerDetails103 - analyzeCustomerTrends104Resources:105 - Customer profiles106 - Analysis reports107Authentication: oauth2108Host Environment: Azure Function109Target APIs: CRM System REST API110```111112## Gotchas113114- **Do not use `$ref` for tool payloads**: Copilot Studio can filter reference types and make the tool unusable.115- **Do not model enum inputs as OpenAPI enums**: write `string` with validation and a description of accepted values.116- **Do not expose resources only through MCP resource APIs**: return them through tool outputs for Copilot Studio.117- **Do not promise prompt support in Copilot Studio**: prompts may exist in the MCP server but are not yet a Copilot Studio integration surface.118119## Output template120121```markdown122## Copilot Studio MCP connector123124**Status:** generated | requirements needed | blocked125**Server purpose:** <purpose>126**Host environment:** Azure Function | Express.js | FastAPI | other127**Authentication:** none | api-key | oauth2128129### Files130| Path | Purpose |131| --- | --- |132| `apiDefinition.swagger.json` | Connector schema with POST `/mcp` and `x-ms-agentic-protocol: mcp-streamable-1.0` |133| `apiProperties.json` | Connector metadata and authentication |134| `script.csx` | Custom transformations and JSON-RPC handling |135| `server/` | MCP server implementation |136| `tools/` | Individual MCP tools |137| `resources/` | Resource handlers exposed through tool outputs |138139### Tools140| Tool | Inputs | Output | Copilot Studio notes |141| --- | --- | --- | --- |142| `searchCustomers` | primitive schema | structured object | no `$ref`, no enum inputs |143144### Validation145- No reference types: pass | fail146- Single type fields: pass | fail147- JSON-RPC 2.0: pass | fail148- `McpResponse` / `McpErrorResponse`: pass | fail149```150151## Quality gate152153- [ ] Server Purpose, Tools Needed, Resources, Authentication, Host Environment, and Target APIs are known or explicitly marked not applicable.154- [ ] `apiDefinition.swagger.json`, `apiProperties.json`, `script.csx`, `server/`, `tools/`, and `resources/` are generated when requested.155- [ ] POST `/mcp` uses streamable HTTP and JSON-RPC 2.0.156- [ ] `x-ms-agentic-protocol: mcp-streamable-1.0` appears in the connector definition.157- [ ] Tool input/output schemas avoid reference types, multi-type values, and enum inputs.158- [ ] `McpResponse` and `McpErrorResponse` are present.159- [ ] Resources are surfaced as tool outputs and prompts are labeled as not yet supported in Copilot Studio.160- [ ] All endpoints return full URIs and tool descriptions are clear for Generative Orchestration.
Run npx skillmds@latest add paulasilvatech/mcp-copilot-studio-server-generator in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Generate a complete MCP server and Power Platform custom connector optimized for Microsoft Copilot Studio, including streamable HTTP, JSON-RPC 2.0, schema constraints, apiDefinition.swagger.json, apiProperties.json, script.csx, tools, resources-as-tool-outputs, deployment, and validation. Use when asked for a Power Platform MCP connector generator or Copilot Studio MCP integration. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
paulasilvatech (@paulasilvatech) published this skill. Their other Agent Skills are listed on their SkillMD profile.