Skip to main content
Glama

Azure Pricing MCP Server

by msftnadavbh
setup.pyβ€’1.86 kB
#!/usr/bin/env python3 """ Setup and run script for Azure Pricing MCP Server """ import subprocess import sys import os from pathlib import Path def create_venv(): """Create virtual environment if it doesn't exist.""" venv_path = Path(".venv") if not venv_path.exists(): print("πŸ”§ Creating virtual environment...") subprocess.run([sys.executable, "-m", "venv", ".venv"], check=True) print("βœ… Virtual environment created") else: print("βœ… Virtual environment already exists") def get_python_executable(): """Get the Python executable path for the virtual environment.""" if os.name == 'nt': # Windows return Path(".venv") / "Scripts" / "python.exe" else: # Unix/Linux/Mac return Path(".venv") / "bin" / "python" def install_dependencies(): """Install required dependencies.""" python_exe = get_python_executable() print("πŸ“¦ Installing dependencies...") subprocess.run([str(python_exe), "-m", "pip", "install", "-r", "requirements.txt"], check=True) print("βœ… Dependencies installed") def run_server(): """Run the MCP server.""" python_exe = get_python_executable() print("πŸš€ Starting Azure Pricing MCP Server...") print(" (Use Ctrl+C to stop)") subprocess.run([str(python_exe), "-m", "azure_pricing_server"], check=True) def main(): """Main setup and run function.""" try: print("πŸ”„ Setting up Azure Pricing MCP Server...") create_venv() install_dependencies() run_server() except KeyboardInterrupt: print("\nπŸ‘‹ Server stopped") except subprocess.CalledProcessError as e: print(f"❌ Error during setup: {e}") sys.exit(1) except Exception as e: print(f"❌ Unexpected error: {e}") sys.exit(1) if __name__ == "__main__": main()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/msftnadavbh/AzurePricingMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server