Skip to content

Unable to connect MCP to Foundry using project name: PowerShell script parameter error #75

@Menghua1

Description

@Menghua1

Describe:
When testing Microsoft Foundry integration, connecting an MCP server with Option 2 (project name) using the follow command:

.\scripts\Setup-AIFoundry-Connection.ps1 `
  -AIFoundryProjectName "YOUR-PROJECT-NAME" `
  -ResourceGroup "YOUR-RESOURCE-GROUP"

The script fails and reports that both -AIFoundryProjectName and -AIFoundryAccountName parameters are required, as shown in the image below.
Image

Repro Steps:

  1. Run git clone https://github.com/AzureCosmosDB/MCPToolKit.git and cd MCPToolKit.
  2. Deploy Infrastructure via Azure Developer CLI (azd up).
  3. Run .\scripts\Deploy-Cosmos-MCP-Toolkit.ps1 -ResourceGroup "YOUR-RESOURCE-GROUP" -EntraAppName "My Custom MCP App".
  4. Run
.\scripts\Setup-AIFoundry-Connection.ps1 `
  -AIFoundryProjectName "YOUR-PROJECT-NAME" `
  -ResourceGroup "YOUR-RESOURCE-GROUP"

Environment:

  • OS: Windows
  • Azd version: azd version 1.21.3 (commit b01891fc63b1faf9a9633cdc630deab0b4d569c4).

Expected behavior:
The command to connect MCP to Foundry using the project name runs successfully.

Suggestion:
The command to update Option 2: Using Project Name is:

.\scripts\Setup-AIFoundry-Connection.ps1 `
  -AIFoundryProjectName "YOUR-PROJECT-NAME" `
  -AIFoundryAccountName "YOUR-ACCOUNT-NAME" `
  -ResourceGroup "YOUR-RESOURCE-GROUP"

@sajeetharan and @hemarina for notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions