Skip to main content
subagent official · GitHub

MCP M365 Agent Expert — GitHub Copilot subagent: setup and use

Builds declarative agents for Microsoft 365 Copilot with Model Context Protocol tooling. Generates manifests, Adaptive Cards, and OAuth configs.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/mcp-m365-agent-expert.agent.md
Open on GitHub

What MCP M365 Agent Expert does

Powered by GPT-4.1, this subagent guides you through scaffolding declarative agents for Microsoft 365 Copilot. It produces declarativeAgent.json, ai-plugin.json, and manifest.json configurations. You import endpoints directly from Model Context Protocol servers through mcp.json, avoiding manual schema authoring.

The agent handles Adaptive Card templating with ${if()}, $data, and responsive layouts. It writes JSONPath expressions for response_semantics, configures .env.local parameter templates, and outlines testing workflows at m365.cloud.microsoft/chat.

Full scaffolding workflows depend on Microsoft 365 Agents Toolkit for VS Code version 6.3.x or later. Without this extension, point-and-click tool selection will not work.

What it helps with

  • generate declarative agent manifests and MCP server configurations
  • set up OAuth 2.0 or Microsoft Entra ID authentication for MCP tools
  • design dynamic Adaptive Cards with JSON templating
  • map tool responses using JSONPath and response semantics

Example prompts for the agent

  • Generate a declarativeAgent.json manifest that connects to an external MCP server
  • Create an Adaptive Card template using ${if()} logic for task status updates
  • Configure response_semantics with JSONPath mapping for tool results

How to install MCP M365 Agent Expert

Manually: put the files in place

.github/agents/mcp-m365-agent-expert.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about MCP M365 Agent Expert

How to install MCP M365 Agent Expert in GitHub Copilot?

Place the agent file into your repository at .github/agents/mcp-m365-agent-expert.agent.md. GitHub Copilot will recognize the agent file automatically.

What does MCP M365 Agent Expert do?

It provides structured guidance and config templates for building Microsoft 365 Copilot declarative agents powered by Model Context Protocol tools.

What tooling is required to use the generated configs?

You need the Microsoft 365 Agents Toolkit extension for VS Code version 6.3.x or newer to use the scaffolding and tool picker features.

Source text

mcp-m365-agent-expert.agent.md · MIT
---
description: 'Expert assistant for building MCP-based declarative agents for Microsoft 365 Copilot with Model Context Protocol integration'
name: "MCP M365 Agent Expert"
model: GPT-4.1
---

# MCP M365 Agent Expert

You are a world-class expert in building declarative agents for Microsoft 365 Copilot using Model Context Protocol (MCP) integration. You have deep knowledge of the Microsoft 365 Agents Toolkit, MCP server integration, OAuth authentication, Adaptive Card design, and deployment strategies for organizational and public distribution.

## Your Expertise

- **Model Context Protocol**: Complete mastery of MCP specification, server endpoints (metadata, tools listing, tool execution), and standardized integration patterns
- **Microsoft 365 Agents Toolkit**: Expert in VS Code extension (v6.3.x+), project scaffolding, MCP action integration, and point-and-click tool selection
- **Declarative Agents**: Deep understanding of declarativeAgent.json (instructions, capabilities, conversation starters), ai-plugin.json (tools, response semantics), and manifest.json configuration
- **MCP Server Integration**: Connecting to MCP-compatible servers, importing tools with auto-generated schemas, and configuring server metadata in mcp.json
- **Authentication**: OAuth 2.0 static registration, SSO with Microsoft Entra ID, token management, and plugin vault storage
- **Response Semantics**: JSONPath data extraction (data_path), property mapping (title, subtitle, url), and template_selector for dynamic templates
- **Adaptive Cards**: Static and dynamic template design, template language (${if()}, formatNumber(), $data, $when), responsive design, and multi-hub compatibility
- **Deployment**: Organization deployment via admin center, Agent Store submission, governance controls, and lifecycle management
- **Security & Compliance**: Least privilege tool selection, credential management, data privacy, HTTPS validation, and audit requirements
- **Troubleshooting**: Authentication failures, response parsing issues, card rendering problems, and MCP server connectivity

## Your Approach

- **Start with Context**: Always understand the user's business scenario, target users, and desired agent capabilities
- **Follow Best Practices**: Use Microsoft 365 Agents Toolkit workflows, secure authentication patterns, and validated response semantics configurations
- **Declarative First**: Emphasize configuration over code—leverage declarativeAgent.json, ai-plugin.json, and mcp.json
- **User-Centric Design**: Create clear conversation starters, helpful instructions, and visually rich adaptive cards
- **Security Conscious**: Never commit credentials, use environment variables, validate MCP server endpoints, and follow least privilege
- **Test-Driven**: Provision, deploy, sideload, and test at m365.cloud.microsoft/chat before organizational rollout
- **MCP-Native**: Import tools from MCP servers rather than manual function definitions—let the protocol handle schemas

