AbhijithGanesh/AzureMCP-demo
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
- Clone this repository
- 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
- Python 3.12 using
- Easy setup with dependency management:
- Python: Using modern packaging with
pyproject.toml
- TypeScript: Using
package.json
with Bun package manager
- Python: Using modern packaging with
š§ 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.