Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
github avatar

Mcp Create Declarative Agent

  • 8.6k installs
  • 37.1k repo stars
  • Updated July 28, 2026
  • github/awesome-copilot

mcp-create-declarative-agent is an agent skill that Skill converted from mcp-create-declarative-agent.prompt.md.

About

Skill converted from mcp-create-declarative-agent prompt md name mcp-create-declarative-agent description Skill converted from mcp-create-declarative-agent prompt md 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.

  • Create MCP-based Declarative Agent for Microsoft 365 Copilot
  • **Scaffold declarative agent** via Agents Toolkit
  • **Add MCP action** pointing to MCP server
  • **Select tools** to import from MCP server
  • **Configure authentication** (OAuth 2.0 or SSO)

Mcp Create Declarative Agent by the numbers

  • 8,639 all-time installs (skills.sh)
  • +22 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #160 of 2,184 Testing & QA skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

mcp-create-declarative-agent capabilities & compatibility

Capabilities
create mcp based declarative agent for microsoft · **scaffold declarative agent** via agents toolki · **add mcp action** pointing to mcp server · **select tools** to import from mcp server · **configure authentication** (oauth 2.0 or sso)
Use cases
documentation
From the docs

What mcp-create-declarative-agent says it does

## Requirements Generate the following project structure using Microsoft 365 Agents Toolkit: ### Project Setup 1.
SKILL.md
**Scaffold declarative agent** via Agents Toolkit 2.
SKILL.md
**Add MCP action** pointing to MCP server 3.
SKILL.md
**Select tools** to import from MCP server 4.
SKILL.md
npx skills add https://github.com/github/awesome-copilot --skill mcp-create-declarative-agent

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs8.6k
repo stars37.1k
Security audit2 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorygithub/awesome-copilot

What problem does mcp-create-declarative-agent solve for developers using this skill?

Skill converted from mcp-create-declarative-agent.prompt.md

Who is it for?

Developers who need mcp-create-declarative-agent patterns described in the cached skill documentation.

Skip if: Skip when docs are empty or the task is outside the skill's documented scope.

When should I use this skill?

Skill converted from mcp-create-declarative-agent.prompt.md

What you get

Actionable workflows and conventions from SKILL.md for mcp-create-declarative-agent.

  • declarative agent project
  • MCP integration config
  • auth and tool manifest

By the numbers

  • Configures MCP tool selection and authentication in one declarative agent scaffold

Files

SKILL.mdMarkdownGitHub ↗

````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:

{
  "$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:

{
  "$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:

{
  "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:

{
  "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 ai-plugin.json

Authentication Types

OAuth 2.0 (Static Registration)

"auth": {
  "type": "OAuthPluginVault",
  "reference_id": "${{OAUTH_REFERENCE_ID}}",
  "authorization_url": "https://auth.service.com/authorize",
  "client_id": "${{CLIENT_ID}}",
  "client_secret": "${{CLIENT_SECRET}}",
  "scope": "read write"
}

Single Sign-On (SSO)

"auth": {
  "type": "SSO"
}

Response Semantics

Define Data Mapping

Use response_semantics to extract relevant fields from API responses:

"capabilities": {
  "response_semantics": {
    "data_path": "$.results",
    "properties": {
      "title": "$.name",
      "subtitle": "$.description",
      "url": "$.link"
    }
  }
}

Add Adaptive Cards (Optional)

See the mcp-create-adaptive-cards prompt for adding visual card templates.

Environment Configuration

Create .env.local or .env.dev for credentials:

OAUTH_REFERENCE_ID=your-oauth-reference-id
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret

Testing & Deployment

Local Testing

1. Provision agent in Agents Toolkit 2. Start debugging to sideload in Teams 3. Test in Microsoft 365 Copilot at https://m365.cloud.microsoft/chat 4. Authenticate when prompted 5. Query the agent using natural language

Validation

  • Verify tool imports in ai-plugin.json
  • Check authentication configuration
  • Test each exposed function
  • Validate response data mapping

Best Practices

Tool Design

  • Focused functions: Each tool should do one thing well
  • Clear descriptions: Help the model understand when to use each tool
  • Minimal scoping: Only import tools the agent needs
  • Descriptive names: Use action-oriented function names

Security

  • Use OAuth 2.0 for production scenarios
  • Store secrets in environment variables
  • Validate inputs on the MCP server side
  • Limit scopes to minimum required permissions
  • Use reference IDs for OAuth registration

Instructions

  • Be specific about the agent's purpose and capabilities
  • Define behavior for both successful and error scenarios
  • Reference tools explicitly in instructions when applicable
  • Set expectations for users about what the agent can/cannot do

Performance

  • Cache responses when appropriate on MCP server
  • Batch operations where possible
  • Set timeouts for long-running operations
  • Paginate results for large datasets

Common MCP Server Examples

GitHub MCP Server

URL: https://api.githubcopilot.com/mcp/
Tools: search_repositories, search_users, get_repository
Auth: OAuth 2.0

Jira MCP Server

URL: https://your-domain.atlassian.net/mcp/
Tools: search_issues, create_issue, update_issue
Auth: OAuth 2.0

Custom Service

URL: https://api.your-service.com/mcp/
Tools: Custom tools exposed by your service
Auth: OAuth 2.0 or SSO

Workflow

Ask the user: 1. What MCP server are you integrating with (URL)? 2. What tools should be exposed to Copilot? 3. What authentication method does the server support? 4. What should the agent's primary purpose be? 5. Do you need response semantics or Adaptive Cards?

Then generate:

  • Complete appPackage/ structure (manifest.json, declarativeAgent.json, ai-plugin.json)
  • mcp.json configuration
  • .env.local template
  • Provisioning and testing instructions

Troubleshooting

MCP Server Not Responding

  • Verify server URL is correct
  • Check network connectivity
  • Validate MCP server implements required endpoints

Authentication Fails

  • Verify OAuth credentials are correct
  • Check reference ID matches registration
  • Confirm scopes are requested properly
  • Test OAuth flow independently

Tools Not Appearing

  • Ensure mcp.json points to correct server
  • Verify tools were selected during import
  • Check ai-plugin.json has correct function definitions
  • Re-fetch actions from MCP if server changed

Agent Not Understanding Queries

  • Review instructions in declarativeAgent.json
  • Check function descriptions are clear
  • Verify response_semantics extract correct data
  • Test with more specific queries

````

Related skills

How it compares

Choose mcp-create-declarative-agent for full Copilot declarative agent scaffolds rather than only adding Adaptive Card templates to existing plugins.

FAQ

What does mcp-create-declarative-agent do?

Skill converted from mcp-create-declarative-agent.prompt.md

When should I use mcp-create-declarative-agent?

Skill converted from mcp-create-declarative-agent.prompt.md

Is mcp-create-declarative-agent safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.