This is a FastMCP v2 server designed for FastMCP Cloud and Tri-Tender.
Key characteristics:
- ✅ Uses
FileResourcetool parameters – no local file paths - ✅ Returns LLM-ready strings (not JSON) for maximum compatibility
- ✅ Lightweight dependencies (no
pymupdf, no heavy native PDF engines) - ✅ Safe imports on FastMCP Cloud (no import-time crashes)
Use this as your entrypoint:
server.py:mcp
Extract raw text from an uploaded document. Accepts:
- DOCX
- TXT / HTML (as text)
- Images (basic OCR if Tesseract is available)
Returns plain text.
Main Tri-Tender analysis tool.
- Reads the file bytes
- Detects mime
- Extracts text
- Adds a system-style instruction block telling the LLM how to interpret the tender
- Appends the full tender text
The result is ideal to drop directly into the model as context.
Lightweight metadata: mime, size, page count (for PDFs) and usage instructions.
Quick pre-flight sanity check – verifies that text can be extracted and returns a small preview snippet.
tender://config/versiontender://config/supported-formats
uv pip install fastmcp
pip install -r requirements.txt
fastmcp run server.pyOr:
python server.py