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
- Open Microsoft Copilot Studio
- Navigate to your agent
- Ensure Generative orchestration is enabled
- Go to agent Settings
- Select Generative AI
- Enable Generative orchestration
Step 2: Add MCP Server
- In your agent, select Add a Tool
- Search for "Model Context Protocol" or "MCP"
- Select Connect to MCP Server
- Enter your Seed server details:
{
"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
- Click Authenticate or Connect
- You'll be redirected to your organization's login page
- Log in with your credentials
- Grant consent to allow Copilot Studio to access the MCP server
- 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:
- Go to Tools & Actions
- Review imported MCP actions
- Enable/disable specific actions
- Configure action parameters
Step 5: Test Your Agent
- Open the Test panel
- 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
- Install Visual Studio Code
- Install the Microsoft 365 Agents Toolkit extension
- Sign in with your Microsoft 365 account
Step 2: Create Declarative Agent
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Select Microsoft 365: Create new declarative agent
- Choose MCP-enabled agent template
- Name your agent (e.g., "Seed Agent")
Step 3: Configure MCP Connection
Edit the generated declarativeAgent.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):
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
- In VS Code, open Command Palette
- Select Microsoft 365: Deploy declarative agent
- Choose Deploy to Microsoft 365
- Authenticate with your Microsoft 365 account
- Grant necessary permissions
Step 6: Use in Microsoft 365 Copilot
- Open Microsoft 365 Copilot (Teams, Outlook, or copilot.microsoft.com)
- Click the agent selector
- Find and select your Seed Agent
- Start asking questions that use your Seed tools
Configuration Options
Authentication Types
OAuth 2.0 (Recommended):
{
"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):
{
"authentication": {
"type": "bearer",
"token": "your-personal-access-token"
}
}Server Capabilities
Specify which MCP capabilities to enable:
{
"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:
{
"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
- Open your agent in Copilot Studio
- Go to Test panel
- Try a query that uses a Seed tool:
User: "Check the server health" Agent: [Uses healthcheck tool from Seed]
Test MCP Actions
- Go to Tools & Actions
- Find an imported MCP action
- Click Test
- Provide required parameters
- Verify the response
Debug Connection
In Copilot Studio:
- Go to Settings → MCP Connections
- View connection status
- Check authentication status
- 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
/mcpendpoint 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:
- Go to Microsoft 365 Admin Center
- Navigate to Settings → Copilot
- 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:
{
"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:
{
"name": "Seed Server",
"capabilities": {
"tools": {
"healthcheck": {
"enabled": true,
"cache_ttl": 300
}
}
}
}Conditional Access
Implement conditional access based on user context:
{
"mcp_servers": [
{
"name": "seed",
"url": "https://mcp.example.com/mcp",
"conditions": {
"user_groups": ["Administrators", "Developers"]
}
}
]
}Next Steps
- Microsoft Learn - MCP in Copilot Studio - Official documentation
- Build Declarative Agents with MCP - Developer guide
- Tools Overview - See available Seed tools
- API Reference - Complete API documentation