Skip to main content
Glama
mcp-cp.ps11.44 kB
# mcp-cp.ps1 - Write MCP config file locally (Windows PowerShell) # # Usage: Get-Content config.json | .\mcp-cp.ps1 <sessionId> <team-path> [sessionMcpPath] # # Reads MCP config JSON from stdin, writes to file, outputs the file path to stdout. # Destination: <team-path>\<sessionMcpPath>\iris-mcp-<sessionId>.json # Default sessionMcpPath: .claude\iris\mcp # param( [Parameter(Mandatory=$true)] [string]$SessionId, [Parameter(Mandatory=$true)] [string]$TeamPath, [Parameter(Mandatory=$false)] [string]$sessionMcpPath = ".claude\iris\mcp" ) $ErrorActionPreference = "Stop" # Build destination directory path $McpDir = Join-Path $TeamPath $sessionMcpPath # Create directory if it doesn't exist if (-not (Test-Path $McpDir)) { New-Item -ItemType Directory -Path $McpDir -Force | Out-Null } # Build file path $FilePath = Join-Path $McpDir "iris-mcp-$SessionId.json" # Read JSON from stdin and write to file $input | Out-File -FilePath $FilePath -Encoding UTF8 -NoNewline # Set permissions (readable only by current user) $acl = Get-Acl $FilePath $acl.SetAccessRuleProtection($true, $false) $permission = New-Object System.Security.AccessControl.FileSystemAccessRule( [System.Security.Principal.WindowsIdentity]::GetCurrent().Name, "FullControl", "Allow" ) $acl.SetAccessRule($permission) Set-Acl $FilePath $acl # Output the file path to stdout (transport will read this) Write-Output $FilePath

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/jenova-marie/iris-mcp'

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