Integrates with Google Gemini API to power the intelligent agent functionality in the client application for PDF to Markdown conversion
Uses LangChain to create the reactive agent that orchestrates PDF uploading and conversion operations between MCP servers
Leverages LangGraph alongside LangChain to build the intelligent agent in the client application that interacts with the MCP servers
Converts PDF documents to Markdown format through the dedicated conversion MCP server
MCP PDF to Markdown Converter 📄➡️📝
This project provides a robust system to convert PDF documents into Markdown format using a Multi-Server Communication Protocol (MCP) architecture. It comprises two FastMCP servers for uploading and converting files, and a client application that orchestrates these operations using a reactive agent.
Project Structure
The core components of this project are:
upload_mcp
: A FastMCP server (running onhttp://127.0.0.1:8000
) responsible for handling PDF file uploads.convert_mcp
: A FastMCP server (running onhttp://127.0.0.1:8001
) responsible for converting uploaded PDFs to Markdown.client_convert
: A client application that acts as an intelligent agent. It uses Langchain and LangGraph to interact with the MCP servers, upload PDFs, and trigger their conversion.
Getting Started 🚀
Follow these steps to set up and run the project:
1. Prerequisites
- Python 3.9+
- uv: A fast Python package installer and resolver. If you don't have
uv
installed, you can get it viapip
:
2. Project Setup
- Clone the repository (if applicable) or navigate to your project root.
- Create and Sync Virtual Environment:
uv
will create a.venv
directory and install all necessary dependencies based on yourpyproject.toml
. - Activate the Virtual Environment:
This step is crucial to ensure all commands run within your isolated environment.
- macOS/Linux:
- Windows (Command Prompt):
- Windows (PowerShell):
- macOS/Linux:
- Create
.env
file: Create a file named.env
in the project root (MCP/
) and add your Google Gemini API key:Replace"YOUR_GEMINI_API_KEY_HERE"
with your actual API key.
3. Running the Servers and Client
You need to run the two MCP servers in separate terminal windows/tabs, and then run the client in a third.
Terminal 1: Run upload_mcp
Server
Navigate to your project root (/path/to/your/MCP/
) and run:
This server cannot be installed
A multi-server system that converts PDF documents to Markdown format using FastMCP architecture with upload and convert servers orchestrated by a reactive client agent.
Related MCP Servers
- AsecurityAlicenseAqualityMCP server for seamless document format conversion using Pandoc, supporting Markdown, HTML, PDF, DOCX (.docx), csv and more.Last updated -1338PythonMIT License
- AsecurityFlicenseAqualityAn MCP server for converting Markdown documents to PDF files.Last updated -11010JavaScript
- AsecurityAlicenseAqualityA document conversion server that transforms various file formats (PDFs, documents, images, audio, web content) to Markdown with improved multilingual and UTF-8 support.Last updated -1029TypeScriptMIT License
- -securityAlicense-qualityAn MCP server that provides multiple file conversion tools for AI agents, supporting various document and image format conversions including DOCX to PDF, PDF to DOCX, image conversions, Excel to CSV, HTML to PDF, and Markdown to PDF.Last updated -15PythonMIT License