Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pymupdf/pymupdf4llm-mcp/llms.txt

Use this file to discover all available pages before exploring further.

SSE (Server-Sent Events) mode runs pymupdf4llm-mcp as a persistent HTTP server that multiple MCP clients can connect to simultaneously. Rather than being spawned and killed by a single client as in stdio mode, the server stays running independently and accepts connections over the network. This makes SSE the right choice for shared environments, containerised deployments, and any situation where more than one client needs access to the same server.

CLI Reference

The sse subcommand accepts two optional flags to control where the server listens:
FlagDefaultDescription
--hostlocalhostNetwork interface to bind to
--port3000TCP port to listen on
Full signature:
pymupdf4llm-mcp sse [--host HOST] [--port PORT]

Launching the Server

1

Start with default host and port

Run the server on localhost:3000 — accessible only from the same machine:
uvx pymupdf4llm-mcp@latest sse
The SSE endpoint will be available at http://localhost:3000/sse.
2

Start with a custom host and port

Bind to all network interfaces on a custom port, for example to accept connections from other machines on the network:
uvx pymupdf4llm-mcp@latest sse --host 0.0.0.0 --port 8080
Passing --host 0.0.0.0 exposes the server on all network interfaces, making it reachable from any device that can reach the host machine. Only use this in a trusted network or behind a reverse proxy that handles authentication and TLS termination.

Connecting an MCP Client

Once the server is running, point your MCP client at the SSE endpoint. Most clients that support SSE transport accept a url key in their configuration:
{
  "mcpServers": {
    "pymupdf4llm-mcp": {
      "url": "http://localhost:3000/sse"
    }
  }
}
Update the url to match your custom --host and --port if you changed the defaults.

When to Use SSE

SSE mode is the better fit whenever stdio’s process-per-client model is too limiting:

Multi-client access

Multiple editors, agents, or automated pipelines can connect to the same server instance at the same time.

Remote and containerised access

The server runs independently from the clients, making it easy to deploy inside Docker or on a remote host. See Docker deployment for a ready-made setup.

CI/CD pipelines

A shared SSE server can serve many pipeline runs without the overhead of starting a new process for each one.

Persistent availability

The server keeps running between requests, so there is no cold-start delay when a new client connects.
The Docker deployment defaults to stdio mode but is commonly run with SSE by passing sse --host 0.0.0.0 at docker run time, binding to all interfaces so Docker’s port mapping works correctly. See that page for the full container setup.

Build docs developers (and LLMs) love