Skip to main content
Glama

Clipboard to Supabase MCP Helper

windows.ts1.11 kB
import fs from 'fs/promises'; import { execSync } from 'child_process'; import path from 'path'; import { tmpdir } from 'os'; /** * Windows clipboard image capture * * @param filePath - Path to save the clipboard image * @returns Promise<boolean> - true if image was captured, false otherwise */ export async function getImageFromClipboard(filePath: string): Promise<boolean> { try { // For Windows, PowerShell can capture clipboard images const psScript = ` Add-Type -AssemblyName System.Windows.Forms if ([Windows.Forms.Clipboard]::ContainsImage()) { $img = [Windows.Forms.Clipboard]::GetImage() $img.Save("${filePath.replace(/\\/g, '\\\\')}") exit 0 } else { exit 1 } `; // Execute PowerShell script execSync(`powershell -Command "${psScript}"`); // Verify the file exists and has content const stats = await fs.stat(filePath); return stats.size > 0; } catch (error) { // Either PowerShell failed or there's no image in clipboard console.error('Windows clipboard capture error:', error); return false; } }

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/martinbowling/clipboard-to-supabase-mcp-helper'

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