Skip to content

Connecting Microsoft Copilot

Step-by-step guide to connect Microsoft Copilot Studio and Microsoft 365 Copilot to your Seed MCP server.

Prerequisites

Before you begin:

  • [ ] Microsoft Copilot Studio access - Access through your Microsoft 365 subscription
  • [ ] Seed server URL - Get this from your administrator (e.g., https://mcp.example.com)
  • [ ] OAuth endpoints - Authorization and token URLs from your administrator
  • [ ] Admin permissions - May need tenant admin for some configurations

Overview

Microsoft Copilot Studio supports the Model Context Protocol (MCP), allowing you to connect your Seed server directly to your Copilot agents. When connected, tools and knowledge from your Seed server are automatically added to your agent.

Option 1: Microsoft Copilot Studio

Connect your Seed server to agents in Microsoft Copilot Studio.

Step 1: Enable MCP Support

  1. Open Microsoft Copilot Studio
  2. Navigate to your agent
  3. Ensure Generative orchestration is enabled
    • Go to agent Settings
    • Select Generative AI
    • Enable Generative orchestration

Step 2: Add MCP Server

  1. In your agent, select Add a Tool
  2. Search for "Model Context Protocol" or "MCP"
  3. Select Connect to MCP Server
  4. Enter your Seed server details:
json
{
  "name": "Seed MCP Server",
  "url": "https://YOUR_SERVER_URL/mcp",
  "authentication": {
    "type": "oauth2",
    "authorizationUrl": "https://YOUR_SERVER_URL/oauth/authorize",
    "tokenUrl": "https://YOUR_SERVER_URL/oauth/token",
    "clientId": "copilot-studio",
    "scope": "openid profile email"
  }
}

Step 3: Authenticate

  1. Click Authenticate or Connect
  2. You'll be redirected to your organization's login page
  3. Log in with your credentials
  4. Grant consent to allow Copilot Studio to access the MCP server
  5. You'll be redirected back to Copilot Studio

Step 4: Configure Actions

Once connected, Copilot Studio will automatically:

  • Import all available tools as Actions
  • Import prompts as Topics
  • Import resources as Knowledge sources

You can customize which actions are available:

  1. Go to Tools & Actions
  2. Review imported MCP actions
  3. Enable/disable specific actions
  4. Configure action parameters

Step 5: Test Your Agent

  1. Open the Test panel
  2. Try queries that use your Seed tools:
    "Check the server health"
    "Show me my user information"
    "What's the server configuration?"

Option 2: Microsoft 365 Copilot (Declarative Agents)

Connect Seed to Microsoft 365 Copilot using declarative agents.

Step 1: Install Visual Studio Code

  1. Install Visual Studio Code
  2. Install the Microsoft 365 Agents Toolkit extension
  3. Sign in with your Microsoft 365 account

Step 2: Create Declarative Agent

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Select Microsoft 365: Create new declarative agent
  3. Choose MCP-enabled agent template
  4. Name your agent (e.g., "Seed Agent")

Step 3: Configure MCP Connection

Edit the generated declarativeAgent.json:

json
{
  "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.0/schema.json",
  "name": "Seed Agent",
  "description": "Access to Seed MCP server tools and resources",
  "instructions": "You help users access tools and information from the Seed MCP server.",
  "mcp_servers": [
    {
      "name": "seed",
      "url": "https://YOUR_SERVER_URL/mcp",
      "authentication": {
        "type": "oauth2",
        "authorization_url": "https://YOUR_SERVER_URL/oauth/authorize",
        "token_url": "https://YOUR_SERVER_URL/oauth/token",
        "client_id": "m365-copilot",
        "scope": "openid profile email"
      }
    }
  ]
}

Step 4: Register OAuth Client

Register your agent with your Seed server (if required):

bash
curl -X POST https://YOUR_SERVER_URL/oauth/register \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Microsoft 365 Copilot",
    "redirect_uris": ["https://microsoft.com/copilot/callback"],
    "grant_types": ["authorization_code", "refresh_token"],
    "response_types": ["code"],
    "token_endpoint_auth_method": "none"
  }'

Save the returned client_id and update your declarativeAgent.json.

Step 5: Deploy Agent

  1. In VS Code, open Command Palette
  2. Select Microsoft 365: Deploy declarative agent
  3. Choose Deploy to Microsoft 365
  4. Authenticate with your Microsoft 365 account
  5. Grant necessary permissions

Step 6: Use in Microsoft 365 Copilot

  1. Open Microsoft 365 Copilot (Teams, Outlook, or copilot.microsoft.com)
  2. Click the agent selector
  3. Find and select your Seed Agent
  4. Start asking questions that use your Seed tools

Configuration Options

Authentication Types

OAuth 2.0 (Recommended):

