Skip to content

Add Unstructured Transform MCP integration example - #717

Open
jasonuhl wants to merge 1 commit into
lastmile-ai:mainfrom
jasonuhl:feature/unstructured-transform-mcp
Open

Add Unstructured Transform MCP integration example#717
jasonuhl wants to merge 1 commit into
lastmile-ai:mainfrom
jasonuhl:feature/unstructured-transform-mcp

Conversation

@jasonuhl

@jasonuhl jasonuhl commented Jul 10, 2026

Copy link
Copy Markdown

This adds an example document-parsing agent under examples/mcp/mcp_unstructured_transform/ that connects to Unstructured's hosted Transform MCP server and turns files (PDF, DOCX, PPTX, XLSX, HTML, EML, images, and 60+ file types) into clean markdown.

Files

  • main.py — document_parser agent that drives transform_files → check_transform_status → get_transform_results
  • mcp_agent.config.yaml — OAuth-authenticated unstructured_transform server
  • mcp_agent.secrets.yaml.example — LLM provider key only (no Unstructured credential)
  • README.md, requirements.txt
  • gallery.md — new entry

Testing

  • ruff check and ruff format --check pass on the example.
  • Smoke-tested the full auth + tool path against the live server (Python 3.10, via uv run): browser OAuth succeeds, the authenticated connection comes up, and transform_files → check_transform_status → get_transform_results returns correct Markdown. No src/ changes, so the library test suite is unaffected.

Checklist

  • feature/-prefixed branch
  • Lint + format pass
  • Adds an example
  • Unit tests — n/a (example-only; validated end to end per repo convention)

Summary by CodeRabbit

  • New Features
    • Added an example agent that converts publicly accessible documents into clean Markdown using Unstructured’s hosted Transform service.
    • Supports parsing both public URLs and local files through guided upload and transformation workflows.
    • Added browser-based sign-in with cached authentication for subsequent runs.
  • Documentation
    • Added setup, configuration, usage, and troubleshooting guidance.
    • Added the example to the MCP integration gallery.

A document-parsing agent under examples/mcp/mcp_unstructured_transform/
that connects to Unstructured's hosted Transform MCP server and turns
files (PDF, DOCX, PPTX, XLSX, HTML, EML, images, and 60+ file types) into
clean markdown.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b26a1b2a-972e-47f0-a02a-f5851d962d48

📥 Commits

Reviewing files that changed from the base of the PR and between f62d849 and 64b0f80.

📒 Files selected for processing (6)
  • examples/mcp/mcp_unstructured_transform/README.md
  • examples/mcp/mcp_unstructured_transform/main.py
  • examples/mcp/mcp_unstructured_transform/mcp_agent.config.yaml
  • examples/mcp/mcp_unstructured_transform/mcp_agent.secrets.yaml.example
  • examples/mcp/mcp_unstructured_transform/requirements.txt
  • gallery.md

📝 Walkthrough

Walkthrough

Adds a runnable MCP example that connects to Unstructured’s hosted Transform server, authenticates through browser OAuth, converts a public document URL to Markdown, documents local setup, and registers the example in the MCP gallery.

Changes

Unstructured Transform MCP example

Layer / File(s) Summary
Configure OAuth server and providers
examples/mcp/mcp_unstructured_transform/mcp_agent.config.yaml, examples/mcp/mcp_unstructured_transform/mcp_agent.secrets.yaml.example, examples/mcp/mcp_unstructured_transform/requirements.txt
Defines the Transform MCP server, OAuth flow, logging, default LLM models, example secrets, and dependencies.
Implement document transformation
examples/mcp/mcp_unstructured_transform/main.py
Creates the MCP application, connects an agent to Unstructured Transform, invokes the LLM to generate Markdown, and adds a script entrypoint.
Document and expose the example
examples/mcp/mcp_unstructured_transform/README.md, gallery.md
Documents setup, authentication, tool usage, public and local file handling, and adds the example to the MCP integration gallery.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MCPApp
  participant Agent
  participant UnstructuredTransform
  participant OpenAIAugmentedLLM
  MCPApp->>Agent: connect with unstructured_transform
  Agent->>UnstructuredTransform: list available tools
  Agent->>OpenAIAugmentedLLM: attach LLM
  OpenAIAugmentedLLM->>UnstructuredTransform: transform document URL to Markdown
  UnstructuredTransform-->>OpenAIAugmentedLLM: parsed Markdown result
  OpenAIAugmentedLLM-->>MCPApp: return generated Markdown
Loading

Suggested reviewers: saqadri

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the added Unstructured Transform MCP example and matches the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jasonuhl
jasonuhl marked this pull request as ready for review July 10, 2026 00:05
@jasonuhl

Copy link
Copy Markdown
Author

Hi maintainers! I'd love to get this reviewed and hopefully merged if you have the time.

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.

1 participant