npm package: @glutamateapp/edits
Description: edits is FFmpeg MCP server for video/image processing tasks.
Author: ShadowCloneResearchLabs
Latest version: 1.0.1

# Edits MCP Server (TypeScript)

A Model Context Protocol server that provides video, audio, and image processing capabilities using FFmpeg, written in TypeScript. This server enables LLMs to perform various media processing tasks like video conversion, audio extraction, image resizing, and social media format optimization.

## Features

- Written in TypeScript for better type safety and developer experience
- Uses FFmpeg for robust media processing capabilities
- Server-Sent Events (SSE) support for real-time operation status
- Fully compatible with the Model Context Protocol
- Comprehensive media processing tools:
  - Video processing (conversion, resizing, metadata extraction)
  - Audio processing (extraction, conversion, merging)
  - Image processing (resizing, format conversion)
  - Social media optimization (platform-specific aspect ratios)

### Available Tools

1. **Video Processing**

   - `get_video_metadata`: Get metadata for a video file
   - `convert_video`: Change video format/codec (e.g., .mov to .mp4)
   - `resize_video`: Change video resolution
   - `create_gif`: Create animated GIFs from video segments
   - `take_screenshots`: Capture still frames from videos

2. **Audio Processing**

   - `convert_audio`: Convert audio format/codec
   - `extract_audio`: Extract audio track from video
   - `merge_video_and_audio`: Combine video and audio files

3. **Image Processing**

   - `resize_image`: Resize images and convert formats

4. **Social Media Tools**
   - `convert_to_social_media_format`: Convert media to platform-specific formats
   - `get_available_social_media_platforms`: List available platform formats

The server runs on port 7452 by default.

## Installation

### Option 1: One-Click Installation via Glutamate App (Recommended)

The easiest way to install and set up the Edits MCP Server is through the Glutamate app:

1. Download and install [Glutamate](https://glutamateapp.com)
2. Open Glutamate and navigate to the Extensions section
3. Find Edits MCP Server and click "Install"
4. The app will automatically configure everything for you

### Option 2: Manual Setup

If you prefer to set up the Edits MCP Server manually:

#### Global Installation

```bash
npm install -g @glutamateapp/edits
```

Once installed globally, you can run the server directly:

```bash
edits
```

#### Using npx

You can run the server without installation using npx:

```bash
npx @glutamateapp/edits
```

#### From Source

1. Clone the repository
2. Install dependencies:

```bash
npm install
```

3. Build the project:

```bash
npm run build
```

4. Start the server:

```bash
npm start
```

For development with hot reload:

```bash
npm run watch
```

## Usage Examples

### Video Processing

```typescript
// Get video metadata
{
  "video_path": "input.mp4"
}

// Convert video format
{
  "input_path": "input.mov",
  "output_path": "output.mp4",
  "video_codec": "libx264",  // optional
  "audio_codec": "aac"       // optional
}

// Resize video
{
  "input_path": "input.mp4",
  "output_path": "output.mp4",
  "size": "1280x720"
}
```

### Audio Processing

```typescript
// Convert audio format
{
  "input_path": "input.wav",
  "output_path": "output.mp3",
  "audio_codec": "libmp3lame"
}

// Extract audio from video
{
  "input_path": "video.mp4",
  "output_path": "audio.mp3"
}
```

### Image Processing

```typescript
// Resize image
{
  "input_path": "input.jpg",
  "output_path": "output.png",
  "size": "800x600"
}
```

### Social Media Optimization

```typescript
// Convert to social media formats
{
  "input_path": "video.mp4",
  "output_folder": "social_media_outputs",
  "platforms": ["instagram_reels", "youtube_shorts", "tiktok"],
  "crop_mode": "crop",           // optional: "crop", "pad", or "stretch"
  "background_color": "black",   // optional, used with pad mode
  "filename_prefix": "my_video_" // optional
}
```

## Development

### Prerequisites

- Node.js (v14 or higher)
- npm or yarn
- FFmpeg (automatically included)

### Project Structure

```
src/editingassist/
├── config.ts           # Server configuration
├── index.ts           # Entry point
├── mcp-server.ts      # MCP server implementation
├── utils.ts           # Utility functions
└── types/             # TypeScript type definitions
```

## Contributing

Contributions are welcome! Please feel free to submit pull requests.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For issues and feature requests, please use the [GitHub issue tracker](https://github.com/ShadowCloneLabs/GlutamateMCPServers/issues).