diff --git a/README.md b/README.md index 3f3a82e..91bec41 100644 --- a/README.md +++ b/README.md @@ -36,24 +36,71 @@ OCR process PDF file(s) using the OCR API. Supports both single file and directo **Returns:** JSON with processing results (success/fail counts per file) -## Setup +--- + +## Deployment (For Other Hermes Agents) + +This MCP server can be deployed on any machine running Hermes. Follow the steps below. + +### Prerequisites + +- Python 3.10+ +- `uv` installed (`curl -LsSf https://astral.sh/uv/install.sh | sh`) +- Access to Gitea (or download the source code) +- OCR API Key + +### Step 1: Clone & Install ```bash +git clone https://gitea.imqimacau.com/tony-claw/procleaning-mcp.git cd procleaning-mcp uv sync -uv run python -m procleaning_mcp.server ``` -## Usage in Hermes +### Step 2: Configure API Key -Add to `~/.hermes/config.yaml`: +Set your OCR API key as an environment variable: + +```bash +# Add to shell profile +echo 'export OCR_API_KEY="your-api-key-here"' >> ~/.bashrc +source ~/.bashrc +``` + +Or set it in `~/.hermes/config.yaml` directly. + +### Step 3: Add to Hermes Config + +Edit `~/.hermes/config.yaml` and add the `mcp_servers` section: ```yaml mcp_servers: procleaning: command: "uv" - args: ["run", "--project", "/home/tony/procleaning-mcp", "python", "-m", "procleaning_mcp.server"] + args: ["run", "--project", "/home/USER/procleaning-mcp", "python", "-m", "procleaning_mcp.server"] timeout: 300 ``` -Then use `mcp_procleaning_batch_ocr_pdf` in any Hermes conversation. +> **Important:** Replace `/home/USER/procleaning-mcp` with the actual path on your machine. + +### Step 4: Restart Hermes + +Restart your Hermes agent to load the new MCP server. The tool `mcp_procleaning_batch_ocr_pdf` will be available in conversations. + +### Step 5: Test + +Run a test in Hermes: + +``` +input_file: /path/to/test.pdf +output_dir: /path/to/output +``` + +--- + +## Local Testing + +```bash +cd procleaning-mcp +uv run python -m procleaning_mcp.server +```