1. Conduid
  2. Science
  3. Meai Azure AI Foundry MCP Sample
MCP server · Science

Meai Azure AI Foundry MCP Sample

.NET is also capable of building AI infused app really easily. This repository provides several sample apps using Microsoft.Extensions.AI, Azure AI Foundry, Foundry Local and MCP server/client.

34Low

Scored 6 months ago · breakdown

About Meai Azure AI Foundry MCP Sample

Meai Azure AI Foundry MCP Sample is an MCP server in the Science category: .NET is also capable of building AI infused app really easily. This repository provides several sample apps using Microsoft.Extensions.AI, Azure AI Foundry, Foundry Local and MCP server/client.

Install

From source
git clone https://github.com/devkimchi/meai-azure-ai-foundry-mcp-sample

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Meai Azure AI Foundry MCP Sample

Powered by Claude · Grounded in docs

I know everything about Meai Azure AI Foundry MCP Sample. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MEAI, Azure AI Foundry, Foundry Local and MCP Sample

Did you know .NET is the most versatile language to build both frontend and backend apps? In addition to that, .NET is also capable of building AI infused app really easily. This repository provides several sample apps using Microsoft.Extensions.AI, Azure AI Foundry, Foundry Local and MCP server/client.

Prerequisites

Getting started

Build Foundry Local SDK

NOTE: This is an interim solution until the official NuGet package is ready.

  1. Clone Foundry Local repository.

    git clone https://github.com/microsoft/Foundry-Local.git foundry-local
    
  2. Build the C# SDK.

    cd foundry-local/sdk/cs
    dotnet restore && dotnet build
    
  3. Get the NuGet package location.

    # bash/zsh
    FOUNDRY_LOCAL_NUGET_PACKAGE_PATH=$(find $(pwd) -name "*.nupkg" -type f -exec dirname {} \; | sort -u)
    
    # PowerShell
    $FOUNDRY_LOCAL_NUGET_PACKAGE_PATH = $(Get-ChildItem -Path . -Filter *.nupkg -Recurse).Directory.FullName
    

Get ready to run apps on your local machine

  1. Clone this repository.

    git clone https://github.com/devkimchi/meai-azure-ai-foundry-mcp-sample.git
    
  2. Create nuget.config. {{FOUNDRY_LOCAL_NUGET_PACKAGE_PATH}} is the value from the previous section.

    # bash/zsh
    cd meai-azure-ai-foundry-mcp-sample
    cat ./nuget.sample.config \
        | sed 's|/path/to/foundry-local/sdk/cs/src/bin/Debug|{{FOUNDRY_LOCAL_NUGET_PACKAGE_PATH}}|g' \
        > nuget.config
    
    # PowerShell
    cd meai-azure-ai-foundry-mcp-sample
    $(Get-Content -Path ./nuget.sample.config) `
        -replace "/path/to/foundry-local/sdk/cs/src/bin/Debug", "{{FOUNDRY_LOCAL_NUGET_PACKAGE_PATH}}" `
        | Out-File -Path nuget.config -Force
    

    NOTE: This step is only required until the official NuGet package is published.

Run Microsoft.Extensions.AI sample app

  1. Make sure you have API keys for OpenAI, Azure OpenAI, GitHub Models, Anthropic and/or Google Vertex AI.

  2. Store those API keys to user secrets:

    # OpenAI
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint=https://api.openai.com/v1;Key={{OPENAI_API_KEY}}"
    
    # Azure OpenAI
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint={{AZURE_OPENAI_ENDPOINT}};Key={{AZURE_OPENAI_API_KEY}}"
    
    # GitHub Models
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint=https://models.inference.ai.azure.com;Key={{GITHUB_PAT}}"
    
    # Anthropic
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:anthropic "Endpoint=https://api.anthropic.com;Key={{ANTHROPIC_API_KEY}}"
    
    # Google Vertex AI
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:google "Endpoint=https://generativelanguage.googleapis.com;Key={{GOOGLE_API_KEY}}"
    
  3. Make sure which LLM you're going to use at src/Meai.ClientApp/appsettings.json

    // To use OpenAI, Azure OpenAI or GitHub Models
    {
      "MEAI": {
        "ChatClient": "openai"
      }
    }
    
    // To use Anthropic
    {
      "MEAI": {
        "ChatClient": "anthropic"
      }
    }
    
    // To use Google Vertex AI
    {
      "MEAI": {
        "ChatClient": "google"
      }
    }
    
  4. Run the app.

    dotnet watch run --project ./src/Meai.ClientApp
    

Run Azure AI Foundry sample app

  1. Make sure you have an API key for Azure AI Foundry.

  2. Store the API key to user secrets:

    # Azure AI Foundry
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:foundry "Endpoint={{AZURE_AI_FOUNDRY_ENDPOINT}};Key={{AZURE_AI_FOUNDRY_API_KEY}}"
    
  3. Make sure which LLM you're going to use at src/Foundry.ClientApp/appsettings.json

    {
      "MEAI": {
        "ChatClient": "foundry"
      }
    }
    
  4. Run the app.

    dotnet watch run --project ./src/Foundry.ClientApp
    

Run Foundry Local sample app

  1. Make sure you have installed Foundry Local CLI.

  2. Add model to Foundry Local. You can add any model from the list by running foundry model ls.

    foundry model download qwen2.5-0.5b
    
  3. Make sure which LLM you're going to use at src/Foundry.ClientApp/appsettings.json

    {
      "MEAI": {
        "ChatClient": "local"
      }
    }
    
  4. Run the app.

    dotnet watch run --project ./src/Foundry.ClientApp
    

Run MCP server/client sample app

  1. Make sure you have API keys for OpenAI, Azure OpenAI or GitHub Models.

  2. Store those API keys to user secrets:

    # OpenAI
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint=https://api.openai.com/v1;Key={{OPENAI_API_KEY}}"
    
    # Azure OpenAI
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint={{AZURE_OPENAI_ENDPOINT}};Key={{AZURE_OPENAI_API_KEY}}"
    
    # GitHub Models
    dotnet user-secrets --project ./src/Meai.ClientApp set ConnectionStrings:openai "Endpoint=https://models.inference.ai.azure.com;Key={{GITHUB_PAT}}"
    
  3. Run the MCP server app.

    dotnet run --project ./src/McpTodo.ServerApp
    
  4. Run the MCP client app in another terminal.

    dotnet watch run --project ./src/mcpTodo.ClientApp
    

Known Issues: Installing Foundry Local CLI

On Windows, if you keep failing to install Foundry Local CLI on your machine, try this way as a workaround:

# Download the package and its dependency
$releaseUri = "https://github.com/microsoft/Foundry-Local/releases/download/v0.3.9267/FoundryLocal-x64-0.3.9267.43123.msix"
Invoke-WebRequest -Method Get -Uri $releaseUri -OutFile ./FoundryLocal.msix
$crtUri = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
Invoke-WebRequest -Method Get -Uri $crtUri -OutFile ./VcLibs.appx

# Install the Foundry Local package
Add-AppxPackage ./FoundryLocal.msix -DependencyPath ./VcLibs.appx

More resources

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Meai Azure AI Foundry MCP Sample

How do I install Meai Azure AI Foundry MCP Sample?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Meai Azure AI Foundry MCP Sample safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Meai Azure AI Foundry MCP Sample still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.