Skip to main content

langchain-unstructured-transform

LangChain tools for the Unstructured Transform MCP server. Load the hosted Transform tools as native LangChain tools and hand them to any LangChain or LangGraph agent to parse, enrich, chunk, and embed files (PDF, DOCX, images, and 70+ file types) for RAG and AI pipelines.

This package is a thin, opinionated wrapper around langchain-mcp-adapters: it fixes the Transform MCP server URL and bearer-token authentication so you don't have to configure the client by hand.

Installation

pip install -U langchain-unstructured-transform

Requirements

Set your key as an environment variable (recommended):

export UNSTRUCTURED_API_KEY="<your-unstructured-api-key>"

Quickstart

import asyncio

from langchain.agents import create_agent
from langchain_unstructured_transform import aget_transform_tools


async def main() -> None:
    tools = await aget_transform_tools()  # reads UNSTRUCTURED_API_KEY
    agent = create_agent("claude-sonnet-4-6", tools)

    response = await agent.ainvoke(
        {
            "messages": [
                {
                    "role": "user",
                    "content": (
                        "Use the Unstructured Transform tools to parse ./report.pdf. "
                        "Provide the results as JSON."
                    ),
                }
            ]
        }
    )
    print(response["messages"][-1].content)


if __name__ == "__main__":
    asyncio.run(main())

Toolkit

from langchain_unstructured_transform import UnstructuredTransformToolkit

toolkit = UnstructuredTransformToolkit(api_key="...")  # or rely on the env var
tools = await toolkit.aget_tools()

Synchronous usage

For scripts and notebooks that are not already inside an event loop:

from langchain_unstructured_transform import get_transform_tools

tools = get_transform_tools()

Tools

The Transform MCP server exposes the following tools, which drive the full parsing lifecycle:

  • request_file_upload_url — get a URL to upload a source file.
  • transform_files — start a transform job for uploaded files.
  • check_transform_status — poll a running job.
  • get_transform_results — fetch the partitioned/enriched/chunked/embedded output.

Limits

  • Each file must be a supported file type.
  • Each file must be 50 MB or less.
  • Each request may contain 10 files or fewer.
  • Only 5 requests can run at a time.

License

MIT

Metadata

Release files for langchain-unstructured-transform 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-unstructured-transform 0.1.0
File Size Uploaded
langchain_unstructured_transform-0.1.0.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-unstructured-transform 0.1.0
File Interpreter ABI Platform
langchain_unstructured_transform-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / langchain_unstructured_transform-0.1.0.tar.gz

Download URL langchain_unstructured_transform-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d8ba8f744027376a36a483e7581134ef9cff521b6a9e2569c77d194b9e94c59c
BLAKE2b-256 checksum
How to use checksums
bb5c271bfd2250fdf1e2d3413788210a17dfc2c6d8fdc6b98b9180e531eb3739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / langchain_unstructured_transform-0.1.0-py3-none-any.whl

Download URL langchain_unstructured_transform-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48921ccb5fcee921f1ae811a3a12404d90186f769862be78fe504dc62f00b7a4
BLAKE2b-256 checksum
How to use checksums
7a678949ce38e3ec5227430460064d1cde19be14e8e3ac8b31a2ff14864ebf29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page