mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
textproc/pymupdf4llm-mcp: New port: MCP server for pymupdf4llm: convert PDF to Markdown for LLMs
This commit is contained in:
@@ -1775,6 +1775,7 @@
|
||||
SUBDIR += py-zensical
|
||||
SUBDIR += py-zope.i18nmessageid
|
||||
SUBDIR += py-zpt
|
||||
SUBDIR += pymupdf4llm-mcp
|
||||
SUBDIR += qo
|
||||
SUBDIR += qprint
|
||||
SUBDIR += qr
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
PORTNAME= pymupdf4llm-mcp
|
||||
DISTVERSION= 0.0.4
|
||||
CATEGORIES= textproc python
|
||||
MASTER_SITES= PYPI
|
||||
DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSION}
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= MCP server for pymupdf4llm: convert PDF to Markdown for LLMs
|
||||
WWW= https://github.com/pymupdf/pymupdf4llm-mcp
|
||||
|
||||
LICENSE= AGPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mcp>=1.6.0:misc/py-mcp@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pydantic2>=2.11.3:devel/py-pydantic2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pymupdf4llm>=0.0.21:textproc/py-pymupdf4llm@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}typer>=0.15.2:devel/py-typer@${PY_FLAVOR}
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}inline-snapshot>0:devel/py-inline-snapshot@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pytest-asyncio>0.25.3:devel/py-pytest-asyncio@${PY_FLAVOR}
|
||||
|
||||
USES= python
|
||||
USE_PYTHON= autoplist pep517 pytest
|
||||
|
||||
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
# tests as of 0.0.4: 1 passed in 0.22s
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1775602664
|
||||
SHA256 (pymupdf4llm_mcp-0.0.4.tar.gz) = 90bdf45b6cc1f867a84048d4804fc781aeacab90d3af79e94795c91448f65348
|
||||
SIZE (pymupdf4llm_mcp-0.0.4.tar.gz) = 71180
|
||||
@@ -0,0 +1,26 @@
|
||||
--- tests/test_tool.py.orig 2026-04-07 22:59:54 UTC
|
||||
+++ tests/test_tool.py
|
||||
@@ -14,11 +14,9 @@ def test_convert_pdf_to_markdown():
|
||||
assert result["success"] is True
|
||||
assert "markdown_content" in result
|
||||
assert result["markdown_content"] == snapshot("""\
|
||||
-# **Dummy PDF file**
|
||||
+**Dummy PDF file**
|
||||
|
||||
|
||||
------
|
||||
-
|
||||
""")
|
||||
|
||||
# temporary file to write the markdown content
|
||||
@@ -31,9 +29,7 @@ -----
|
||||
with open(temp_file_path, encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
assert content == snapshot("""\
|
||||
-# **Dummy PDF file**
|
||||
+**Dummy PDF file**
|
||||
|
||||
-
|
||||
------
|
||||
|
||||
""")
|
||||
@@ -0,0 +1,10 @@
|
||||
pymupdf4llm-mcp is an MCP (Model Context Protocol) server that exposes
|
||||
pymupdf4llm functionality as tools for LLM agents. It allows AI assistants
|
||||
to convert PDF documents to Markdown format, making them suitable for
|
||||
processing by Large Language Models (LLMs) and Retrieval-Augmented Generation
|
||||
(RAG) systems.
|
||||
|
||||
The server provides tools for:
|
||||
- Converting PDF files to Markdown with preserved structure
|
||||
- Handling tables, images, and text formatting
|
||||
- Saving converted Markdown to files
|
||||
Reference in New Issue
Block a user