Metadata-Version: 2.4
Name: avc-mcp-server
Version: 0.1.0
Summary: MCP server for AVC video enhancement service
Author: AVC Team
License-Expression: MIT
Keywords: enhancement,mcp,server,video
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# AVC MCP Server

MCP server for AVC video enhancement service.

## What is this?

This is an MCP (Model Context Protocol) server that provides video enhancement capabilities to MCP clients like Claude Desktop.

- **MCP Client**: Software that calls MCP tools (like Claude Desktop)
- **MCP Server**: This project - provides video enhancement tools via MCP protocol
- **AVC Service**: The remote video enhancement service that this server calls

```
Claude Desktop (MCP Client) → AVC MCP Server → Remote AVC Service
```

## Installation

```bash
# Using uv (recommended)
uv pip install -e "."

# Using pip
pip install -e "."
```

## Usage

### Stdio Mode (for Claude Desktop)

```bash
# Run with default settings
avc-mcp-server

# Or with custom AVC service URL
avc-mcp-server --avc-url http://192.168.0.7:8001 --avc-api-key your-key
```

Configure in Claude Desktop (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "avc-video-enhancement": {
      "command": "avc-mcp-server",
      "env": {
        "AVC_BASE_URL": "http://192.168.0.7:8001",
        "AVC_API_KEY": "your-api-key"
      }
    }
  }
}
```

### SSE Mode (HTTP)

```bash
# Run SSE server on port 8000
avc-mcp-server --transport sse --port 8000

# With custom AVC service URL
avc-mcp-server --transport sse --port 8000 --avc-url http://192.168.0.7:8001
```

The SSE endpoint will be available at: `http://localhost:8000/sse`

## Available Tools

### enhance_video_sync

Enhance a video synchronously (waits until complete).

**Input:**
- `video_url` (string, required): Video URL or local file path
- `resolution` (string, optional): Target resolution - "480p", "540p", "720p", "1080p", "2k" (default: "720p")
- `type` (string, optional): Source type - "url" or "local" (default: "url")

**Output:**
```json
{
  "success": true,
  "task_id": "abc123",
  "status": "completed",
  "video_url": "https://...",
  "message": "Enhancement completed"
}
```

### enhance_video_async

Start video enhancement asynchronously (returns task ID immediately).

**Input:** Same as `enhance_video_sync`

**Output:**
```json
{
  "success": true,
  "task_id": "abc123",
  "status": "wait",
  "message": "Task created"
}
```

### get_task_status

Query the status of a video enhancement task.

**Input:**
- `task_id` (string, required): Task ID from `enhance_video_async`

**Output:**
```json
{
  "success": true,
  "task_id": "abc123",
  "status": "completed",
  "video_url": "https://...",
  "message": "Enhancement completed"
}
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `AVC_BASE_URL` | Base URL of the remote AVC service | `http://192.168.0.7:8001` |
| `AVC_API_KEY` | API key for AVC service authentication | None |

## Development

```bash
# Install dev dependencies
uv pip install -e ".[dev]"

# Run tests
uv run pytest -v

# Code formatting
ruff format .
ruff check .
```

## License

MIT
