home / mcp / azure ai foundry mcp server

Azure AI Foundry MCP Server

Repository created by GitHub Project Operator

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "youssef7788-mcp-foundry": {
      "command": "uvx",
      "args": [
        "--prerelease=allow",
        "--from",
        "git+https://github.com/azure-ai-foundry/mcp-foundry.git",
        "run-azure-ai-foundry-mcp",
        "--envFile",
        "${workspaceFolder}/.env"
      ],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN",
        "EVAL_DATA_DIR": "path/to/eval/data",
        "AZURE_CLIENT_ID": "YOUR_CLIENT_ID",
        "AZURE_TENANT_ID": "YOUR_TENANT_ID",
        "AZURE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "AZURE_OPENAI_API_KEY": "YOUR_AZURE_OPENAI_API_KEY",
        "AZURE_OPENAI_ENDPOINT": "https://<your-openai-endpoint>.cognitiveservices.azure.com/",
        "AZURE_AI_SEARCH_API_KEY": "YOUR_SEARCH_API_KEY",
        "AZURE_OPENAI_DEPLOYMENT": "YOUR_DEPLOYMENT_NAME",
        "AZURE_AI_SEARCH_ENDPOINT": "https://<your-search-service-name>.search.windows.net/",
        "AZURE_OPENAI_API_VERSION": "2023-06-01-preview",
        "AZURE_AI_PROJECT_ENDPOINT": "https://<your-ai-project-endpoint>",
        "AZURE_AI_SEARCH_API_VERSION": "2025-03-01-preview",
        "SEARCH_AUTHENTICATION_METHOD": "service-principal"
      }
    }
  }
}

You have an MCP server that connects with Azure AI Foundry to provide a unified set of tools for models, knowledge, evaluation, and more. This server enables you to explore, build, deploy, evaluate, and fine-tune AI models within Azure AI Foundry, all through a consistent MCP interface you can run locally or remotely.

How to use

You interact with the MCP server using a compatible MCP client. Start the server locally, then point your MCP client to the local stdio interface or to a remote HTTP endpoint if you deploy it behind a web gateway. You can access tools to explore models, manage indexes and documents, execute evaluations, and handle fine-tuning tasks. Use the client to invoke specific tools by name, pass the required inputs, and receive structured responses that you can display or further process in your application.

How to install

Prerequisites: install the MCP runtime adapter you will use to run stdio MCP servers, such as uvx.

Step 1: Create your workspace and environment file if you plan to use environment variables. Create a file named .env at the root of your workspace and add the necessary credentials and configuration values.

Step 2: Create the MCP configuration file in your workspace at .vscode/mcp.json with the stdio server configuration provided below.

Step 3: Start the MCP server from your editor or terminal. Use the Start button or run the following command through your editor integration to launch the server.

{
  "servers": {
    "foundry": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--prerelease=allow",
        "--from",
        "git+https://github.com/azure-ai-foundry/mcp-foundry.git",
        "run-azure-ai-foundry-mcp",
        "--envFile",
        "${workspaceFolder}/.env"
      ]
    }
  }
}

Additional setup and notes

Environment variables (examples shown; replace with your actual values) can be provided in a .env file or in your environment when launching the server. These variables control access to Azure AI Search, Azure OpenAI, evaluation datasets, and other service endpoints. See the var list in the environment section for details.

Configuration and environment details

Environment variables you may configure include tokens, endpoints, and API keys for your Azure services. Ensure you provide the correct values for authentication methods and endpoints used by search, OpenAI, and evaluation components.

Available tools

list_models_from_model_catalog

Retrieves a list of supported models from the Azure AI Foundry catalog.

list_azure_ai_foundry_labs_projects

Retrieves a list of state-of-the-art AI models from Microsoft Research available in Azure AI Foundry Labs.

get_model_details_and_code_samples

Retrieves detailed information for a specific model from the Azure AI Foundry catalog.

get_prototyping_instructions_for_github_and_labs

Provides comprehensive instructions and setup guidance for starting to work with models from Azure AI Foundry and Azure AI Foundry Labs.

get_model_quotas

Get model quotas for a specific Azure location.

create_azure_ai_services_account

Creates an Azure AI Services account.

list_deployments_from_azure_ai_services

Retrieves a list of deployments from Azure AI Services.

deploy_model_on_ai_services

Deploys a model on Azure AI Services.

create_foundry_project

Creates a new Azure AI Foundry project.

list_index_names

Retrieve all names of indexes from the AI Search Service

list_index_schemas

Retrieve all index schemas from the AI Search Service

retrieve_index_schema

Retrieve the schema for a specific index from the AI Search Service

create_index

Creates a new index

modify_index

Modifies the index definition of an existing index

delete_index

Removes an existing index

add_document

Adds a document to the index

delete_document

Removes a document from the index

query_index

Searches a specific index to retrieve matching documents

get_document_count

Returns the total number of documents in the index

list_indexers

Retrieve all names of indexers from the AI Search Service

get_indexer

Retrieve the full definition of a specific indexer from the AI Search Service

create_indexer

Create a new indexer in the Search Service with the skill, index and data source

delete_indexer

Delete an indexer from the AI Search Service by name

list_data_sources

Retrieve all names of data sources from the AI Search Service

get_data_source

Retrieve the full definition of a specific data source

list_skill_sets

Retrieve all names of skill sets from the AI Search Service

get_skill_set

Retrieve the full definition of a specific skill set

fk_fetch_local_file_contents

Retrieves the contents of a local file path (sample JSON, document etc)

fk_fetch_url_contents

Retrieves the contents of a URL (sample JSON, document etc)

list_text_evaluators

List all available text evaluators.

list_agent_evaluators

List all available agent evaluators.

get_text_evaluator_requirements

Show input requirements for each text evaluator.

get_agent_evaluator_requirements

Show input requirements for each agent evaluator.

run_text_eval

Run one or multiple text evaluators on a JSONL file or content.

format_evaluation_report

Convert evaluation output into a readable Markdown report.

agent_query_and_evaluate

Query an agent and evaluate its response using selected evaluators. End-to-End agent evaluation.

run_agent_eval

Evaluate a single agent interaction with specific data (query, response, tool calls, definitions).

list_agents

List all Azure AI Agents available in the configured project.

connect_agent

Send a query to a specified agent.

query_default_agent

Query the default agent defined in environment variables.

fetch_finetuning_status

Retrieves detailed status and metadata for a specific fine-tuning job, including job state, model, creation and finish times, hyperparameters, and any errors.

list_finetuning_jobs

Lists all fine-tuning jobs in the resource, returning job IDs and their current statuses for easy tracking and management.

get_finetuning_job_events

Retrieves a chronological list of all events for a specific fine-tuning job, including timestamps and detailed messages for each training step, evaluation, and completion.

get_finetuning_metrics

Retrieves training and evaluation metrics for a specific fine-tuning job, including loss curves, accuracy, and other relevant performance indicators for monitoring and analysis.

list_finetuning_files

Lists all files available for fine-tuning in Azure OpenAI, including file IDs, names, purposes, and statuses.

execute_dynamic_swagger_action

Executes any tool dynamically generated from the Swagger specification, allowing flexible API calls for advanced scenarios.

list_dynamic_swagger_tools

Lists all dynamically registered tools from the Swagger specification, enabling discovery and automation of available API endpoints.

Azure AI Foundry MCP Server - youssef7788/mcp-foundry