diff --git a/.github/workflows/mcpb.yml b/.github/workflows/mcpb.yml new file mode 100644 index 0000000..7cb5be4 --- /dev/null +++ b/.github/workflows/mcpb.yml @@ -0,0 +1,38 @@ +name: Build and Upload MCPB + +on: + pull_request: + release: + types: [published] + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build MCPB + run: | + cd mcpb + bash pack.sh + + - name: Upload artifact (PR only) + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: docling-mcp.mcpb + path: mcpb/docling-mcp.mcpb + + - name: Upload to release (on release) + if: github.event_name == 'release' + run: | + gh release upload "${{ github.event.release.tag_name }}" \ + mcpb/docling-mcp.mcpb \ + --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index f90c232..a4c00fe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ env.secrets **.DS_Store _cache/** +*.mcpb +mcpb/assets/ + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 0000000..035671c --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/screenshot-creation.png b/docs/assets/screenshot-creation.png new file mode 100644 index 0000000..100d6e3 Binary files /dev/null and b/docs/assets/screenshot-creation.png differ diff --git a/docs/assets/screenshot-extraction.png b/docs/assets/screenshot-extraction.png new file mode 100644 index 0000000..a49ec14 Binary files /dev/null and b/docs/assets/screenshot-extraction.png differ diff --git a/docs/assets/screenshot-summary.png b/docs/assets/screenshot-summary.png new file mode 100644 index 0000000..106b20c Binary files /dev/null and b/docs/assets/screenshot-summary.png differ diff --git a/docs/assets/screenshot-thumbnail.png b/docs/assets/screenshot-thumbnail.png new file mode 100644 index 0000000..0fbba1a Binary files /dev/null and b/docs/assets/screenshot-thumbnail.png differ diff --git a/mcpb/.mcpbignore b/mcpb/.mcpbignore new file mode 100644 index 0000000..db8e48e --- /dev/null +++ b/mcpb/.mcpbignore @@ -0,0 +1,3 @@ +node_modules/ +pack.sh +**.DS_Store diff --git a/mcpb/manifest.json b/mcpb/manifest.json new file mode 100644 index 0000000..b385b82 --- /dev/null +++ b/mcpb/manifest.json @@ -0,0 +1,83 @@ +{ + "manifest_version": "0.2", + "name": "docling-mcp", + "display_name": "Docling MCP", + "version": "1.2.0", + "description": "Docling MCP Server - Document processing and analysis capabilities such as creation and manipulation", + "author": { + "name": "Docling team", + "email": "deepsearch-core@zurich.ibm.com" + }, + "homepage": "https://docling.ai", + "support": "https://github.com/docling-project/docling-mcp/issues", + "icon": "assets/logo.svg", + "screenshots": [ + "assets/screenshot-summary.png", + "assets/screenshot-thumbnail.png", + "assets/screenshot-creation.png", + "assets/screenshot-extraction.png" + ], + "server": { + "type": "python", + "entry_point": "docling-mcp-server", + "mcp_config": { + "command": "python3", + "args": [ + "-m", + "pipx", + "run", + "--spec", + "docling-mcp==${user_config.version}", + "docling-mcp-server" + ], + "env": { + "PYTHONPATH": "${__dirname}/lib", + "DOCLING_MCP_KEEP_IMAGES": "${user_config.keep_images}" + } + } + }, + "user_config": { + "keep_images": { + "type": "boolean", + "title": "Keep images", + "description": "Generate and store pages images while converting the documents.", + "default": false, + "required": false + }, + "version": { + "type": "string", + "title": "Version", + "description": "Version of the docling-mcp package which is being installed.", + "default": "1.2.0", + "required": false + } + }, + "keywords": [ + "docling", + "document", + "pdf", + "docx", + "pptx", + "html", + "markdown", + "processing", + "convert", + "creation" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/docling-project/docling-mcp" + }, + "compatibility": { + "claude_desktop": ">=0.13.0", + "platforms": [ + "darwin", + "win32", + "linux" + ], + "runtimes": { + "python": ">=3.10" + } + } +} diff --git a/mcpb/pack.sh b/mcpb/pack.sh new file mode 100755 index 0000000..c76ecf7 --- /dev/null +++ b/mcpb/pack.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +# Read version from ../pyproject.toml +VERSION=$(grep -E '^[[:space:]]*version[[:space:]]*=' ../pyproject.toml \ + | head -n1 \ + | sed -E 's/[[:space:]]*version[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/') +echo "Using version: $VERSION" + +# Update manifest.json +jq --arg ver "$VERSION" \ + '.version = $ver | .user_config.version.default = $ver' \ + manifest.json > manifest.tmp.json && mv manifest.tmp.json manifest.json + +# Python lib +python -m pip install -U pipx --target ./lib + +# Assets (logo, screenshots, etc) +mkdir -p assets/ +cp ../docs/assets/* assets/ + +# Pack +npx -y @anthropic-ai/mcpb pack . docling-mcp.mcpb