Prepare the server locally
Run this once before adding it to Claude Code.
pip install -r requirements.txtRegister it in Claude Code
claude mcp add -e "AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}" -e "AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY}" -e "AZURE_DEPLOYMENT_NAME=${AZURE_DEPLOYMENT_NAME}" -e "AZURE_API_VERSION=${AZURE_API_VERSION}" azure-mcp -- python /path/to/server/document_server.pyReplace any placeholder paths in the command with the real path on your machine.
AZURE_OPENAI_ENDPOINTAZURE_OPENAI_API_KEYAZURE_DEPLOYMENT_NAMEAZURE_API_VERSIONMake your agent remember this setup
azure-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Integrates Claude with Azure AI Foundry
- Provides tools for reading local documents
- Enables creation and updating of files via Claude
- Supports listing files within the project directory
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.Try it
Original README from SajinMohamedPe/mcp_learn
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