# PhotoNow MCP Server — Complete Protocol Specification & Tool Schemas > Machine-readable Model Context Protocol (MCP) and Answer Engine Optimization (AEO) Full Specification. > Canonical URL: https://photonow.vercel.app/llms-full.txt --- ## Technical Overview - **Protocol Version**: Model Context Protocol (MCP) JSON-RPC 2.0 (spec 2024-11-05) - **Primary Transports**: 1. Stdio (Local Node.js process runner for Claude Desktop, Cursor, Antigravity) 2. HTTP JSON-RPC 2.0 (`POST https://photonow.vercel.app/api/mcp`) 3. Browser DOM Automation (`window.__photoConvertAgent`) - **Core Processing Engines**: - **Images**: Native Sharp (libvips 8.16) for ultra-fast, sub-second conversion & downscaling. - **Video & Audio**: Self-contained static FFmpeg & FFprobe (`@ffmpeg-installer/ffmpeg`, `@ffprobe-installer/ffprobe`, `fluent-ffmpeg`) for zero-setup container transcoding, CRF compression, resolution scaling, and audio extraction. - **Browser Runtime**: HTML5 Canvas 2D, MediaRecorder (VP9/VP8), Web Audio API (16-bit PCM WAV). - **Storage Tier**: 100% Client-Side On-Device Local Disk / IndexedDB (`photoConvert_DB`). - **Security Boundaries**: Strict output extension whitelist (`.webp`, `.png`, `.jpg`, `.jpeg`, `.avif`, `.mp4`, `.webm`, `.mkv`, `.mov`, `.mp3`, `.wav`, `.aac`, `.m4a`, `.flac`, `.ogg`), sensitive system directory guards (`system32`, `.git`, `.ssh`, `.aws`), `.env` overwrite defense, 250MB image / 2GB video safety limit, and 100 MegaPixel decompression bomb defense (`limitInputPixels`). --- ## Complete MCP Tool Schemas (JSON Schema Format) ### 1. `convert_image` Converts a single image file on disk to a modern format (WebP, PNG, JPEG, AVIF) with optional resizing, rotation, and compression. ```json { "name": "convert_image", "description": "Converts an image file on disk to a modern format (WebP, PNG, JPEG, AVIF) with optional aspect-ratio locked downscaling, quality compression, rotation, and monochrome grayscale.", "inputSchema": { "type": "object", "properties": { "inputPath": { "type": "string", "description": "Path to source image file (e.g. C:/photos/cat.png or ~/images/doc.jpg). Handles single and double quotes cleanly." }, "outputPath": { "type": "string", "description": "Optional destination path for the converted file. Defaults to same directory as original with new extension." }, "format": { "type": "string", "enum": ["webp", "png", "jpeg", "avif"], "default": "webp", "description": "Target image format." }, "quality": { "type": "number", "minimum": 0.01, "maximum": 100, "default": 82, "description": "Compression quality. Accepts percentage 1-100 or decimal 0.1-1.0." }, "maxWidth": { "type": "number", "description": "Maximum width in pixels to downscale the image (aspect ratio preserved)." }, "maxHeight": { "type": "number", "description": "Maximum height in pixels to downscale the image (aspect ratio preserved)." }, "rotate": { "type": "number", "enum": [0, 90, 180, 270], "description": "Clockwise rotation in degrees." }, "grayscale": { "type": "boolean", "default": false, "description": "Convert image to monochrome grayscale." }, "overwrite": { "type": "boolean", "default": false, "description": "Overwrite existing destination file. When false, auto-increments filename safely." } }, "required": ["inputPath"] } } ``` ### 2. `convert_batch` Batch converts an entire directory or explicit array of file paths in a single call. ```json { "name": "convert_batch", "description": "Batch converts an entire folder or list of files to WebP/AVIF/PNG/JPEG in a single tool call without multi-turn permission prompts. Automatically ignores noise folders (.git, node_modules, .next).", "inputSchema": { "type": "object", "properties": { "directoryPath": { "type": "string", "description": "Directory path containing images to batch convert (e.g. C:/photos or ./screenshots)." }, "inputPaths": { "type": "array", "items": { "type": "string" }, "description": "Explicit array of file paths to convert." }, "outputDir": { "type": "string", "description": "Destination directory for converted files." }, "format": { "type": "string", "enum": ["webp", "png", "jpeg", "avif"], "default": "webp" }, "quality": { "type": "number", "minimum": 0.01, "maximum": 100, "default": 82 }, "recursive": { "type": "boolean", "default": false, "description": "Scan nested subdirectories recursively." }, "maxWidth": { "type": "number" }, "maxHeight": { "type": "number" }, "grayscale": { "type": "boolean", "default": false }, "overwrite": { "type": "boolean", "default": false } } } } ``` ### 3. `extract_audio` Extracts audio tracks from video files (.mp4, .mov, .mkv, .webm, .avi) to standalone audio files. ```json { "name": "extract_audio", "description": "Extract audio tracks from video files (.mp4, .mov, .mkv, .webm, .avi) to MP3, WAV, AAC, M4A, FLAC, or OGG.", "inputSchema": { "type": "object", "properties": { "inputPath": { "type": "string", "description": "Path to the video file (.mp4, .mov, .mkv, .webm, .avi, etc.). Quotes cleaned automatically." }, "outputFormat": { "type": "string", "enum": ["mp3", "wav", "aac", "m4a", "flac", "ogg"], "default": "mp3", "description": "Target audio format (default: mp3)" }, "outputPath": { "type": "string", "description": "Destination file path. Defaults to original name & folder with new audio extension." }, "bitrate": { "type": "string", "default": "192k", "description": "Audio bitrate for lossy formats (e.g. 128k, 192k, 320k)" }, "channels": { "type": "number", "enum": [1, 2], "default": 2, "description": "Number of audio channels: 1 (mono) or 2 (stereo, default)" }, "overwrite": { "type": "boolean", "default": false, "description": "Overwrite destination file if it already exists" } }, "required": ["inputPath"] } } ``` ### 4. `convert_video` Compresses, resizes, or converts video containers and codecs (.mp4, .webm, .mkv, .mov). ```json { "name": "convert_video", "description": "Compresses, downscales, or converts video containers and codecs (.mp4, .webm, .mkv, .mov) with CRF quality control.", "inputSchema": { "type": "object", "properties": { "inputPath": { "type": "string", "description": "Path to source video file (.mp4, .mov, .mkv, .webm, .avi, etc.)" }, "format": { "type": "string", "enum": ["mp4", "webm", "mkv", "mov"], "default": "mp4", "description": "Target video container format (default: mp4)" }, "outputPath": { "type": "string", "description": "Optional destination path. Defaults to same name and directory with new video extension." }, "preset": { "type": "string", "enum": ["ultrafast", "fast", "medium", "slow"], "default": "fast", "description": "Encoding speed/compression preset (default: fast)" }, "crf": { "type": "number", "minimum": 18, "maximum": 35, "default": 23, "description": "Constant Rate Factor: lower = higher quality, 18-28 recommended (default: 23)" }, "maxWidth": { "type": "number", "description": "Optional max width in pixels (aspect ratio strictly preserved)" }, "maxHeight": { "type": "number", "description": "Optional max height in pixels (aspect ratio strictly preserved)" }, "muteAudio": { "type": "boolean", "default": false, "description": "Strip audio track from the video if true (default: false)" }, "overwrite": { "type": "boolean", "default": false, "description": "Overwrite existing destination file if present" } }, "required": ["inputPath"] } } ``` ### 5. `convert_audio` Converts standalone audio files between formats with bitrate and sample rate configuration. ```json { "name": "convert_audio", "description": "Converts standalone audio files between MP3, WAV, AAC, M4A, FLAC, and OGG with bitrate and sample rate control.", "inputSchema": { "type": "object", "properties": { "inputPath": { "type": "string", "description": "Path to source audio file (.mp3, .wav, .aac, .m4a, .flac, .ogg, etc.)" }, "format": { "type": "string", "enum": ["mp3", "wav", "aac", "m4a", "flac", "ogg"], "default": "mp3", "description": "Target audio format (default: mp3)" }, "outputPath": { "type": "string", "description": "Optional destination path. Defaults to same folder with new audio extension." }, "bitrate": { "type": "string", "default": "192k", "description": "Target bitrate (e.g. 128k, 192k, 320k)" }, "sampleRate": { "type": "number", "description": "Audio sample rate in Hz (e.g. 44100, 48000)" }, "overwrite": { "type": "boolean", "default": false, "description": "Overwrite output file if it already exists" } }, "required": ["inputPath"] } } ``` ### 6. `get_media_info` Unified metadata inspector for images, video, and audio files. ```json { "name": "get_media_info", "description": "Inspects metadata for image, video, and audio files including dimensions, resolution, codec, bitrate, duration, and color space.", "inputSchema": { "type": "object", "properties": { "filePath": { "type": "string", "description": "Path to image, video, or audio file to inspect metadata" } }, "required": ["filePath"] } } ``` ### 7. `optimize_for_agent` Downscales heavy screenshots to token-efficient WebP for AI vision context windows. ```json { "name": "optimize_for_agent", "description": "Optimizes high-resolution screenshots or images for LLM vision models (e.g. Gemini, Claude 3.5 Sonnet, GPT-4o).", "inputSchema": { "type": "object", "properties": { "inputPath": { "type": "string", "description": "Path to high-resolution screenshot or image." }, "outputPath": { "type": "string", "description": "Optional destination path (.webp only)." }, "maxDimension": { "type": "number", "default": 1280, "description": "Max width or height in px for LLM vision models (default: 1280)." } }, "required": ["inputPath"] } } ``` --- ## Legal, Privacy & Compliance References - **Privacy Policy (100% Offline Guarantee)**: https://photonow.vercel.app/privacy - **Terms of Service & Acceptable Use Policy**: https://photonow.vercel.app/terms - **Trademarks, Nominative Fair Use & Legal Notice**: https://photonow.vercel.app/legal - **Open-Source License (MIT)**: https://github.com/Sibasish2005/PhotoNowEngine/blob/main/LICENSE