- Nutrient DWS MCP Server
Nutrient DWS MCP Server
A Model Context Protocol (MCP) server implementation that integrates with the Nutrient Document Web Service (DWS) Processor API, providing powerful PDF processing capabilities for AI assistants.
This server allows AI assistants to access the tools provided by Nutrient DWS Processor API, enabling operations such as digital signing, document generation, document editing, OCR, watermarking, redaction, and more.
Compatibility
Nutrient DWS MCP Server has been tested with Claude Desktop (Claude 3.7 Sonnet). Other MCP clients may work, but results may vary.
Nutrient DWS MCP Server only supports macOS for now. Feel free to open an issue if you’re interested in Windows/Linux support.
Further configuration
Sandbox mode (Recommended)
The server supports an optional sandbox mode that restricts file operations to a specific directory. This is useful for security purposes, ensuring that the server can only read from and write to files within the specified directory. You should drop any documents you'd like to work on in this directory.
To enable sandbox mode, use the --sandbox (or -s) command line argument followed by the path to the directory:
npx @nutrient-sdk/dws-mcp-server --sandbox /path/to/sandbox/directory
When sandbox mode is enabled:
- For relative paths, they are resolved relative to the sandbox directory.
- All input file paths are validated to ensure they exist and reside in the sandbox before performing any file operations
If no sandbox directory is specified, the server will operate without file path restrictions, allowing access to any file on the system that the server process has permission to access. (Not Recommended)
Output location
Processed files will be saved to a location determined by the LLM. If sandbox mode is enabled, it will reside inside this directory.
To further guide the LLM on where to place the output file, use natural language such as "please output the result to output/my_result.pdf".
Or you may also add an output directory in your sandbox to hint to the LLM to use this directory for all resulting files.
Contributions
Please see the contribution guidelines in CONTRIBUTING.md
Server Config
{
"mcpServers": {
"nutrient-dws": {
"command": "npx",
"args": [
"-y",
"@nutrient-sdk/dws-mcp-server",
"--sandbox",
"</your/sandbox/directory>"
],
"env": {
"NUTRIENT_DWS_API_KEY": "<YOUR_API_KEY_HERE>"
}
}
}
}