json
{
  "authentication": {
    "type": "oauth2",
    "authorization_url": "https://mcp.example.com/oauth/authorize",
    "token_url": "https://mcp.example.com/oauth/token",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
    "scope": "openid profile email"
  }
}

Personal Access Token (PAT):

json
{
  "authentication": {
    "type": "bearer",
    "token": "your-personal-access-token"
  }
}

Server Capabilities

Specify which MCP capabilities to enable:

json
{
  "mcp_servers": [
    {
      "name": "seed",
      "url": "https://mcp.example.com/mcp",
      "capabilities": {
        "tools": true,
        "prompts": true,
        "resources": true
      }
    }
  ]
}

Multiple MCP Servers

Connect to multiple MCP servers:

json
{
  "mcp_servers": [
    {
      "name": "seed-production",
      "url": "https://mcp.example.com/mcp",
      "authentication": { /* ... */ }
    },
    {
      "name": "seed-development",
      "url": "https://dev.example.com/mcp",
      "authentication": { /* ... */ }
    }
  ]
}

Testing Your Connection

Test in Copilot Studio

  1. Open your agent in Copilot Studio
  2. Go to Test panel
  3. Try a query that uses a Seed tool:
    User: "Check the server health"
    Agent: [Uses healthcheck tool from Seed]

Test MCP Actions

  1. Go to Tools & Actions
  2. Find an imported MCP action
  3. Click Test
  4. Provide required parameters
  5. Verify the response

Debug Connection

In Copilot Studio:

  1. Go to SettingsMCP Connections
  2. View connection status
  3. Check authentication status
  4. Review error logs

Troubleshooting

Connection Issues

"Cannot connect to MCP server"

  • Verify the server URL is accessible from Microsoft's infrastructure
  • Check firewall rules allow connections from Microsoft IP ranges
  • Ensure the /mcp endpoint is responding

"MCP server configuration invalid"

  • Validate JSON syntax in configuration
  • Ensure all required fields are present
  • Check authentication URLs are correct

Authentication Issues

"OAuth authentication failed"

  • Verify OAuth endpoints are publicly accessible
  • Check client_id is registered with your Seed server
  • Ensure redirect URIs are configured correctly
  • Confirm authorization and token URLs are correct

"Token expired"

  • Copilot Studio should auto-refresh tokens
  • If persisting, disconnect and reconnect the MCP server
  • Check refresh token is valid

Action/Tool Issues

"Action not found"

  • Verify tools are registered in your Seed server
  • Refresh the MCP connection in Copilot Studio
  • Check tool names and descriptions are valid

"Action execution failed"

  • Check tool parameters are correct
  • Verify user has permissions for the action
  • Review Seed server logs for errors

Enterprise Management

Tenant-Level Settings

Administrators can manage MCP connections at the tenant level:

  1. Go to Microsoft 365 Admin Center
  2. Navigate to SettingsCopilot
  3. Configure MCP Server Policies:
    • Allow/block specific MCP servers
    • Require approval for new connections
    • Set authentication requirements

Compliance & Security

Data Governance:

  • MCP connections respect Microsoft 365 data governance policies
  • Sensitivity labels apply to data accessed via MCP
  • DLP policies apply to MCP responses

Audit Logging:

  • MCP actions are logged in Microsoft 365 audit logs
  • Review logs in Microsoft Purview Compliance Portal
  • Search for "MCP" activities

Permission Requirements

Users need these permissions:

  • Copilot Studio: System Administrator or Environment Maker role
  • M365 Copilot: Copilot license and tenant policy enabling MCP
  • Agent Creation: Appropriate Microsoft 365 roles

Best Practices

Agent Instructions

Provide clear instructions for your agent:

json
{
  "instructions": "You are a helpful assistant with access to the Seed MCP server. When users ask about server status, use the healthcheck tool. When they ask about their information, use the user-info tool. Always provide clear, concise responses."
}

Tool Descriptions

Ensure your Seed tools have clear descriptions:

  • Copilot Studio uses descriptions to understand when to call tools
  • Include parameter descriptions
  • Specify expected outputs

Error Handling

Handle MCP errors gracefully:

  • Provide fallback responses when tools fail
  • Log errors for troubleshooting
  • Notify users clearly when actions can't complete

Advanced Configuration

Custom Capabilities

Define custom capabilities for specific scenarios:

json
{
  "name": "Seed Server",
  "capabilities": {
    "tools": {
      "healthcheck": {
        "enabled": true,
        "cache_ttl": 300
      }
    }
  }
}

Conditional Access

Implement conditional access based on user context:

json
{
  "mcp_servers": [
    {
      "name": "seed",
      "url": "https://mcp.example.com/mcp",
      "conditions": {
        "user_groups": ["Administrators", "Developers"]
      }
    }
  ]
}

Next Steps

Resources

Released under the MIT License.