AzureMCP-demo

AbhijithGanesh/AzureMCP-demo

3.1

If you are the rightful owner of AzureMCP-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This tutorial provides a comprehensive guide to setting up and running an Azure Model Context Protocol (MCP) server with Python and TypeScript implementations.

šŸš€ Azure MCP Server Tutorial

[!IMPORTANT]
This repository is a part of my deep dive into Azure MCP server session hosted at Microsoft, Chennai office on the 17th of May

Welcome to the Azure MCP Server tutorial! This repository demonstrates how to set up and run an MCP server with different implementations.

šŸ“‹ Prerequisites

  • Bun package manager installed
  • Azure subscription
  • Python 3.12+ (for Python implementation)
  • Node.js/TypeScript environment (for TypeScript implementation)

🌟 Quick Start

  1. Clone this repository
  2. Start the MCP server: ./start-server.sh

šŸ“ Project Structure

.
ā”œā”€ā”€ start-server.sh           # Server startup script (SSE transport)
└── custom-mcp-server/       # Custom implementations
    ā”œā”€ā”€ python3/            # Python 3.12 implementation
    │   ā”œā”€ā”€ main.py        # Python entry point
    │   └── pyproject.toml # Python dependencies
    └── typescript/        # TypeScript implementation
        ā”œā”€ā”€ index.ts      # TypeScript entry point
        └── package.json  # Node.js dependencies

šŸ› ļø Features

  • Server-Sent Events (SSE) transport support through @azure/mcp
  • Language-specific implementations:
    • Python 3.12 using modelcontextprotocol package
    • TypeScript using @modelcontextprotocol/sdk
  • Easy setup with dependency management:
    • Python: Using modern packaging with pyproject.toml
    • TypeScript: Using package.json with Bun package manager

šŸ”§ Configuration

The server uses SSE (Server-Sent Events) transport by default:

bunx -y @azure/mcp@latest server start --transport sse

šŸ“¦ Installation

Python Implementation

cd custom-mcp-server/python3
python -m venv .venv
source .venv/bin/activate
pip install -e .

TypeScript Implementation

cd custom-mcp-server/typescript
bun install

šŸš€ Running Examples

Python

cd custom-mcp-server/python3
python main.py

TypeScript

cd custom-mcp-server/typescript
bun run index.ts

šŸ“š Dependencies

Python

  • modelcontextprotocol >= 0.1.0
  • Python 3.12 or higher

TypeScript

  • @modelcontextprotocol/sdk ^1.11.3

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit pull requests or create issues.

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Related Resources