UNPKG

@mcpcn/mcp-screenshot

Version:

截图MCP服务器

24 lines (23 loc) 822 B
#!/usr/bin/env node import { exec } from 'child_process'; export declare const execAsync: typeof exec.__promisify__; /** * Escapes special characters in strings for AppleScript */ export declare function escapeString(str: string): string; export interface ScreenshotParams { /** Path where to save the screenshot */ path: string; /** Type of screenshot to take */ type: 'fullscreen' | 'window' | 'selection'; /** Image format (png, jpg, pdf, tiff) */ format?: 'png' | 'jpg' | 'pdf' | 'tiff'; /** Whether to hide the cursor */ hideCursor?: boolean; /** Timestamp to add to filename (defaults to current time) */ timestamp?: boolean; } /** * Takes a screenshot using platform-appropriate tools */ export declare function takeScreenshot(params: ScreenshotParams): Promise<string>;