Skip to content

Install NextPDF Connect

Install nextpdf/server with Composer. Then run one of the three transport entry points. The core install requires only PHP 8.4 and the NextPDF engine. Redis and Premium are optional.

Terminal window
composer require nextpdf/server

This command installs nextpdf/core: ^3.0. The package declares php: >=8.4 <9.0, so Composer refuses to install it on PHP 8.3 or below, or on PHP 9.

The package is a Composer package of type library. Installing it adds four console entry points to vendor/bin/:

  • vendor/bin/nextpdf-mcp — the Model Context Protocol (MCP) stdio server.
  • vendor/bin/nextpdf-server — the Representational State Transfer (REST) server (RoadRunner HTTP worker).
  • vendor/bin/nextpdf-grpc — the gRPC server (RoadRunner gRPC worker).
  • vendor/bin/generate-skills — exports the tool catalog as agent skills.

A fifth script, bin/nextpdf-prune, ships in the repository for maintenance tasks. Run it directly instead of through vendor/bin/.

You do not need a service provider, bundle, or framework registration. The server runs as a standalone process. It is not a library you wire into a host application.

Composer also installs the package’s runtime dependencies. These transitive dependencies include the Hypertext Transfer Protocol (HTTP) and gRPC stack:

  • league/route and nyholm/psr7 — REST routing and PHP Standard Recommendation (PSR)-7 messages.
  • spiral/roadrunner-http and spiral/roadrunner-grpc — the RoadRunner worker runtime for the REST and gRPC transports.
  • psr/http-server-middleware and psr/http-server-handler — the PSR-15 middleware contracts the REST pipeline implements.
  • symfony/yaml — configuration file parsing.
  • ramsey/uuid — request and resource identifiers.

Do not install these packages directly. Composer resolves them for you from nextpdf/server.

To check the install, list the tool catalog without starting a server:

Terminal window
./vendor/bin/generate-skills --dry-run --list-tools

This command starts the registry, runs tier detection, and prints the tools that this installation exposes. The list reflects the optional packages that are present. See /connect/tool-catalog/.

A production install pins the dependency and skips development tooling:

Terminal window
composer require nextpdf/server --no-dev
composer install --no-dev --optimize-autoloader --classmap-authoritative

For the REST and gRPC transports, also install the RoadRunner binary. RoadRunner is the process supervisor that owns the worker pool. The PHP package provides the worker, not the supervisor:

Terminal window
./vendor/bin/rr get-binary
  • Optional Redis. The ext-redis extension is a suggest, not a require. Without it, the REST server uses in-memory rate-limit, idempotency, and document stores. Those in-memory stores are correct for a single worker, but they are not shared across a multi-worker pool. For multi-worker deployments, install ext-redis and set the Redis environment variables. See /connect/configuration/.

  • Optional Premium. nextpdf/premium is a suggest. When you install it alongside the server, the registry’s tier-detection probes find its provider classes and register the additional Pro and Enterprise tools. Without it, only the core catalog is served. This is a packaging decision made at composer require time, not a runtime toggle.

  • The MCP server needs no RoadRunner. nextpdf-mcp is a plain PHP process that speaks JavaScript Object Notation Remote Procedure Call (JSON-RPC) over standard input and output (stdio). RoadRunner is required only for the REST and gRPC transports.

Composer dependency resolution accounts for most install-time cost. In production images, use --prefer-dist and an authoritative classmap to keep cold-boot autoload time low. The server’s own boot cost is the registry scan and tier detection. The performance_budget on this page bounds that boot cost.

Install only from the official Packagist package nextpdf/server. Pin the version in composer.json and commit composer.lock so the deployed tool catalog is reproducible. Networked transports require an application programming interface (API) key before they serve any non-health endpoint; see /connect/security-and-operations/.

This page describes installation mechanics only. Protocol and security conformance citations are pinned on /transports/mcp/, /transports/rest/, /transports/grpc/, and /connect/security-and-operations/.

The core install is fully functional. It handles document creation, inspection, and diagnostics over all three transports. Adding nextpdf/premium extends the catalog without changing the transport or authentication model.

  • /connect/overview/ — what the package provides
  • /connect/quickstart/ — first runnable exchange
  • /connect/configuration/ — environment variables and the config file
  • /connect/deployment/ — RoadRunner, Docker, and combined-transport deployment
  • /connect/tool-catalog/ — what tools this install exposes