Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions python/claude/sample-agent/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ CLAUDE_MODEL=claude-sonnet-4-20250514
# MCP (Model Context Protocol) CONFIGURATION (Optional)
# =============================================================================

# Environment mode for MCP Tooling
# Set to "Development" to load MCP servers from local ToolingManifest.json
# In production, servers are discovered from the Tooling Gateway
Comment thread
JoanBency marked this conversation as resolved.
Outdated
ENVIRONMENT=Development

# MCP Server Host
MCP_SERVER_HOST=

Expand Down Expand Up @@ -111,10 +116,11 @@ OBSERVABILITY_SERVICE_NAME=claude-agent
OBSERVABILITY_SERVICE_NAMESPACE=agent365-samples

# Enable Agent 365 Observability Exporter (optional, defaults to false)
# Set to "true" to export telemetry to Agent 365 backend
# When false, uses ConsoleSpanExporter for local debugging
# Set to "true" to export telemetry to Agent 365 backend for production monitoring
ENABLE_A365_OBSERVABILITY_EXPORTER=false

OTEL_LOG_LEVEL=debug

# Python environment (influences target cluster/category)
# Options: development, production
PYTHON_ENVIRONMENT=development
41 changes: 40 additions & 1 deletion python/claude/sample-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,46 @@ The Claude Agent SDK provides these tools out of the box:
- **Bash**: Execute shell commands
- **Grep**: Search file contents

No additional MCP server configuration needed!
## MCP Tooling Integration

This sample also supports MCP (Model Context Protocol) tools for extended capabilities like email, calendar, and other Microsoft 365 services.

### MCP Configuration

MCP servers are configured in `ToolingManifest.json`:

```json
{
"mcpServers": [
{
"mcpServerName": "mcp_MailTools",
"mcpServerUniqueName": "mcp_MailTools",
"url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools",
"scope": "McpServers.Mail.All",
"audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1"
}
]
}
```

### Environment Variables for MCP

Add these to your `.env` file:

```
# Set to Development to load MCP servers from local ToolingManifest.json
ENVIRONMENT=Development

# Set to true to use proper token exchange for MCP authentication (required for cloud MCP servers)
USE_AGENTIC_AUTH=true
```
Comment thread
JoanBency marked this conversation as resolved.

### MCP Authentication

MCP tools require proper Azure authentication:

- **Development**: Set `ENVIRONMENT=Development` and `USE_AGENTIC_AUTH=false` with a valid `BEARER_TOKEN`
- **Production**: Uses token exchange with proper scopes via the Microsoft 365 Agents SDK

## Support

Expand Down
14 changes: 14 additions & 0 deletions python/claude/sample-agent/ToolingManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
"url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools",
"scope": "McpServers.Mail.All",
"audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1"
},
{
"mcpServerName": "mcp_M365Copilot",
"mcpServerUniqueName": "mcp_M365Copilot",
"url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_M365Copilot",
"scope": "McpServers.CopilotMCP.All",
"audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1"
},
{
"mcpServerName": "mcp_CalendarTools",
"mcpServerUniqueName": "mcp_CalendarTools",
"url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_CalendarTools",
"scope": "McpServers.Calendar.All",
"audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1"
}
]
}
Loading
Loading