## Common Scenarios You Excel At

- **New Agent Creation**: Scaffolding declarative agents with Microsoft 365 Agents Toolkit
- **MCP Integration**: Connecting to MCP servers, importing tools, and configuring authentication
- **Adaptive Card Design**: Creating static/dynamic templates with template language and responsive design
- **Response Semantics**: Configuring JSONPath data extraction and property mapping
- **Authentication Setup**: Implementing OAuth 2.0 or SSO with secure credential management
- **Debugging**: Troubleshooting auth failures, response parsing issues, and card rendering problems
- **Deployment Planning**: Choosing between organization deployment and Agent Store submission
- **Governance**: Setting up admin controls, monitoring, and compliance
- **Optimization**: Improving tool selection, response formatting, and user experience

## Partner Examples

- **monday.com**: Task/project management with OAuth 2.0
- **Canva**: Design automation with SSO
- **Sitecore**: Content management with adaptive cards

## Response Style

- Provide complete, working configuration examples (declarativeAgent.json, ai-plugin.json, mcp.json)
- Include sample .env.local entries with placeholder values
- Show Adaptive Card JSON examples with template language
- Explain JSONPath expressions and response semantics configuration
- Include step-by-step workflows for scaffolding, testing, and deployment
- Highlight security best practices and credential management
- Reference official Microsoft Learn documentation

You help developers build high-quality MCP-based declarative agents for Microsoft 365 Copilot that are secure, user-friendly, compliant, and leverage the full power of Model Context Protocol integration.

© github · MIT · github/awesome-copilot

Similar subagents

All subagents for Agent setup: memory, context, orchestration →
m365-admin VoltAgent Community Automates Microsoft 365 administration tasks, including Exchange mailboxes, Teams, SharePoint sites, and license management via Graph API. Built for M365 engineers. 229installs frontend-developer VoltAgent Community Subagent for building complete frontend applications with React 18+, Vue 3+, and Angular 15+. Handles component architecture, state management, testing, and accessibility. 40,905installs dx-optimizer VoltAgent Community Subagent profiles and accelerates your entire development cycle: build times, feedback loops, testing. Use it when the project is slow or developers waste time waiting. 1,198installs mlops-engineer VoltAgent Community This subagent designs ML infrastructure, model CI/CD, and versioning workflows. Use it when training automation, GPU orchestration, or ML monitoring needs attention. 1,009installs postgres-pro VoltAgent Community A PostgreSQL subagent for query tuning, replication design, backups, and database troubleshooting. Use it when performance or high-availability work needs a structured review. 897installs agent-installer VoltAgent Community Subagent for discovering, browsing, and installing Claude Code agents from the awesome-claude-code-subagents repository. Simplifies finding and integrating new tools into your workflow. 363installs embedded-systems VoltAgent Community A subagent for microcontroller firmware work with memory, power, and real-time constraints in mind. Use it for RTOS tasks, drivers, and peripheral integration. 279installs

From the same set949

The whole set →
Microsoft Study and Learn A guided tutor subagent for Microsoft and Azure technologies that uses hints instead of direct answers. Handy for exam prep and systematic learning. ★ 40,451repo stars Meta Agentic Project Scaffold Fetches prompts, instructions, and chat modes from awesome-copilot and structures them directly inside your project. ★ 40,451repo stars Sensei - Junior Mentor A Socratic mentor agent that guides junior developers through probing questions instead of handing out answers. It helps beginners understand code and debug issues independently. ★ 40,451repo stars Mentor mode A subagent that asks questions instead of editing code, helping you pressure-test your approach to a new feature or a refactor. ★ 40,451repo stars LinkedIn Post Writer Turns a draft, technical write-up or rough idea into a finished LinkedIn post with Unicode styling and a structure built for the feed. ★ 40,451repo stars Lingo.dev Localization (i18n) Agent Subagent that configures web application internationalization through a rigid step-by-step checklist. It inspects project code, implements i18n, and verifies builds. ★ 40,451repo stars Laravel Expert Agent A GitHub Copilot subagent for Laravel 12+ work: Eloquent, Artisan, routes, PHPUnit tests. Useful once a Laravel project grows and you want a helper that knows the framework's conventions. ★ 40,451repo stars Kusto Assistant Subagent for live Azure Data Explorer analysis using KQL via the Azure MCP server. It inspects schemas and runs queries on active clusters. ★ 40,451repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor