Add starter/unstructured-transform-ai-sdk - #1541
Conversation
A Next.js chat app that connects the AI SDK to Unstructured's Transform MCP server: paste a public document URL and the model parses it (PDF, DOCX, XLSX, images, and 70+ formats) into clean Markdown via MCP tool calls. Includes a one-click Deploy button, .env.example, MIT license, and a keyless "preview mode" so a demo deploy renders the UI instead of erroring without keys. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@mikedownesdev is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
|
||
| // The download_url from get_transform_results is served from the Transform host. | ||
| // Restrict downloads to that host so a crafted prompt cannot turn this tool into | ||
| // an SSRF vector (e.g. fetching internal/metadata URLs from the serverless function). |
The Transform server renamed its tools (transform_files -> start_transform_job, check_transform_status -> check_job_status, get_transform_results -> get_job_results). The system prompt hardcoded the old names. Rewrote the prompt to describe the workflow by intent and name only the app's own wait/downloadText tools, so the model uses whatever tools the server exposes — resilient to future renames. Verified end-to-end against the live server: the model drives start_transform_job -> check_job_status -> get_job_results -> downloadText and returns the parsed summary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for flagging this. I checked it against the live server and the premise doesn't hold for this MCP server, so the allowlist is working as intended. The concern assumes the pre-signed The full agent flow also completes — the model downloads and summarizes the parsed Markdown. The host restriction is deliberate SSRF hardening (so a crafted prompt can't turn |
Adds
starter/unstructured-transform-ai-sdk— a Next.js chat app that connects the AI SDK to Unstructured's Transform MCP server.Paste a public document URL and the model parses it (PDF, DOCX, XLSX, images, and 70+ formats) into clean Markdown via MCP tool calls — no parsing code of your own. The model drives the full async job lifecycle: start the transform, pace status polling with a
waithelper, fetch results, and download the parsed Markdown.Included
.env.exampleand setup instructions.LICENSE.Environment variables
ANTHROPIC_API_KEY— the chat model (Claude).UNSTRUCTURED_API_KEY— authenticates the Transform MCP server (get one).Notes / verified
npm install,tsc --noEmit, andnext buildall pass.https://mcp.transform.unstructured.io).downloadTexttool is restricted to the Transform host over HTTPS to avoid SSRF from the serverless function.