Skip to content

Add Unstructured Transform MCP integration - #540

Open
dizon-u10d wants to merge 6 commits into
deepset-ai:mainfrom
dizon-u10d:add-transform-mcp-integration
Open

Add Unstructured Transform MCP integration#540
dizon-u10d wants to merge 6 commits into
deepset-ai:mainfrom
dizon-u10d:add-transform-mcp-integration

Conversation

@dizon-u10d

@dizon-u10d dizon-u10d commented Jul 10, 2026

Copy link
Copy Markdown

Adds an integration catalog page for Unstructured Transform MCP, a hosted MCP server exposing Unstructured's document-processing pipeline (partition, enrich, chunk, embed) as MCP tools.

  • New: integrations/transform-mcp.md (type: Tool Integration)
  • Connects via the existing mcp-haystack MCPToolset over Streamable HTTP using StreamableHttpServerInfo's native token parameter; documents the mcp-remote OAuth fallback.
  • Reuses the existing /logos/unstructured.svg asset.

Docs: https://docs.unstructured.io/transform/overview · Get started: https://transform.unstructured.io/get-started

Companion cookbook PR: deepset-ai/haystack-cookbook#300

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@dizon-u10d is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@dizon-u10d

Copy link
Copy Markdown
Author

Hi @kacperlukawski, following up on this listing for Unstructured Transform MCP (uses the existing mcp-haystack integration, same as integrations/mcp.md).

Verified against the live server: StreamableHttpServerInfo/MCPToolset correctly reaches https://mcp.transform.unstructured.io, and the server returns a clean 401 invalid_token with a spec-compliant OAuth-discovery challenge. One thing worth flagging: with eager_connect=True, an invalid/expired key doesn't surface that 401 right away, it hangs for mcp-haystack's ~30s connection timeout and then raises a generic MCPConnectionError, since the underlying mcp 1.28.1 SDK's streamable-http transport doesn't propagate the HTTP error out of its TaskGroup until the timeout fires. Not a defect in this doc, just something a user hitting a bad key would notice.

The only failing check here is the Vercel preview needing fork authorization. Happy to make any changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new integration catalog page documenting how to use mcp-haystack to connect Haystack agents to Unstructured’s hosted Transform MCP server for document processing.

Changes:

  • Added a new integration page for Unstructured Transform MCP (overview, install, auth, usage, and agent example).
  • Documented Streamable HTTP connection via StreamableHttpServerInfo(token=...) and an mcp-remote bridging fallback.
  • Included licensing/terms notes for both the mcp-haystack client and the hosted Unstructured service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread integrations/transform-mcp.md
…transform_job, check_transform_status -> check_job_status, get_transform_results -> get_job_results)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dizon-u10d

Copy link
Copy Markdown
Author

Updated for the recent Transform MCP tool rename: transform_filesstart_transform_job, check_transform_statuscheck_job_status, get_transform_resultsget_job_results. Ready for another look whenever you get a chance.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@kacperlukawski kacperlukawski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @dizon-u10d I have some questions about that integration. I like the idea, but want to make sure the example is easy to follow. Would love to hear your thoughts about my concerns.

Comment thread integrations/transform-mcp.md Outdated
Comment thread integrations/transform-mcp.md Outdated
…t between status polls

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dizon-u10d

Copy link
Copy Markdown
Author

Hi @kacperlukawski, thanks for the review, both good catches. Pushed a fix for each:

  • Dropped the mcp-remote fallback paragraph/snippet since it's not needed for this integration, the token-auth path already documented above is what actually works here.
  • Added an explicit "waiting a few seconds between calls" to the polling step in the agent's system prompt, so it doesn't hammer check_job_status in a tight loop.

Let me know if anything else stands out.

dizon-u10d and others added 2 commits August 10, 2026 10:51
…re ones

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…er tools live

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dizon-u10d

Copy link
Copy Markdown
Author

Another round of tool-surface changes shipped upstream this week (file manager tool added), so I went further than a rename this time: rewrote the docs, notebook, and system/agent prompts to describe the pipeline by behavior (submit → poll → fetch) rather than hardcoding exact tool names, and lean on the toolset-discovery pattern already shown here to find the real names at connect time. Should hold up through future renames/additions without needing another update like this.

@kacperlukawski
kacperlukawski self-requested a review August 13, 2026 12:29

@kacperlukawski kacperlukawski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @dizon-u10d I still have some concerns about too many poll operations. Did you try running the code samples? I don't think we can just ask model to sleep, but a simple tool should work.

Comment on lines +15 to +16
toc: true
---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toc: true
---
toc: true
mcp: true
---

We have an mcp property to distinguish MCP-based integrations from native ones.


Transform jobs are asynchronous. When asked to process a document:
1. Submit the file reference(s) and the requested processing stages to start a processing job. This returns a job ID immediately; the job itself runs in the background.
2. Check the job's status, waiting a few seconds between checks, until it reports as complete.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, asking the model to wait a few seconds is not going to work. Chat generators are not able to control their execution, but it should be solvable with a simple tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants