Skip to content
AI Productivity Insights

Tutorial · Step 3 of 5 · 1 min read

Creating an MCP Server with Azure AI Agent Service

Step-by-Step Guide: Creating an MCP Server with Azure AI Agent Service for TripAdvisor Marketing Campaign

Step 3: Set Up the MCP Server to connect with Azure AI Agent Service

Before you begin, ensure you have the following prerequisites and technical requirements in place to successfully implement and work with the MCP server:

  1. Install Visual Studio Code: https://code.visualstudio.com/
  2. Install Git: https://git-scm.com/downloads
  3. Install Python: https://www.python.org/downloads/
  4. Install Claude Desktop App: https://claude.ai/download
  5. Install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Detailed Step-by-Step Implementation Guide

  1. Open Visual Studio Code, select “Clone Git Repository”

Screenshot of the Visual Studio Code welcome page with Clone Git Repository highlighted.

  1. Enter the URL: https://github.com/azure-ai-foundry/mcp-foundry.git and press enter

Screenshot of Visual Studio Code with the mcp-foundry repository URL from GitHub entered and Clone from URL highlighted.

  1. Select Drive C:\ and click “Select as Repository Destination”

Screenshot of the Visual Studio Code dialog choosing where to clone the repository, with the C drive selected and Select as Repository Destination indicated.

  1. Click “Open”

Screenshot of the Visual Studio Code prompt asking whether to open the cloned repository, with the Open button indicated.

  1. Select “New Terminal” from the Menu.

Screenshot of Visual Studio Code with the cloned mcp-foundry project open and the Terminal menu showing New Terminal.

  1. Type the following commands in your terminal:

Screenshot of Visual Studio Code with a PowerShell terminal open in the mcp-foundry folder, ready for the setup commands.

PS C:\mcp-foundry>python -m venv .venv and press enter
PS C:\mcp-foundry>.venv\Scripts\activate (For Windows) or source .venv\bin\activate (For Mac) and press enter

(.venv) PS C:\mcp-foundry> pip install azure-identity python-dotenv azure-ai-projects aiohttp and press enter
(.venv) PS C:\mcp-foundry> pip install mcp and press enter

  1. Open Command Prompt, type az login, and follow the prompts to select your Azure account. When prompted, enter your Azure subscription number and press Enter.

Screenshot of the Azure CLI after running az login in Command Prompt: it lists the available Azure subscription, and you type its number, 1, to select it.

Newsletter

Get AI productivity insights delivered

Practical AI guides, tutorials, and fresh insights in your inbox.