Skip to main content
Glama

PDF Manipulation MCP Server

install.shโ€ข2.79 kB
#!/bin/bash # PDF Manipulation MCP Server Installation Script with UV echo "๐Ÿš€ Installing PDF Manipulation MCP Server with UV" echo "==================================================" # Get the current directory SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo "๐Ÿ“ Project directory: $SCRIPT_DIR" # Check if UV is available if ! command -v uv &> /dev/null; then echo "โŒ Error: UV not found. Please install UV first:" echo " curl -LsSf https://astral.sh/uv/install.sh | sh" exit 1 fi echo "โœ… Found UV: $(uv --version)" # Check Python version echo "๐Ÿ Checking Python version..." if ! uv python list | grep -q "3.10\|3.11\|3.12"; then echo "๐Ÿ“ฆ Installing Python 3.11 with UV..." uv python install 3.11 fi # Install dependencies with UV echo "๐Ÿ“ฆ Installing dependencies with UV..." uv pip install mcp pymupdf pymupdf4llm markdown-pdf if [ $? -eq 0 ]; then echo "โœ… Dependencies installed successfully" else echo "โŒ Error installing dependencies" exit 1 fi # Test the server echo "๐Ÿงช Testing the MCP server..." uv run python test_mcp_server.py if [ $? -eq 0 ]; then echo "โœ… Server test passed" else echo "โŒ Server test failed" exit 1 fi echo "" echo "๐ŸŽ‰ Installation completed successfully!" echo "" echo "๐Ÿ“‹ Available tools:" echo " - pdf_to_markdown: Convert PDF to Markdown" echo " - markdown_to_pdf: Convert Markdown to PDF" echo " - pdf_add_text: Add text to PDF" echo " - pdf_replace_text: Replace text in PDF" echo " - pdf_add_image: Add images to PDF" echo " - pdf_extract_images: Extract images from PDF" echo " - pdf_add_annotation: Add annotations to PDF" echo " - pdf_add_form_field: Add form fields to PDF" echo " - pdf_fill_form: Fill form fields" echo " - pdf_merge_pages: Merge multiple PDFs" echo " - pdf_split: Split PDF into pages" echo " - pdf_rotate_page: Rotate pages" echo " - pdf_delete_page: Delete pages" echo " - pdf_get_info: Get PDF information" echo " - pdf_set_metadata: Set PDF metadata" echo "" echo "๐Ÿ”ง To run the server:" echo " uv run python server.py" echo "" echo "๐Ÿ“š Cursor IDE Setup:" echo " 1. Open Cursor IDE" echo " 2. Go to Settings (Cmd/Ctrl + ,)" echo " 3. Search for 'MCP' or go to Extensions > MCP" echo " 4. Add this server configuration:" echo "" echo " {" echo " \"mcpServers\": {" echo " \"pdf-manipulation\": {" echo " \"command\": \"uv\"," echo " \"args\": [\"run\", \"python\", \"server.py\"]," echo " \"cwd\": \"$SCRIPT_DIR\"" echo " }" echo " }" echo " }" echo "" echo " 5. Save the configuration and restart Cursor" echo " 6. The PDF manipulation tools will appear in the MCP tools panel" echo "" echo "๐Ÿ“– For detailed setup instructions, see README.md"

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andr3medeiros/pdf-manipulation-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server