React + FastAPI app for chatting with an Azure AI Foundry Agent that uses an Atlassian MCP server.
This repo contains:
- A React frontend for Microsoft Entra sign-in and chat UX
- A FastAPI backend that validates the user token and calls Azure AI Foundry on behalf of the user
- Helper scripts for creating/updating the Foundry Agent
At runtime, the backend also serves the built frontend and generates env-config.js, so production deployment only needs one container.
- Python 3.11+
- Node.js 20+
- An Azure AI Foundry project
- A Microsoft Entra app registration for the frontend
- An MCP connection already configured in your Foundry project
- Azure CLI login for local script usage:
az loginBackend and scripts share one Python dependency file:
pip install -r requirements.txtFrontend dependencies:
cd frontend
npm install
cd ..Use the helper script:
python scripts/create_foundry_agent.pyWhat it does:
- Connects to your Foundry project using
DefaultAzureCredential - Looks up the agent by
AGENT_NAME - Deletes the latest version if it already exists
- Creates a fresh version with the configured MCP tool
- Applies the configured
AGENT_MODEL - Applies the configured
AGENT_REASONING_EFFORT
Run the frontend and backend separately.
Terminal 1:
cd frontend
npm startTerminal 2:
uvicorn backend.foundry_agent_server:app --host 0.0.0.0 --port 8765 --reloadNotes:
frontend/start-dev.shloads values from the root.envfor local CRA development.- The frontend runs on
http://localhost:3500. - The backend runs on
http://localhost:8765.
Build:
docker build -t foundry-atlassian-agent:0.0.1 .Run:
docker run -p 8765:8765 \
-e MSAL_CLIENT_ID="your-azure-ad-client-id" \
-e AZURE_TENANT_ID="your-azure-ad-tenant-id" \
-e FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-account.services.ai.azure.com/api/projects/your-foundry-project" \
-e FRONTEND_REDIRECT_URI="https://your-app-domain" \
-e AGENT_NAME="FoundryAtlassianAgent" \
foundry-atlassian-agent:0.0.1The app is then available at:
http://localhost:8765