Integrates Model Context Protocol with Azure AI Foundry's Claude deployment.
MCP Azure Project
This project integrates Model Context Protocol (MCP) with Azure AI Foundry's Claude deployment.
Quick Start
1. Install Dependencies
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install packages
pip install -r requirements.txt
2. Configure Azure Credentials
Edit .env file with your Azure AI Foundry credentials:
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_DEPLOYMENT_NAME=claude-35-sonnet
AZURE_API_VERSION=2024-10-01-preview
3. Test the MCP Server
# Start server with inspector
mcp dev server/document_server.py
# Opens browser at http://localhost:5173
4. Run the Client
python client/azure_client.py
Project Structure
.
├── .env # Azure credentials (don't commit!)
├── .gitignore
├── requirements.txt
├── server/
│ ├── __init__.py
│ └── document_server.py # MCP server with tools
├── client/
│ ├── __init__.py
│ └── azure_client.py # Azure-compatible client
└── test_documents/
└── sample.txt # Test files
Available Tools
- read_document: Read file contents
- write_document: Create/update files
- list_documents: List all documents
Resources
Tools (3)
read_documentRead the contents of a specific file.write_documentCreate or update a file with content.list_documentsList all available documents in the directory.Environment Variables
AZURE_OPENAI_ENDPOINTrequiredThe endpoint URL for your Azure AI resource.AZURE_OPENAI_API_KEYrequiredThe API key for your Azure AI resource.AZURE_DEPLOYMENT_NAMErequiredThe name of the Claude deployment in Azure.AZURE_API_VERSIONrequiredThe Azure API version to use.Configuration
{"mcpServers": {"azure-docs": {"command": "python", "args": ["/path/to/server/document_server.py"], "env": {"AZURE_OPENAI_ENDPOINT": "...", "AZURE_OPENAI_API_KEY": "...", "AZURE_DEPLOYMENT_NAME": "...", "AZURE_API_VERSION": "..."}}}}