Azure AI Foundry (formerly Azure AI Studio) supports MCP servers through the agent service’s tools API. This guide covers adding the PlantDemand MCP server to a Foundry agent so enterprise teams running on Azure can build AI workflows that include plant operations data.
Before you start
- An active PlantDemand account with at least one plant configured
- A Server-Api-Key generated for your account (see SOP 4.1)
- Azure AI Foundry installed and working with at least one MCP server already (or this is your first MCP setup — that is fine too)
- Verify the curl examples in the quickstart work from your network before configuring the client
Configuration
Add the following configuration to Azure AI Foundry:
# Foundry agent tool configuration (JSON)
{
"type": "mcp",
"server_label": "plantdemand",
"server_url": "https://plantdemand.com/mcp",
"headers": {
"Server-Api-Key": "${PLANTDEMAND_SERVER_API_KEY}"
},
"require_approval": "never"
}
Step-by-step setup
- Open Azure AI Foundry at ai.azure.com and navigate to your project.
- Create or open the agent you want to extend. Go to the Tools section.
- Add a new tool of type MCP server. Foundry exposes this through the Azure AI Agent Service SDK and the portal UI.
- Set the server URL to
https://plantdemand.com/mcpand add theServer-Api-Keycustom header. Reference your PlantDemand API key from Azure Key Vault rather than storing it inline. - Configure the approval policy. For internal users you trust, set
require_approvaltonever; for broader rollouts, prompt for approval on each call. - Save and deploy the agent. The PlantDemand tools will be available to any application that uses the agent through the Azure AI Agent Service API.
- Test from the Foundry playground with a prompt like “list my PlantDemand plants” before exposing the agent to end users.
Production considerations
- Store API keys in Azure Key Vault and reference them from the agent configuration. Never commit keys to source control.
- Use a dedicated PlantDemand API key per Foundry agent so audit logs are clean.
- Consider an Azure API Management policy in front of the MCP endpoint if you need to add caching, throttling, or additional logging.
Verifying the connection
After connecting, ask Azure AI Foundry:
“List the plants I have access to in PlantDemand.”
If the assistant returns a list of plants, the connection is working. Try a follow-up:
“What is on the schedule for plant [your plant ID] tomorrow?”
Troubleshooting
- Foundry rejects the MCP tool registration: Verify your project is in a region that supports MCP tools and that your subscription has access to the latest agent features. MCP support rolled out across Foundry through 2025-2026 and may require region-specific availability.
- Key Vault reference fails: Ensure the agent’s managed identity has read access to the secret in Key Vault.
- Agent calls fail intermittently: Check both the Foundry agent logs and the PlantDemand API logs to see where the failure originates. Network egress restrictions on Azure subnets are a common cause.
Where to go next
- Use cases — Real prompts that work well with the MCP server
- Tool reference — Every tool the server exposes
- Security & authentication — Permission model and best practices
- Other client guides