
Mcp Create Declarative Agent
Scaffold a Microsoft 365 Copilot declarative agent that connects to your MCP server with OAuth and imported tools.
Overview
MCP Create Declarative Agent is an agent skill for the Build phase that scaffolds a Microsoft 365 Copilot declarative agent integrated with an MCP server, authentication, and selected tools.
Install
npx skills add https://github.com/github/awesome-copilot --skill mcp-create-declarative-agentWhat is this skill?
- End-to-end flow: Agents Toolkit scaffold → MCP action → tool import → auth review
- Generates appPackage artifacts: manifest.json, ai-plugin.json, declarativeAgent.json
- Supports OAuth 2.0 or SSO configuration for external system access
- Teams devPreview manifest schema with declarative agent / API plugin tags
- Uses agent mode with codebase search, edits, and problems diagnostics
- Five-step project setup from scaffold through manifest review
- Key outputs include manifest.json, ai-plugin.json, and declarativeAgent.json
Adoption & trust: 8.5k installs on skills.sh; 34.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have an MCP server and business APIs but no Copilot-ready declarative agent package with manifests, plugin metadata, and working OAuth.
Who is it for?
Builders deploying custom Copilot agents that must call external systems through MCP with OAuth or SSO.
Skip if: Teams who only need a local Claude/Cursor MCP config without Microsoft 365 packaging or Agents Toolkit.
When should I use this skill?
You need to create a declarative Microsoft 365 Copilot agent that integrates an MCP server with authentication and tool selection.
What do I get? / Deliverables
You get a Toolkit-scaffolded M365 Copilot agent with MCP action configuration and reviewed manifest/plugin JSON ready to test and ship in Teams.
- Teams appPackage with manifest and plugin references
- Declarative agent configuration tied to MCP actions
- Auth configuration checklist for OAuth 2.0 or SSO
Recommended Skills
Journey fit
Declarative agents, MCP actions, and Teams app manifests are integration work done while building the product surface inside M365. The skill centers on MCP server wiring, tool selection, and plugin manifests—not generic frontend or docs alone.
How it compares
Microsoft 365 declarative-agent packaging skill—not a generic MCP server authoring or Claude Code skill installer.
Common Questions / FAQ
Who is mcp-create-declarative-agent for?
Solo builders and indie teams shipping Microsoft 365 Copilot extensions who already use or plan MCP servers for external data and actions.
When should I use mcp-create-declarative-agent?
During Build integrations when you need Agents Toolkit scaffolding, MCP tool import, and OAuth-backed Copilot plugins before handing off to test and launch in Teams.
Is mcp-create-declarative-agent safe to install?
Treat it as code that edits manifests and auth settings—review the Security Audits panel on this page and verify OAuth scopes and MCP endpoints before production.
SKILL.md
READMESKILL.md - Mcp Create Declarative Agent
````prompt --- mode: 'agent' tools: ['changes', 'search/codebase', 'edit/editFiles', 'problems'] description: 'Create a declarative agent for Microsoft 365 Copilot by integrating an MCP server with authentication, tool selection, and configuration' model: 'gpt-4.1' tags: [mcp, m365-copilot, declarative-agent, model-context-protocol, api-plugin] --- # Create MCP-based Declarative Agent for Microsoft 365 Copilot Create a complete declarative agent for Microsoft 365 Copilot that integrates with a Model Context Protocol (MCP) server to access external systems and data. ## Requirements Generate the following project structure using Microsoft 365 Agents Toolkit: ### Project Setup 1. **Scaffold declarative agent** via Agents Toolkit 2. **Add MCP action** pointing to MCP server 3. **Select tools** to import from MCP server 4. **Configure authentication** (OAuth 2.0 or SSO) 5. **Review generated files** (manifest.json, ai-plugin.json, declarativeAgent.json) ### Key Files Generated **appPackage/manifest.json** - Teams app manifest with plugin reference: ```json { "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", "manifestVersion": "devPreview", "version": "1.0.0", "id": "...", "developer": { "name": "...", "websiteUrl": "...", "privacyUrl": "...", "termsOfUseUrl": "..." }, "name": { "short": "Agent Name", "full": "Full Agent Name" }, "description": { "short": "Short description", "full": "Full description" }, "copilotAgents": { "declarativeAgents": [ { "id": "declarativeAgent", "file": "declarativeAgent.json" } ] } } ``` **appPackage/declarativeAgent.json** - Agent definition: ```json { "$schema": "https://aka.ms/json-schemas/copilot/declarative-agent/v1.0/schema.json", "version": "v1.0", "name": "Agent Name", "description": "Agent description", "instructions": "You are an assistant that helps with [specific domain]. Use the available tools to [capabilities].", "capabilities": [ { "name": "WebSearch", "websites": [ { "url": "https://learn.microsoft.com" } ] }, { "name": "MCP", "file": "ai-plugin.json" } ] } ``` **appPackage/ai-plugin.json** - MCP plugin manifest: ```json { "schema_version": "v2.1", "name_for_human": "Service Name", "description_for_human": "Description for users", "description_for_model": "Description for AI model", "contact_email": "support@company.com", "namespace": "serviceName", "capabilities": { "conversation_starters": [ { "text": "Example query 1" } ] }, "functions": [ { "name": "functionName", "description": "Function description", "capabilities": { "response_semantics": { "data_path": "$", "properties": { "title": "$.title", "subtitle": "$.description" } } } } ], "runtimes": [ { "type": "MCP", "spec": { "url": "https://api.service.com/mcp/" }, "run_for_functions": ["functionName"], "auth": { "type": "OAuthPluginVault", "reference_id": "${{OAUTH_REFERENCE_ID}}" } } ] } ``` **/.vscode/mcp.json** - MCP server configuration: ```json { "serverUrl": "https://api.service.com/mcp/", "pluginFilePath": "appPackage/ai-plugin.json" } ``` ## MCP Server Integration ### Supported MCP Endpoints The MCP server must provide: - **Server metadata** endpoint - **Tools listing** endpoint (exposes available functions) - **Tool execution** endpoint (handles function calls) ### Tool Selection When importing from MCP: 1. Fetch available tools from server 2. Select specific tools to include (for security/simplicity) 3. Tool definitions are auto-generated in a