{"type":"mcp_server","name":"AI-Gateway","description":"AI Gateway: APIM experiments integrating Azure OpenAI & AI Foundry. Explore AI capabilities & workshop: aka.ms/ai-gateway/workshop","category":"AI","language":"Jupyter Notebook","stars":948,"forks":251,"owner":"Azure-Samples","github_url":"https://github.com/Azure-Samples/AI-Gateway","homepage":"https://aka.ms/ai-gateway ","setup":"## Setup\n\n### Prerequisites\n\n*   [Python 3.12 or later version](https://www.python.org/) installed\n*   [VS Code](https://code.visualstudio.com/) installed with the [Jupyter notebook extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) enabled\n*   [Python environment](https://code.visualstudio.com/docs/python/environments#_creating-environments)\n*   [An Azure Subscription](https://azure.microsoft.com/free/) with [Contributor](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#contributor) + [RBAC Administrator](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#role-based-access-control-administrator) or [Owner](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#owner) roles\n*   [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) installed and [Signed into your Azure subscription](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively)\n\n### Installation Steps\n\n1.  **Clone the Repository:**\n\n    ```bash\n    git clone https://github.com/Azure-Samples/AI-Gateway.git\n    cd AI-Gateway\n    ```\n\n2.  **Create and Activate a Python Environment (Recommended):**\n\n    ```bash\n    python -m venv .venv\n    ```\n\n    *   **On Windows:**\n\n        ```bash\n        .venv\\Scripts\\activate\n        ```\n\n    *   **On macOS/Linux:**\n\n        ```bash\n        source .venv/bin/activate\n        ```\n\n3.  **Install Dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n### Configuration\n\nNo specific configuration files are mentioned in the provided text. Configuration steps, if any, are likely within the individual lab notebooks. Refer to the selected lab's notebook for detailed instructions.\n\n### Environment Variables\n\nNo specific environment variables are explicitly required in the general setup. However, individual labs might require specific environment variables for Azure resource connections (e.g., Azure OpenAI endpoint, API keys). These will be detailed within the respective lab notebooks.","tools":"## Available Tools\n\n*   **AI-Gateway Mock server**: Mimics the behavior and responses of the OpenAI API, creating a simulation environment for testing and development purposes, especially for integration with Azure API Management. The `app.py` file can be customized to tailor the Mock server to specific use cases.\n    *   Usage: Customize `app.py` to simulate specific OpenAI API behaviors.\n*   **Tracing**: Invokes the OpenAI API with tracing enabled and returns tracing information, useful for debugging and troubleshooting.\n*   **Streaming**: Invokes the OpenAI API with stream enabled and returns the response in chunks, allowing for faster initial response times.","faq":null,"created_at":"2024-04-03T10:56:50+00:00","updated_at":"2025-07-07T09:30:36+00:00","source_url":"https://model-context-protocol.com/servers/ai-gateway","related_articles":[]}