MCP Server for Unstructured Platform Workflows
Deploy and manage MCP server workflows to set up and interact with unstructured data processing in Unstructured Platform.
npx -y @Unstructured-IO/UNS-MCPOverview
The MCP (Model Context Protocol) server is a lightweight orchestration layer for running unstructured-data processing workflows on the Unstructured Platform. It provides a standard API to register and execute workflows composed of document ingestion, chunking, model calls, tool integrations, and enrichment steps. By centralizing workflow logic, the MCP server makes it easier to deploy reproducible processing pipelines and to integrate model-in-the-loop steps with external tools and storage.
This server is useful when you want a consistent runtime for document-centric pipelines—regardless of whether the components are local functions, remote API calls, or third-party tools. It exposes endpoints to manage workflow definitions, start executions, and observe progress or results. Developers can run the server locally for development or deploy it as a container in production.
Features
- REST API for registering, listing, and executing workflows
- Pluggable tool integrations (e.g., OCR, embedding, summarization, vector stores)
- Execution lifecycle management: start, status, cancel, result retrieval
- Configurable storage backends for intermediate artifacts
- Authentication support via API keys or tokens
- Docker-friendly: run locally or inside orchestration platforms
- Webhooks or polling options to receive completion events
- Lightweight and framework-agnostic so you can extend it with custom tools
Installation / Configuration
You can run the MCP server either from source (Python) or as a Docker container.
From source (recommended for development):
Using Docker:
# Build image (if building locally)
# Run container
Common environment variables
| Variable | Purpose | Default |
|---|---|---|
| MCP_HOST | Host interface to bind | 0.0.0.0 |
| MCP_PORT | HTTP port | 8080 |
| MCP_API_KEY | API key for requests | (none) |
| STORAGE_PATH | Path for intermediate artifacts | ./storage |
| LOG_LEVEL | Logging verbosity (DEBUG/INFO/WARN/ERROR) | INFO |
Configuration can also be provided via a YAML or JSON file if the server supports it—check the repo for examples/config templates.
Available Resources
Typical REST endpoints exposed by the server:
| Endpoint | Method | Purpose |
|---|---|---|
| /health | GET | Liveness/health check |
| /workflows | GET/POST | List or register workflow definitions |
| /workflows/{id} | GET/PUT/DELETE | Inspect or update a workflow |
| /execute | POST | Start a workflow execution |
| /executions/{id} | GET | Check execution status and results |
| /tools | GET | List available tool integrations |
| /metrics | GET | Runtime metrics (optional) |
CLI tooling (if included) may provide commands such as mcp register, mcp run, and mcp status.
Available tool types (examples)
- extractor (text, metadata)
- segmenter (chunk/split)
- model (LLM or classifier)
- embedding (vectorizer)
- storage (S3/local)
- retriever (vector similarity)
Use Cases
- Document ingestion + summarization
- Register a workflow that ingests PDFs, extracts text, chunks into passages, calls a summarization model, and stores summaries.
- Start executions via the API with a document URL and retrieve the final summary.
Example POST to start execution:
- Vector indexing pipeline
- A workflow that extracts text, creates embeddings, and pushes vectors to a vector store for semantic search. Useful for building retrieval-augmented systems.
- Human-in-the-loop validation
- Execute a workflow that produces candidate annotations and emits webhooks for manual review. After human approval, the server continues pipeline steps (e.g., publishing metadata).
- Multi-tool orchestration
- Chain OCR -> language model for extraction -> post-processing tool (regex normalizer) -> storage. The MCP server coordinates the tool sequence and preserves intermediate artifacts for debugging.
Example: Simple Python client
=
=
=
=
=
# poll status
=
=
break
Tips for Developers
- Start by running the server locally and exploring /tools and /workflows to understand built-in integrations.
- Use versioned workflow IDs so you can update pipelines without breaking existing executions.
- Store intermediate artifacts (for debugging) but configure retention policies for production.
- Implement retries and idempotency in custom tools to handle transient failures.
The MCP server is intended to be extended—add custom tool modules, hook in your storage backends, and integrate monitoring to fit your unstructured-data processing needs.