├── .devcontainer ├── devcontainer.json └── Dockerfile ├── .vscode └── mcp.json ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── .env.example ├── LICENSE ├── SECURITY.md ├── CONTRIBUTING.md └── README.md /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foundry Models Development Environment", 3 | "build": { 4 | "dockerfile": "Dockerfile" 5 | }, 6 | "remoteUser": "vscode" 7 | } -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/devcontainers/python:dev-3.11 2 | 3 | # Install Azure CLI and clean up 4 | RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash && \ 5 | apt-get update && \ 6 | apt-get install -y azure-cli && \ 7 | apt-get clean && \ 8 | rm -rf /var/lib/apt/lists/* 9 | 10 | # Install uv using pipx 11 | RUN pipx install uv 12 | -------------------------------------------------------------------------------- /.vscode/mcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "servers": { 3 | "MCP Server for Azure AI Foundry": { 4 | "command": "uvx", 5 | "args": [ 6 | "--prerelease=allow", 7 | "--no-cache", 8 | "--from", 9 | "git+https://github.com/azure-ai-foundry/mcp-foundry.git", 10 | "run-azure-ai-foundry-mcp", 11 | "--envFile", 12 | "${workspaceFolder}/.env" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Duplicate this file as `.env` and set values to pass to the server 2 | # Remove or comment any unused environment variables 3 | 4 | # GitHub authentication 5 | GITHUB_TOKEN= 6 | 7 | # Azure authentication 8 | AZURE_TENANT_ID= 9 | AZURE_CLIENT_ID= 10 | AZURE_CLIENT_SECRET= 11 | 12 | # Additional info for Azure AI Foundry (currently used for Evaluation only) 13 | AZURE_SUBSCRIPTION_ID= 14 | AZURE_RESOURCE_GROUP= 15 | AZURE_PROJECT_NAME= 16 | AZURE_OPENAI_ENDPOINT= 17 | AZURE_OPENAI_API_KEY= 18 | AZURE_OPENAI_DEPLOYMENT=gpt-4o 19 | AZURE_OPENAI_API_VERSION= 20 | PROJECT_CONNECTION_STRING= 21 | 22 | # Additional info for Knowledge 23 | AZURE_AI_SEARCH_ENDPOINT=https://.search.windows.net/ 24 | AZURE_AI_SEARCH_API_VERSION=2025-03-01-preview 25 | SEARCH_AUTHENTICATION_METHOD=api-search-key 26 | AZURE_AI_SEARCH_API_KEY=your_api_key 27 | 28 | # Additional info for Evaluation 29 | EVAL_DATA_DIR=/path/to/eval_jsonl/ 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to [project-title] 2 | 3 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 4 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 5 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 6 | 7 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 8 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 9 | provided by the bot. You will only need to do this once across all repos using our CLA. 10 | 11 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 12 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 13 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 14 | 15 | - [Code of Conduct](#coc) 16 | - [Issues and Bugs](#issue) 17 | - [Feature Requests](#feature) 18 | - [Submission Guidelines](#submit) 19 | 20 | ## Code of Conduct 21 | Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 22 | 23 | ## Found an Issue? 24 | If you find a bug in the source code or a mistake in the documentation, you can help us by 25 | [submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can 26 | [submit a Pull Request](#submit-pr) with a fix. 27 | 28 | ## Want a Feature? 29 | You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub 30 | Repository. If you would like to *implement* a new feature, please submit an issue with 31 | a proposal for your work first, to be sure that we can use it. 32 | 33 | * **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). 34 | 35 | ## Submission Guidelines 36 | 37 | ### Submitting an Issue 38 | Before you submit an issue, search the archive, maybe your question was already answered. 39 | 40 | If your issue appears to be a bug, and hasn't been reported, open a new issue. 41 | Help us to maximize the effort we can spend fixing issues and adding new 42 | features, by not reporting duplicate issues. Providing the following information will increase the 43 | chances of your issue being dealt with quickly: 44 | 45 | * **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps 46 | * **Version** - what version is affected (e.g. 0.1.2) 47 | * **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you 48 | * **Browsers and Operating System** - is this a problem with all browsers? 49 | * **Reproduce the Error** - provide a live example or a unambiguous set of steps 50 | * **Related Issues** - has a similar issue been reported before? 51 | * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be 52 | causing the problem (line of code or commit) 53 | 54 | You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new]. 55 | 56 | ### Submitting a Pull Request (PR) 57 | Before you submit your Pull Request (PR) consider the following guidelines: 58 | 59 | * Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR 60 | that relates to your submission. You don't want to duplicate effort. 61 | 62 | * Make your changes in a new git fork: 63 | 64 | * Commit your changes using a descriptive commit message 65 | * Push your fork to GitHub: 66 | * In GitHub, create a pull request 67 | * If we suggest changes then: 68 | * Make the required updates. 69 | * Rebase your fork and force push to your GitHub repository (this will update your Pull Request): 70 | 71 | ```shell 72 | git rebase main -i 73 | git push -f 74 | ``` 75 | 76 | That's it! Thank you for your contribution! 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🧪 Foundry MCP Playground 2 | 3 | Welcome to **Foundry MCP Playground**, your streamlined dev environment for rapidly prototyping with [MCP Server for Azure AI Foundry](https://github.com/azure-ai-foundry/mcp-foundry), including the ability to explore and use **state-of-the-art AI models** from [Azure AI Foundry Catalog](https://ai.azure.com/explore/models) and [Azure AI Foundry Labs](https://ai.azure.com/labs), to **manage and query knowledge** using [Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) and to **evaluate text and agent responses** with [Observability features in Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/concepts/observability) — all without the hassels of getting set up with these resources. 4 | 5 | By using this template, you'll be up and running with GitHub Copilot and connected to powerful backend tools in just **one click**. 6 | 7 | - [MCP Server for Azure AI Foundry](https://github.com/azure-ai-foundry/mcp-foundry): server repo 8 | - [Foundry MCP Playground](https://github.com/azure-ai-foundry/foundry-mcp-playground): template repo (this) 9 | 10 | --- 11 | 12 | ## 🚀 One-Click Setup 13 | 14 | Start building instantly: 15 | 16 | [![Use this template](https://img.shields.io/badge/-Use%20this%20template-grey?style=for-the-badge&logo=github)](https://github.com/azure-ai-foundry/foundry-mcp-playground/generate) 17 | 18 | > Click this if you like to create your new repository from this template 19 | 20 | [![Open in GitHub Codespaces](https://img.shields.io/badge/-Open%20in%20Codespaces-blue?style=for-the-badge&logo=github)](https://github.com/codespaces/new?template_repository=azure-ai-foundry/foundry-mcp-playground/generate) 21 | 22 | > Click this if you like to start clean using current repository in GitHub Codespaces 23 | 24 | --- 25 | 26 | ## 🧠 What’s Inside? 27 | 28 | Foundry MCP Playground gives you everything you need to prototype AI-based solutions **inside GitHub Copilot**. 29 | 30 | When you open this workspace, it will automatically start the MCP server for Azure AI Foundry: 31 | 32 | - **MCP Server for Azure AI Foundry (experimental)** – exposes tools to interact with Azure AI Foundry 33 | 34 | This server is automatically started inside a devcontainer and communicate via `stdio` with GitHub Copilot. 35 | 36 | --- 37 | 38 | ## 🧰 Available Tools in GitHub Copilot 39 | 40 | When GitHub Copilot is running in this environment, it will be equipped with all the tools — no extra config needed. See [MCP Server for Azure AI Foundry (experimental)](https://github.com/azure-ai-foundry/mcp-foundry) for more details.: 41 | 42 | These tools are automatically discovered by Copilot and can be used in natural language prompts while coding. 43 | 44 | --- 45 | 46 | ## 💡 Getting Started 47 | 48 | 1. **Use this template** to create your own repository. If you already did that, you can skip to the next step. 49 | 1. **Open in Codespaces** or **VS Code** (with devcontainer support). 50 | 1. If you use VS Code with devcontainer, you'll need Docker engine running locally. 51 | 1. Once the environment is ready, open **Settings** (Ctrl+,) and search for "chat.agent.enable" and enable Agent Mode. 52 | 1. Open Chat view (Ctrl+Alt+I) and click Use Copilot. Change to **Agent Mode** and Copilot automatically discovers the MCP Servers. 53 | 1. To load MCP Servers, click icon "**New tools available**", if not loaded already. 54 | 1. (Optional) you can click "**Tools**" icon on Chat view to see loaded MCP servers and tools. Also open `.vscode/mcp.json` to see preconfigured servers. 55 | 1. Start by asking Copilot about what it can help on Azure AI Foundry. 56 | 57 | ## Example Prompts 58 | 59 | ### Explore models 60 | - What can you do? 61 | - How can you help me find the right model? 62 | - What models can I use from Azure AI Foundry? 63 | - What OpenAI models are available in Azure AI Foundry? 64 | - What are the most popular models in Azure AI Foundry? Pick me 10 models. 65 | - What models are good for reasoning? Show me some examples in two buckets, one for large models and one for small models. 66 | - Can you compare Phi models and explain differences? 67 | - Show me the model card for Phi-4-reasoning. 68 | - Can you show me how to test a model? 69 | - What does free playground in Azure AI Foundry mean? 70 | - Can I use GitHub token to test models? 71 | - Show me latest models that support GitHub token. 72 | - Who are the model publishers for the models in Azure AI Foundry? 73 | - Show me models from Meta. 74 | - Show me models with MIT license. 75 | 76 | ### Build prototypes 77 | - Can you describe how you can help me build a prototype using the model? 78 | - Describe how you can build a prototype that uses an OpenAI model with my GitHub token. Don't try to create one yet. 79 | - Recommend me a few scenarios to build prototypes with models. 80 | - Tell me about Azure AI Foundry Labs. 81 | - Tell me more about Magentic One 82 | - What is Omniparser and what are potential use cases? 83 | - Can you help me build a prototype using Omniparser? 84 | - I need to build an application that can analyze my web UX designs and advise me of any areas that may be difficult for users to navigate or might create a cognitive overload. 85 | - I'd like to build a model comparison app to compare Azure AI Foundry Catalog models. The user should be able to select from about 8-10 different catalog models. From there, the user enters a prompt, which each of the selected models will respond to. The output should be side by side. The user can also select a specific model from a set of "evaluator" models that are good at evaluation, that will evaluate the outputs of user-selected models. The evaluator should provide a short written evaluations to each models' response, as well as a numerical score. 86 | 87 | ### Deploy OpenAI models 88 | - Can you help me deploy OpenAI models? 89 | - What steps do I need to take to deploy OpenAI models on Azure AI Foundry? 90 | - Can you help me understand how I can use OpenAI models on Azure AI Foundry using GitHub token? Can I use it for production? 91 | - I already have an Azure AI services resource. Can I deploy OpenAI models on it? 92 | - What does quota for OpenAI models mean on Azure AI Foundry? 93 | - Get me current quota for my AI services resource. 94 | --------------------------------------------------------------------------------