Skip to content

Conversation

@pablocast
Copy link
Contributor

Purpose

This pull request adds a new hands-on lab for demonstrating secure, private connectivity to Azure AI Foundry using Model Context Protocol (MCP), Azure API Management, and Azure Front Door. It introduces comprehensive documentation, sample agent scripts, infrastructure configuration, and a clean-up notebook. The lab guides users through deploying a fully private AI infrastructure, securely running MCP agents, and cleaning up resources.

Key changes:

Documentation and Lab Instructions

  • Added a detailed README.MD describing the architecture, deployment steps, testing scenarios, and resource clean-up for the Azure AI Foundry Private Connectivity Lab. The documentation covers the use of private endpoints, APIM, Front Door, Key Vault, a jumpbox VM, and MCP integration, along with step-by-step instructions for setup and testing.

Agent Scripts and Secure Secret Loading

  • Added agent/load_env_from_kv.py, a script for securely loading secrets from Azure Key Vault using managed identity and setting them as environment variables for the agent.
  • Added agent/sample_agents_mcp.py, a comprehensive Python script that demonstrates creating and running an MCP-enabled AI agent, including secure authentication, dynamic tool approval, and step-by-step conversation logging.

Infrastructure Configuration

  • Introduced bicepconfig.json to enable experimental extensibility features and Microsoft Graph extension support for Bicep deployments, supporting advanced infrastructure automation.

Resource Clean-up

  • Added clean-up-resources.ipynb, a Jupyter notebook that provides a simple way to clean up all deployed Azure resources after the lab, helping users avoid unnecessary charges.
  • ...

Does this introduce a breaking change?

[ ] Yes
[ X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

@pablocast pablocast changed the title Adding Foundry Agent MCP Private Connectivity Adding Foundry Agent MCP Private Connectivity Lab Dec 17, 2025
env_var_name = secret_name.replace("-", "_")
os.environ[env_var_name] = secret.value
except Exception as e:
print(f"Error loading secret {secret_name}: {e}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This expression logs
sensitive data (secret)
as clear text.
This expression logs
sensitive data (secret)
as clear text.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not printing out the secret value, just the secret key to help troubleshooting in a test environment

nourshaker-msft and others added 2 commits December 22, 2025 17:20
New image adding MCP private endpoint diagram and updating notebook f…
@nourshaker-msft nourshaker-msft merged commit b7798dd into Azure-Samples:main Dec 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants