OsGo commited on
Commit
e7b7975
Β·
verified Β·
1 Parent(s): 5d8a8ea

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +3 -0
  2. app.py +39 -0
README.md CHANGED
@@ -39,6 +39,9 @@ Demonstrating how *Model Context Protocol* connects LLMs with local and remote p
39
 
40
  <video controls src=".\beta_docx_enhaced.mp4" width="100%"></video>
41
 
 
 
 
42
  ## ✨ Features
43
 
44
  - πŸ“– **read_word**: Reads and extracts content from `.docx` files preserving paragraph breaks.
 
39
 
40
  <video controls src=".\beta_docx_enhaced.mp4" width="100%"></video>
41
 
42
+ ## πŸ”— LinkedIn Showcase
43
+ Project demo post: https://www.linkedin.com/posts/oscar-felipe-gonz%C3%A1lez-gonz%C3%A1lez-019971387_mcp-artificialintelligence-hackathon-activity-7400155174138245121-DKiX
44
+
45
  ## ✨ Features
46
 
47
  - πŸ“– **read_word**: Reads and extracts content from `.docx` files preserving paragraph breaks.
app.py CHANGED
@@ -26,6 +26,45 @@ def crear_word(ruta, contenido):
26
 
27
  with gr.Blocks() as demo:
28
  gr.Markdown("# Servidor Gradio MCP - Word Reader/Writer")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  with gr.Tab("Leer Word"):
30
  ruta_lectura = gr.Textbox(label="Ruta local del archivo Word a leer")
31
  salida_lectura = gr.Textbox(label="Contenido del archivo Word", lines=10)
 
26
 
27
  with gr.Blocks() as demo:
28
  gr.Markdown("# Servidor Gradio MCP - Word Reader/Writer")
29
+ with gr.Tab('Intro'):
30
+ gr.Markdown("""## MCP Word Tools πŸš€
31
+ This Gradio MCP server exposes Word document utilities to LLM copilots via Model Context Protocol.
32
+
33
+ ### 🧰 Tools
34
+ - read_word(path) β†’ Read .docx preserving paragraph breaks.
35
+ - create_word(path, content) β†’ Create / overwrite a .docx from text lines.
36
+
37
+ ### βš™οΈ Usage (Prompt Examples)
38
+ 1. Read & summarize:
39
+ Use read_word on C:\\Docs\\report.docx, summarize to 5 bullet points, then create_word to C:\\Docs\\report_summary.docx
40
+ 2. Translate:
41
+ Read C:\\Docs\\notes.docx, translate to Spanish, write C:\\Docs\\notes_es.docx
42
+ 3. Generate:
43
+ create_word to C:\\Docs\\plan.docx with a 5-day Tokyo itinerary.
44
+
45
+ ### πŸ” Security Tips
46
+ - Limit allowed_directories in your MCP client config.
47
+ - Avoid sensitive / personal data in remote sessions.
48
+ - Paths overwrite existing files without asking.
49
+
50
+ ### πŸ§ͺ Troubleshooting
51
+ File not found β†’ Check path & permissions
52
+ Empty output β†’ Document has empty paragraphs
53
+ Corrupt file β†’ Re-open & re-save in Word
54
+
55
+ ### πŸ“‘ Remote Endpoint
56
+ https://mcp-1st-birthday-mcp-docx-tools.hf.space/gradio_api/mcp/
57
+
58
+ ### πŸ”— LinkedIn Showcase
59
+ Project demo post: https://www.linkedin.com/posts/oscar-felipe-gonz%C3%A1lez-gonz%C3%A1lez-019971387_mcp-artificialintelligence-hackathon-activity-7400155174138245121-DKiX
60
+
61
+ ### πŸ“¦ Stack
62
+ Python Β· Gradio (mcp_server) Β· python-docx Β· MCP
63
+
64
+ ### πŸ“– License
65
+ Apache 2.0
66
+
67
+ ❀️ Hackathon Edition""")
68
  with gr.Tab("Leer Word"):
69
  ruta_lectura = gr.Textbox(label="Ruta local del archivo Word a leer")
70
  salida_lectura = gr.Textbox(label="Contenido del archivo Word", lines=10)