Content
# KrillinAI MCP Server
The KrillinAI MCP Server is a connector based on the Model Context Protocol (MCP) for interacting with KrillinAI services. This server acts as a bridge between large language models (LLM) and KrillinAI services, enabling LLMs to utilize features such as subtitle generation, translation, TTS, and more.
## Features
- **File Upload**: Upload video or audio files to the KrillinAI service
- **Subtitle Processing**: Automatically generate subtitles for videos
- **Translation Functionality**: Support subtitle translation into multiple languages
- **Bilingual Subtitles**: Generate bilingual subtitles with customizable translation positions
- **Text-to-Speech (TTS)**: Generate speech for subtitles, supporting voice cloning
- **Subtitle Embedding**: Directly embed subtitles into videos
- **Filler Word Filtering**: Filter out filler words to improve subtitle quality
## Installation Requirements
- Python 3.12 or higher
- KrillinAI service (default running at http://127.0.0.1:8888)
## Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/krillinai-mcp-server.git
cd krillinai-mcp-server
# Install dependencies using pip
pip install -e .
# Or install using uv (recommended)
uv pip install -e .
```
## Usage
### Starting the Server
```bash
python krillinai-server.py
```
### Integrating with MCP Client
#### Claude Desktop Example Configuration
To integrate this server into Claude Desktop, you need to edit its MCP server configuration file. On macOS, this file is typically located at `~/Library/Application Support/Claude/claude_desktop_config.json`.
```json
{
"mcpServers": {
"krillinai-mcp-server": {
"isActive": true,
"name": "KrillinaiConnector",
"type": "stdio",
"description": "Connects to Krillinai for subtitle and media processing.",
"command": "/abs/path/to/your/project/.venv/bin/python",
"args": [
"/abs/path/to/your/project/krillinai-server.py"
],
"env": {}
}
}
}
```
**Make sure to replace** **`/abs/path/to/your/project/` with your actual project path.**
### Command Line Options
- `--krillinai-url`: Specify the URL of the KrillinAI service (default: http://127.0.0.1:8888)
- `--mcp-transport`: Specify the MCP transport type, options are "stdio" (default) or "streamable-http"
- `--mcp-host`: Specify the HTTP server host (only valid when mcp-transport is "streamable-http")
- `--mcp-port`: Specify the HTTP server port (only valid when mcp-transport is "streamable-http")
Example:
```bash
# Set KrillinAI URL using environment variable
export KRILLINAI_URL="http://192.168.1.100:8888"
python krillinai-server.py
# Or set directly via command line arguments
python krillinai-server.py --krillinai-url="http://192.168.1.100:8888"
# Use HTTP transport and specify port
python krillinai-server.py --mcp-transport="streamable-http" --mcp-port=8001
```
## MCP Tools
This server provides the following MCP tools for LLM usage:
1. **Configuration Management Tools**
- `get_krillinai_configuration`: Retrieve the current KrillinAI connection configuration
- `set_krillinai_base_url`: Set the BASE URL for the KrillinAI service
2. **File Processing Tools**
- `upload_file_to_krillinai`: Upload files accessible to the server to KrillinAI
3. **Subtitle Processing Tools**
- `start_krillinai_subtitle_task`: Start a subtitle processing task
- `get_krillinai_subtitle_task_details`: Retrieve details of the subtitle task
4. **Content Retrieval Tools**
- `fetch_krillinai_file_as_text`: Retrieve the text content of a KrillinAI file
## Workflow Example
1. Upload a video file
2. Start a subtitle processing task (with options for language, translation, etc.)
3. Query the task status until completion
4. Retrieve the generated subtitle file, audio, or video with embedded subtitles
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
OpenAI Whisper
OpenAI Whisper MCP Server - 基于本地 Whisper CLI 的离线语音识别与翻译,无需 API Key,支持...
claude-flow
Claude-Flow v2.7.0 is an enterprise AI orchestration platform.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
ai-engineering-from-scratch
Learn it. Build it. Ship it for others. The most comprehensive open-source...
hyperframes
Write HTML. Render video. Built for agents.