Skip to content

Please add a proper entrypoint / package so pdf-mcp-server can be installed and run directly #1

@christopherquenneville

Description

@christopherquenneville

Hi 👋 thank you for this project!

Right now, it’s difficult to run pdf-mcp-server without cloning the repo manually and calling server.py directly. The problems are:

server.py defines a main() coroutine but never calls it, so when you run python server.py nothing happens.
There is no packaging (pyproject.toml / setup.py), so it can’t be installed with common tools like uvx.
It’s also not published to PyPI or npm, so npx pdf-mcp-server or uvx --from pdf-mcp-server pdf-mcp-server don’t work.

✅ Suggested Solutions
Option 1 – Minimal fix
At the bottom of server.py, add:
if __name__ == "__main__": import asyncio asyncio.run(main())

This ensures python server.py will actually start the server process.

Option 2 – Package for Python & PyPI (recommended)
Add a pyproject.toml like this:
`[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "pdf-mcp-server"
version = "0.1.0"
dependencies = [
"mcp >= 0.1.0",
"pdfplumber >= 0.10.0",
]

[project.scripts]
pdf-mcp-server = "server:main"`

This way users can just run:

uvx --from git+https://github.com/Sohaib-2/pdf-mcp-server.git pdf-mcp-server
uvx --from pdf-mcp-server pdf-mcp-server

Option 3 – npm wrapper (alternative)
As another option, you could publish an npm package named pdf-mcp-server that simply calls the Python script. This would let people install/run it using:

Option 3 – npm wrapper (alternative) As another option, you could publish an npm package named pdf-mcp-server that simply calls the Python script. This would let people install/run it using:

🌍 Why this helps
No manual cloning or absolute file paths.
Clean, one‑line install & run for users (uvx pdf-mcp-server or npx pdf-mcp-server).
Easier adoption across platforms (Windows, macOS, Linux).
Thanks again for sharing this repo! With one of these changes, it’ll be much easier for others to use directly. 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions