Skip to main content
Glama
setup_claude.ps13.83 kB
# PowerShell script to set up Claude Desktop MCP configuration Write-Host "========================================" -ForegroundColor Cyan Write-Host "Claude Desktop MCP Setup Script" -ForegroundColor Cyan Write-Host "========================================" -ForegroundColor Cyan Write-Host "" $claudeConfigDir = "$env:APPDATA\Claude" $claudeConfigFile = "$claudeConfigDir\claude_desktop_config.json" Write-Host "Claude config directory: $claudeConfigDir" -ForegroundColor Yellow Write-Host "Config file: $claudeConfigFile" -ForegroundColor Yellow Write-Host "" if (-not (Test-Path $claudeConfigDir)) { Write-Host "Creating Claude config directory..." -ForegroundColor Yellow New-Item -ItemType Directory -Path $claudeConfigDir -Force | Out-Null } $projectDir = Split-Path -Parent $MyInvocation.MyCommand.Path $serverScript = "$projectDir\inventory-mcp-server.py" $pythonExe = "C:\Users\aditi\Anaconda3\python.exe" Write-Host "Server script: $serverScript" -ForegroundColor Yellow Write-Host "Python executable: $pythonExe" -ForegroundColor Yellow Write-Host "" if (-not (Test-Path $serverScript)) { Write-Host "ERROR: Server script not found at: $serverScript" -ForegroundColor Red exit 1 } $config = @{} if (Test-Path $claudeConfigFile) { Write-Host "Loading existing Claude configuration..." -ForegroundColor Green try { $jsonContent = Get-Content $claudeConfigFile -Raw $config = $jsonContent | ConvertFrom-Json } catch { Write-Host "Warning: Could not parse existing config file. Creating new one." -ForegroundColor Yellow $config = New-Object PSObject } } else { Write-Host "Creating new Claude configuration file..." -ForegroundColor Green $config = New-Object PSObject } if (-not $config.PSObject.Properties.Name -contains "mcpServers") { $config | Add-Member -MemberType NoteProperty -Name "mcpServers" -Value (New-Object PSObject) } $inventoryMCP = New-Object PSObject $inventoryMCP | Add-Member -MemberType NoteProperty -Name "command" -Value $pythonExe $inventoryMCP | Add-Member -MemberType NoteProperty -Name "args" -Value @($serverScript) $envVar = New-Object PSObject $envVar | Add-Member -MemberType NoteProperty -Name "SUPABASE_DB_PASSWORD" -Value "root" $inventoryMCP | Add-Member -MemberType NoteProperty -Name "env" -Value $envVar $config.mcpServers | Add-Member -MemberType NoteProperty -Name "inventory-mcp" -Value $inventoryMCP if (Test-Path $claudeConfigFile) { $backupFile = "$claudeConfigFile.backup.$(Get-Date -Format 'yyyyMMddHHmmss')" Copy-Item $claudeConfigFile $backupFile Write-Host "Backed up existing config to: $backupFile" -ForegroundColor Green } try { $config | ConvertTo-Json -Depth 10 | Set-Content -Path $claudeConfigFile -Encoding UTF8 Write-Host "" Write-Host "========================================" -ForegroundColor Green Write-Host "Configuration updated successfully!" -ForegroundColor Green Write-Host "========================================" -ForegroundColor Green Write-Host "" Write-Host "Configuration file: $claudeConfigFile" -ForegroundColor Cyan Write-Host "" Write-Host "Next steps:" -ForegroundColor Yellow Write-Host "1. Close Claude Desktop completely" -ForegroundColor White Write-Host "2. Reopen Claude Desktop" -ForegroundColor White Write-Host "3. The inventory MCP server should be available!" -ForegroundColor White Write-Host "" Write-Host "Test it by asking Claude:" -ForegroundColor Yellow Write-Host " 'List all inventory items'" -ForegroundColor White Write-Host " 'Check stock for LAP-001 at Bengaluru'" -ForegroundColor White } catch { Write-Host "ERROR: Could not write configuration file" -ForegroundColor Red Write-Host $_.Exception.Message -ForegroundColor Red exit 1 }

Latest Blog Posts

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/Adiitiir/inventory-mcp-server'

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