-
Notifications
You must be signed in to change notification settings - Fork 5
Improve local MCP auth flow, tool metadata, and sandbox validation #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vladimir-tikhonov-nutrient
wants to merge
3
commits into
main
Choose a base branch
from
fix/stdio-oauth-startup-cli-flags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+489
−91
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| { | ||
| "manifest_version": "0.3", | ||
| "name": "nutrient-dws-mcp-server", | ||
| "display_name": "Nutrient DWS", | ||
| "version": "0.0.5", | ||
vladimir-tikhonov-nutrient marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "description": "Process, sign, redact, and transform documents from Claude Desktop using Nutrient.", | ||
| "long_description": "A local Claude Desktop extension for document processing with Nutrient. It runs as a stdio MCP server, reads files from a user-selected sandbox directory, opens a browser for OAuth on the first request that uses the Nutrient API, and writes processed results back to local output paths.", | ||
| "author": { | ||
| "name": "Nutrient", | ||
| "url": "https://www.nutrient.io/" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/PSPDFKit/nutrient-dws-mcp-server.git" | ||
| }, | ||
| "homepage": "https://www.nutrient.io/mcp-server-pdf-automation-llm/", | ||
| "documentation": "https://www.nutrient.io/guides/dws-processor/getting-started/mcp-server/", | ||
| "support": "https://github.com/PSPDFKit/nutrient-dws-mcp-server/issues", | ||
| "keywords": [ | ||
| "mcp", | ||
| "pdf", | ||
| "document-processing", | ||
| "ocr", | ||
| "redaction", | ||
| "digital-signature" | ||
| ], | ||
| "license": "MIT", | ||
| "privacy_policies": [ | ||
| "https://www.nutrient.io/legal/privacy/" | ||
| ], | ||
| "server": { | ||
| "type": "node", | ||
| "entry_point": "dist/index.js", | ||
| "mcp_config": { | ||
| "command": "node", | ||
| "args": [ | ||
| "${__dirname}/dist/index.js", | ||
| "--sandbox", | ||
| "${user_config.sandbox_path}" | ||
| ], | ||
| "env": {} | ||
| } | ||
| }, | ||
| "tools": [ | ||
| { | ||
| "name": "document_processor", | ||
| "description": "Convert, OCR, extract, watermark, rotate, flatten annotations, and process documents." | ||
| }, | ||
| { | ||
| "name": "document_signer", | ||
| "description": "Digitally sign PDF files with CMS or CAdES signatures." | ||
| }, | ||
| { | ||
| "name": "ai_redactor", | ||
| "description": "Detect and permanently redact sensitive content such as names, addresses, SSNs, and emails." | ||
| }, | ||
| { | ||
| "name": "check_credits", | ||
| "description": "Check the current Nutrient DWS credit balance and usage." | ||
| }, | ||
| { | ||
| "name": "sandbox_file_tree", | ||
| "description": "Browse files available in the configured sandbox directory." | ||
| } | ||
| ], | ||
| "compatibility": { | ||
| "claude_desktop": ">=0.10.0", | ||
| "runtimes": { | ||
| "node": ">=18.0.0" | ||
| } | ||
| }, | ||
| "user_config": { | ||
| "sandbox_path": { | ||
| "type": "directory", | ||
| "title": "Sandbox Directory", | ||
| "description": "Directory the extension can read from and write to for document processing.", | ||
| "required": true | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious does all of these work out of the box or is Claude (where I assume you tested it) doing it's magic and iterating through multiple failed tries? IMHO, we should audit the AI agent's thinking output and make sure it's not doing hoops (like trying different approaches, failing, fixing it's error and iterating all over again until it works) at least for these showcase examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of those work pretty well. Claude (medium effort) tends to add an extra balance check before every request, even when you don’t ask it to, but otherwise it has never failed to call the right tool - everything works on the first try.
While testing, I used less explicit requests (like “hows my pdf thingy doing” or “convert that big word doc into pdf”), and it still correctly used the appropriate DWS tools (even when I didn’t mention MCP, Nutrient, or DWS)