Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 8 additions & 8 deletions azure.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
name: multi-agent-custom-automation-engine-solution-accelerator
metadata:
template: multi-agent-custom-automation-engine-solution-accelerator@1.0
# metadata:
# template: multi-agent-custom-automation-engine-solution-accelerator@1.0
requiredVersions:
azd: '>= 1.18.0 != 1.23.9'
hooks:
Expand All @@ -18,12 +18,12 @@ hooks:
Write-Host ""

Write-Host " Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:" -ForegroundColor White
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
Write-Host " 👉 STEP 1: Run the following command in Bash:" -ForegroundColor White
Write-Host " bash infra/scripts/post-provision/build_and_push_images.sh" -ForegroundColor Cyan
Write-Host ""

Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
Write-Host " 👉 STEP 2: Run the following command in Bash:" -ForegroundColor White
Write-Host " bash infra/scripts/post-provision/post_deploy.sh" -ForegroundColor Cyan
Write-Host ""

Expand All @@ -39,12 +39,12 @@ hooks:
Write-Host ""

Write-Host " Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:" -ForegroundColor White
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
Write-Host " 👉 STEP 1: Run the following command in PowerShell:" -ForegroundColor White
Write-Host " .\infra\scripts\post-provision\Build-And-Push-Images.ps1" -ForegroundColor Cyan
Write-Host ""

Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
Write-Host " 👉 STEP 2: Run the following command in PowerShell:" -ForegroundColor White
Write-Host " .\infra\scripts\post-provision\post_deploy.ps1" -ForegroundColor Cyan
Write-Host ""

Expand All @@ -69,11 +69,11 @@ hooks:
printf "${Yellow}===============================================================${NC}\n\n"

printf "Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:\n"
printf " 👉 Run the following command in Bash:\n"
printf " 👉 STEP 1: Run the following command in Bash:\n"
printf " ${Blue}bash infra/scripts/post-provision/build_and_push_images.sh${NC}\n\n"

printf "Upload Team Configurations, index sample data and create the Knowledge base from content Packs:\n"
printf " 👉 Run the following command in Bash:\n"
printf " 👉 STEP 2: Run the following command in Bash:\n"
printf " ${Blue}bash infra/scripts/post-provision/post_deploy.sh${NC}\n\n"

printf "🌐 Access your deployed Frontend application at:\n"
Expand Down
51 changes: 46 additions & 5 deletions src/backend/config/mcp_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,34 @@
# so the LLM only sees the relevant subset (avoids cross-pack tool confusion when
# the MCP server exposes every function at the base /mcp endpoint).
DOMAIN_ALLOWED_TOOLS: dict[str, list[str]] = {
"image": ["generate_marketing_image"],
"hr": [
"get_workflow_blueprint",
"schedule_orientation_session",
"assign_mentor",
"register_for_benefits",
"provide_employee_handbook",
"initiate_background_check",
"request_id_card",
"set_up_payroll",
],
"tech_support": [
"get_workflow_blueprint",
"send_welcome_email",
"set_up_office_365_account",
"configure_laptop",
"setup_vpn_access",
"create_system_accounts",
],
"marketing": [
"generate_press_release",
"handle_influencer_collaboration",
],
"product": [
"get_product_info",
],
"image": [
"generate_marketing_image",
],
}


Expand Down Expand Up @@ -55,10 +82,24 @@ def from_env(cls, domain: str | None = None) -> "MCPConfig":
if not all([url, name, description, tenant_id, client_id]):
raise ValueError(f"{cls.__name__}: missing required environment variables")

# NOTE: URL rewriting to /<domain>/mcp is disabled because the
# currently-deployed MCP server only exposes the catch-all /mcp
# endpoint. We rely on the client-side ``allowed_tools`` filter
# below to scope the LLM's tool surface to the right domain.
# Rewrite base URL to the domain-scoped endpoint so the agent
# connects to e.g. ``http://host:9000/hr/mcp`` instead of the
# catch-all ``/mcp``. The MCP server mounts per-domain FastMCP
# sub-apps at ``/<domain>`` (see mcp_server.py), each serving
# only that domain's tools plus shared services (ask_user).
# The ``allowed_tools`` client-side filter below acts as a
# redundant safety net in case the server layout changes.
if domain:
stripped = url.rstrip("/")
if stripped.endswith("/mcp"):
# Base URL includes the /mcp path (e.g. https://host/mcp)
# → insert domain before /mcp: https://host/hr/mcp
stripped = stripped[: -len("/mcp")]
url = stripped + f"/{domain}/mcp"
else:
# Base URL has no /mcp suffix → append /{domain}
url = stripped + f"/{domain}"

allowed_tools = DOMAIN_ALLOWED_TOOLS.get(domain) if domain else None

return cls(
Expand Down
Loading