Nutrient MCP Server: Create Edit Sign Extract Documents
Create, edit, sign and extract documents with natural language using the MCP server for fast, secure document workflows.
npx -y @PSPDFKit/nutrient-dws-mcp-serverOverview
The Nutrient MCP Server is an implementation of the Model Context Protocol (MCP) that helps developers build document workflows driven by natural language. It connects a language model with document tooling (PDF operations, OCR, signing) so you can create, edit, sign and extract data from documents using plain-English prompts rather than wiring low-level PDF APIs yourself.
Designed for integration into backend services, the server acts as a translator between natural-language instructions and concrete document operations. Typical uses include converting prompts into filled forms, extracting structured fields from scanned documents, programmatically applying digital signatures, and generating or modifying contract text — all while keeping the document assets and signing credentials under your control.
Features
- Create documents from templates or from scratch using natural language prompts
- Edit document content (text replacement, field insertion, redaction) via instructions
- Extract structured data (form fields, tables, named entities) from PDFs/OCR results
- Apply digital signatures and prepare documents for e-sign workflows
- Pluggable model/back-end providers (LLMs) and configurable document processors
- REST API for easy integration with backends, server-side automation, or job queues
- Local or cloud storage support and audit-friendly operation logs
Installation / Configuration
Prerequisites: Node.js (>= 16) or Docker, and access credentials for any integrated services (LLM provider, PSPDFKit or other PDF processor, signing backend).
Clone the repository and install dependencies:
Create a copy of the example environment file and edit configuration values:
# then open .env and set the variables
Example .env (adjust to your environment):
PORT=3000
MCP_MODEL=openai-gpt-4o
MODEL_API_KEY=sk-...
PSPDFKIT_SERVER_URL=https://your-pspdfkit-server
PSPDFKIT_API_KEY=pspdfkit_...
STORAGE_DIR=./storage
SIGNING_KEY_PATH=/secrets/signing-key.pem
LOG_LEVEL=info
Typical npm scripts:
# start in production
# start in development with auto-reload
Docker
# build
# run (example)
Configuration reference (common environment variables):
| Variable | Description |
|---|---|
| PORT | HTTP port to listen on |
| MCP_MODEL | Identifier for the model or connector to use |
| MODEL_API_KEY | API key for your LLM provider |
| PSPDFKIT_SERVER_URL | Optional URL for a PSPDFKit backend |
| PSPDFKIT_API_KEY | API key for PSPDFKit operations |
| STORAGE_DIR | Local directory or mount for uploaded documents |
| SIGNING_KEY_PATH | Path to private key or signing credential store |
| LOG_LEVEL | Logging verbosity (error, warn, info, debug) |
Available Tools / Resources
- GitHub repository: https://github.com/PSPDFKit/nutrient-dws-mcp-server
- Built-in API documentation: the server typically exposes an OpenAPI/Swagger spec at /openapi.json (check your running instance)
- Example scripts: look for an examples/ or clients/ folder in the repo showing sample requests and response handling
- Integrations: adapters for PDF processing (PSPDFKit or other), OCR modules, and signing backends (configurable)
Typical request format
The server expects an MCP-style JSON payload describing the intent, document(s), and contextual metadata. A minimal example:
Common action values: create, edit, sign, extract. The server returns a job result with operation status, a link to the modified document, and structured outputs when applicable (extracted fields, audit log).
Use Cases
- Form extraction and onboarding: Upload scanned onboarding forms and use a single prompt like “Extract name, address, email, and employer from this page” to populate your CRM with structured JSON.
- Contract drafting and edits: Start from a short brief — “Create a one-page contractor agreement for freelance designers with payment terms and a 14-day termination clause” — and receive a PDF draft you can further refine or send for signature.
- Bulk signing automation: Programmatically attach signature fields and apply signatures for batches of