mcpField
G
gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

Local
github.com/bsmnykMedia & Design0Updated 78w ago

About gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

gradio-transcript-mcp is a Gradio app and MCP server for transcribing audio or video from a URL into English text. It uses yt-dlp, ffmpeg, and Whisper, and is intended for MCP clients that need URL-based transcription.

Key features

  1. 01Transcribe audio and video URLs
  2. 02Download and convert media to WAV
  3. 03Use Whisper for English transcription
  4. 04Select CPU or GPU dynamically
  5. 05Provide a Gradio web interface

Use cases

  1. 01Transcribe a recording available at a URL
  2. 02Send URL-based media transcription requests from an MCP client

MCP support

It exposes the `transcribe_url` tool to MCP clients, accepting a media URL and returning an English transcript or an error message. The server is available through Gradio's SSE endpoint.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

title: gradio-transcript-mcp - Gradio MCP Server for Transcription emoji: 💬 colorFrom: green colorTo: green sdk: gradio sdk_version: 5.29.0 app_file: app.py pinned: false license: apache-2.0 short_description: Gradio MCP server to transcribe audio & video from URLs

gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

Overview

gradio-transcript-mcp is a Gradio application configured to function as an MCP (Model Control Protocol) server. It is designed to transcribe audio and video from URLs into text. Implementing OpenAI's Whisper and ffmpeg (via yt-dlp), this server enables MCP clients (like Cline) to process multimedia inputs efficiently by downloading and converting content from a given URL. It supports robust handling, including format conversion to WAV and dynamic device selection (CPU or GPU).

The repository contains the following main components:

  • app.py: The main Gradio application file that runs the MCP server.
  • transcription_tool.py: The core logic for handling file conversion and calling the transcription function.
  • transcription.py: Contains the implementation for Whisper transcription using the transformers library.
  • requirements.txt: Lists the necessary Python dependencies.
  • ffmpeg_setup.py: Script to ensure ffmpeg is available.
  • logging_config.py: Configuration for logging.

Installation

  1. Clone this repository:
    git clone https://huggingface.co/spaces/bismay/gradio-transcript-mcp
    cd gradio-transcript-mcp
    
  2. Install dependencies:
    pip install -r requirements.txt
    
    This will install the necessary libraries, including gradio[mcp], yt-dlp, transformers, and torch.

Usage

Running the Gradio App / MCP Server

To run the Gradio application which also starts the MCP server, execute:

python app.py

This will launch a local Gradio web interface and start the MCP server. The server will expose the transcribe_url function as an MCP tool.

Using as an MCP Server

When you run python app.py, the application starts an MCP server accessible to MCP clients.

Exposed Tool:

The server exposes one tool: transcribe_url.

  • Description: Transcribes audio or video from a given URL. Downloads the media from the URL, converts it to WAV format, and then uses the TranscriptTool to perform the transcription in English.
  • Input:
    • url (string): The URL of the audio or video file.
  • Output: (string): The transcription of the audio/video in English, or an error message if download or transcription fails.

Connecting an MCP Client:

The MCP server will typically be accessible at http://127.0.0.1:7860/gradio_api/mcp/sse when run locally. You can find the exact URL printed in your console when the Gradio app launches.

To connect an MCP client (like Cline) to this server, you need to add a configuration entry in your client's settings. The exact format depends on your client, but it generally involves specifying a name for the server and its URL.

Example configuration for a client (like Cline) that supports SSE:

{
  "mcpServers": {
    "gradio-transcript": {
      "url": "http://127.0.0.1:7860/gradio_api/mcp/sse"
    }
  }
}

Note: If your MCP client does not directly support SSE-based servers (like Claude Desktop), you may need to use a tool like mcp-remote as an intermediary.

In those cases, you can use a tool such as mcp-remote. First install Node.js. Then, add the following to your own MCP Client config:

{
  "mcpServers": {
    "gradio": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:7860/gradio_api/mcp/sse"
      ]
    }
  }
}
Connecting to the Hosted Server on Hugging Face Spaces

This application is also hosted on Hugging Face Spaces, providing a publicly accessible MCP server. You can connect to this hosted server using the following URL:

https://bismay-gradio-transcript-mcp.hf.space/gradio_api/mcp/sse

To connect your MCP client (like Cline) to this hosted server, add a configuration entry similar to this:

{
  "mcpServers": {
    "gradio-transcript": {
      "url": "https://bismay-gradio-transcript-mcp.hf.space/gradio_api/mcp/sse"
    }
  }
}

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for more details.


Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.