Mcp-Copilot-Studio-Server-Generator
Mcp-Copilot-Studio-Server-Generator是一款code方向的AI技能,核心价值是Generate a complete MCP server implementation optimized for Copilot Studio integration with proper schema constraints and streamable HTTP support,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Generate a complete MCP server implementation optimized for Copilot Studio integration with proper schema constraints and streamable HTTP support
mkdir -p ./skills/mcp-copilot-studio-server-generator && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/mcp-copilot-studio-server-generator/SKILL.md -o ./skills/mcp-copilot-studio-server-generator/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Power Platform MCP Connector Generator
Generate a complete Power Platform custom connector with Model Context Protocol (MCP) integration for Microsoft Copilot Studio. This prompt creates all necessary files following Power Platform connector standards with MCP streamable HTTP support.
Instructions
Create a complete MCP server implementation that:
1. **Uses Copilot Studio MCP Pattern:**
- Implement `x-ms-agentic-protocol: mcp-streamable-1.0`
- Support JSON-RPC 2.0 communication protocol
- Provide streamable HTTP endpoint at `/mcp`
- Follow Power Platform connector structure
2. **Schema Compliance Requirements:**
- **NO reference types** in tool inputs/outputs (filtered by Copilot Studio)
- **Single type values only** (not arrays of multiple types)
- **Avoid enum inputs** (interpreted as string, not enum)
- Use primitive types: string, number, integer, boolean, array, object
- Ensure all endpoints return full URIs
3. **MCP Components to Include:**
- **Tools**: Functions for the language model to call (✅ Supported in Copilot Studio)
- **Resources**: File-like data outputs from tools (✅ Supported in Copilot Studio - must be tool outputs to be accessible)
- **Prompts**: Predefined templates for specific tasks (❌ Not yet supported in Copilot Studio)
4. **Implementation 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)
```
Context Variables
- **Server Purpose**: [Describe what the MCP server should accomplish]
- **Tools Needed**: [List of specific tools to implement]
- **Resources**: [Types of resources to provide]
- **Authentication**: [Auth method: none, api-key, oauth2]
- **Host Environment**: [Azure Function, Express.js, FastAPI, etc.]
- **Target APIs**: [External APIs to integrate with]
Expected Output
Generate:
1. **apiDefinition.swagger.json** with:
- Proper `x-ms-agentic-protocol: mcp-streamable-1.0`
- MCP endpoint at POST `/mcp`
- Compliant schema definitions (no reference types)
- McpResponse and McpErrorResponse definitions
2. **apiProperties.json** with:
- Connector metadata and branding
- Authentication configuration
- Policy templates if needed
3. **script.csx** with:
- Custom C# code for request/response transformations
- MCP JSON-RPC message handling logic
- Data validation and processing functions
- Error handling and logging capabilities
4. **MCP Server Code** with:
- JSON-RPC 2.0 request handler
- Tool registration and execution
- Resource management (as tool outputs)
- Proper error handling
- Copilot Studio compatibility checks
5. **Individual Tools** that:
- Accept only primitive type inputs
- Return structured outputs
- Include resources as outputs when needed
- Provide clear descriptions for Copilot Studio
6. **Deployment Configuration** for:
- Power Platform environment
- Copilot Studio agent integration
- Testing and validation
Validation Checklist
Ensure generated code:
- [ ] No reference types in schemas
- [ ] All type fields are single types
- [ ] Enum handling via string with validation
- [ ] Resources available through tool outputs
- [ ] Full URI endpoints
- [ ] JSON-RPC 2.0 compliance
- [ ] Proper x-ms-agentic-protocol header
- [ ] McpResponse/McpErrorResponse schemas
- [ ] Clear tool descriptions for Copilot Studio
- [ ] Generative Orchestration compatible
Example Usage
Server Purpose: Customer data management and analysis
Tools Needed:
- searchCustomers
- getCustomerDetails
- analyzeCustomerTrends
Resources:
- Customer profiles
- Analysis reports
Authentication: oauth2
Host Environment: Azure Functi🎯 Best For
- Developers scaffolding new projects
- Prototype builders
- Claude users
- GitHub Copilot users
- Software engineers
💡 Use Cases
- Bootstrapping React components
- Creating API route handlers
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Mcp-Copilot-Studio-Server-Generator to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Can I customize the generated output?
Yes — modify the skill's prompt instructions to match your project conventions and coding style.
Is Mcp-Copilot-Studio-Server-Generator compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Mcp-Copilot-Studio-Server-Generator?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Mcp-Copilot-Studio-Server-Generator?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/mcp-copilot-studio-server-generator/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Using generated code without understanding
Understand what generated code does before shipping it to production.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.