Files changed (4) hide show
  1. .gitattributes +0 -1
  2. README.md +7 -60
  3. image.png +0 -3
  4. src/app.py +3 -3
.gitattributes CHANGED
@@ -33,4 +33,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
- image.png filter=lfs diff=lfs merge=lfs -text
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🗃️
4
  colorFrom: yellow
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 5.33.0
8
  app_file: src/app.py
9
  tags:
10
  - mcp-server-track
@@ -15,68 +15,15 @@ license: apache-2.0
15
  short_description: Convert any file to any file format.
16
  ---
17
 
18
- # MCP Server: Universal File Converter
19
 
20
- This project includes an MCP (Model Context Protocol Servers) server for universal file conversion.
21
 
22
- - **Gradio App URL:** https://huggingface.co/spaces/Agents-MCP-Hackathon/universal-file-converter
23
- - **MCP Server URL:** https://agents-mcp-hackathon-universal-file-converter.hf.space/gradio_api/mcp/sse
24
-
25
- **Available MCP Tools:**
26
-
27
- * `universal_file_converter_convert_local_file`: Convert a local document to a different format. This requires the server to be running locally. Parameters: `local_file_path` (string), `output_format` (string, default: "pdf").
28
- * `universal_file_converter_convert_from_url`: Convert a document from a URL to a different format. Parameters: `document_url` (string), `output_format` (string, default: "pdf").
29
-
30
- **Note on API Usage:** If you encounter API errors, it might be due to the free version's limit of 250 requests. To overcome this, consider duplicating the Space and adding your own [https://www.convertapi.com/](https://www.convertapi.com/) API key as environmental variable.
31
-
32
- **Watch the demo video:** [Universal File Converter MCP Server Demo (Agents MCP Hackathon)](https://www.youtube.com/watch?v=leq0dmR2ucg)
33
- [![Watch the demo on YouTube](image.png)](https://youtu.be/leq0dmR2ucg)
34
-
35
- ## Integration with MCP clients
36
-
37
- ## Integration
38
-
39
- To integrate this MCP into clients that support SSE (e.g., Cursor, Windsurf, Cline), add the following configuration to your MCP config:
40
-
41
- ```json
42
- {
43
- "mcpServers": {
44
- "gradio": {
45
- "url": "https://agents-mcp-hackathon-universal-file-converter.hf.space/gradio_api/mcp/sse"
46
- }
47
- }
48
- }
49
  ```
50
 
51
- For clients that only support stdio, such as Claude desktop, first install Node.js from the official website (https://nodejs.org/). Then, you can use the following command:
52
 
53
- ```json
54
- {
55
- "mcpServers": {
56
- "gradio": {
57
- "command": "npx",
58
- "args": [
59
- "mcp-remote",
60
- "https://agents-mcp-hackathon-universal-file-converter.hf.space/gradio_api/mcp/sse",
61
- "--transport",
62
- "sse-only"
63
- ]
64
- }
65
- }
66
- }
67
  ```
68
-
69
- ## Prompt Example
70
-
71
- ```
72
- Can you please convert the https://raw.githubusercontent.com/kingabzpro/bbc-news-class-mlops/refs/heads/master/README.md file into PDF
73
- ```
74
-
75
- ## Supported File Formats
76
-
77
- ```
78
- pdf, docx, doc, txt, rtf, odt, html, epub, png, jpg, jpeg, gif, bmp, tiff, webp, svg, xlsx, xls, csv, ods, pptx, ppt, odp, mp4, avi, mov, wmv, flv, webm, mp3, wav, flac, aac, ogg
79
- ```
80
-
81
-
82
-
 
4
  colorFrom: yellow
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 5.32.0
8
  app_file: src/app.py
9
  tags:
10
  - mcp-server-track
 
15
  short_description: Convert any file to any file format.
16
  ---
17
 
 
18
 
19
+ To run the server use:
20
 
21
+ ```bash
22
+ uv run python src/app.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ```
24
 
25
+ To test the server use:
26
 
27
+ ```bash
28
+ uv run python .\test\test_app.py
 
 
 
 
 
 
 
 
 
 
 
 
29
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
image.png DELETED

Git LFS Details

  • SHA256: 71740857e6ba524df3a643d83f6539f6069ed011c2c2426c51d72fae5bff6758
  • Pointer size: 131 Bytes
  • Size of remote file: 370 kB
src/app.py CHANGED
@@ -179,7 +179,7 @@ local_file_demo = gr.Interface(
179
  ),
180
  ],
181
  outputs=gr.File(label="Download Converted File"),
182
- description="Convert documents from your local file system to different formats. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/universal-file-converter/blob/main/README.md) for more information.",
183
  )
184
 
185
  url_demo = gr.Interface(
@@ -187,7 +187,7 @@ url_demo = gr.Interface(
187
  inputs=[
188
  gr.Textbox(
189
  label="Document URL",
190
- placeholder="Enter the URL of the document to convert (e.g., https://example.com/document.pdf).",
191
  value="",
192
  ),
193
  gr.Dropdown(
@@ -197,7 +197,7 @@ url_demo = gr.Interface(
197
  ),
198
  ],
199
  outputs=gr.File(label="Download Converted File"),
200
- description="Download and convert documents directly from URLs to different formats. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/universal-file-converter/blob/main/README.md) for more information.",
201
  )
202
 
203
  # Create tabbed interface
 
179
  ),
180
  ],
181
  outputs=gr.File(label="Download Converted File"),
182
+ description="Convert documents from your local file system to different formats.",
183
  )
184
 
185
  url_demo = gr.Interface(
 
187
  inputs=[
188
  gr.Textbox(
189
  label="Document URL",
190
+ placeholder="Enter the URL of the document to convert (e.g., https://example.com/document.pdf)",
191
  value="",
192
  ),
193
  gr.Dropdown(
 
197
  ),
198
  ],
199
  outputs=gr.File(label="Download Converted File"),
200
+ description="Download and convert documents directly from URLs to different formats.",
201
  )
202
 
203
  # Create tabbed interface