From 89234f947ce96d8eef11a4cf38d89401c4b8d4d9 Mon Sep 17 00:00:00 2001 From: Sudarshan Date: Fri, 10 Jul 2026 16:24:40 -0700 Subject: [PATCH 1/2] Add Unstructured Transform MCP template --- apps/docs/content/docs/en/agents/mcp.mdx | 15 ++++- .../mcp-server-form-modal.tsx | 60 ++++++++++++++++++- .../mcp-server-templates.ts | 30 ++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-templates.ts diff --git a/apps/docs/content/docs/en/agents/mcp.mdx b/apps/docs/content/docs/en/agents/mcp.mdx index 2f1d2a5a508..efee53360e5 100644 --- a/apps/docs/content/docs/en/agents/mcp.mdx +++ b/apps/docs/content/docs/en/agents/mcp.mdx @@ -72,6 +72,19 @@ Authorization: Bearer {{MCP_API_TOKEN}} When you type `{{` in the URL or header fields, a dropdown appears showing available workspace environment variables. +### Starter Configurations + +The add modal includes starter templates for common MCP servers. + +For [Unstructured Transform](https://docs.unstructured.io/transform/quickstart), first add a workspace environment variable named `UNSTRUCTURED_API_KEY`, then choose the Unstructured Transform template. It pre-fills: + +``` +URL: https://mcp.transform.unstructured.io +Authorization: Bearer {{UNSTRUCTURED_API_KEY}} +``` + +If your self-hosted deployment sets `ALLOWED_MCP_DOMAINS`, include `mcp.transform.unstructured.io` before saving the server. + ### Testing and Validation Click **Test Connection** before saving to verify the server is reachable and discover available tools. The test response shows the number of tools found and the protocol version. @@ -169,4 +182,4 @@ import { FAQ } from '@/components/ui/faq' { question: "How do I update MCP tool schemas after a server changes its available tools?", answer: "Click the Refresh button on the MCP server in your workspace settings. This fetches the latest tool schemas from the server and automatically updates any agent blocks that use those tools with the new parameter definitions." }, { question: "Can permission groups restrict access to MCP tools?", answer: "Yes. On Enterprise-entitled workspaces, any workspace admin can create a permission group that disables MCP tools for its members using the disableMcpTools option. When this is enabled, affected users will not be able to add or use MCP tools in workflows that belong to that workspace." }, { question: "What happens if an MCP server goes offline during workflow execution?", answer: "If the MCP server is unreachable during execution, the tool call will fail and return an error. In an Agent block, the AI may attempt to handle the failure gracefully. In a standalone MCP Tool block, the workflow step will fail. Check MCP server logs and verify the server is running and accessible to troubleshoot connectivity issues." }, -]} /> \ No newline at end of file +]} /> diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx index fe6d59e0967..18bbbad1eae 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx @@ -16,7 +16,7 @@ import { } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' -import { ChevronDown, ChevronRight } from 'lucide-react' +import { ChevronDown, ChevronRight, Plus } from 'lucide-react' import type { McpAuthType, McpTransport } from '@/lib/mcp/types' import { checkEnvVarTrigger, @@ -24,6 +24,11 @@ import { } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { useMcpServerTest } from '@/hooks/queries/mcp' +import { + buildHeadersFromTemplate, + MCP_SERVER_TEMPLATES, + type McpServerTemplate, +} from './mcp-server-templates' const logger = createLogger('McpServerFormModal') @@ -300,6 +305,41 @@ function updateHeadersArray( return updated.filter((h, i) => i === lastIndex || h.key !== '' || h.value !== '') } +interface TemplatePickerProps { + onSelect: (template: McpServerTemplate) => void +} + +function TemplatePicker({ onSelect }: TemplatePickerProps) { + if (MCP_SERVER_TEMPLATES.length === 0) return null + + return ( + +
+ {MCP_SERVER_TEMPLATES.map((template) => ( + + ))} +
+
+ ) +} + export function McpServerFormModal({ open, onOpenChange, @@ -415,6 +455,23 @@ export function McpServerFormModal({ resetEnvVarState() } + const handleTemplateSelect = (template: McpServerTemplate) => { + if (testResult) clearTestResult() + if (submitError) setSubmitError(null) + resetEnvVarState() + setFormMode('form') + setFormData((prev) => ({ + ...prev, + name: template.name, + transport: template.transport, + url: template.url, + timeout: template.timeout, + headers: buildHeadersFromTemplate(template), + })) + setUrlScrollLeft(0) + setHeaderScrollLeft({}) + } + const handleHeaderScroll = (key: string, sl: number) => { setHeaderScrollLeft((prev) => ({ ...prev, [key]: sl })) } @@ -668,6 +725,7 @@ export function McpServerFormModal({ /> ) : ( <> + {mode === 'add' && } ({ ...header })), { key: '', value: '' }] +} From b9e441d27fcc1f74d5bb5057d8a226f9fdcc7920 Mon Sep 17 00:00:00 2001 From: Sudarshan Date: Fri, 10 Jul 2026 16:28:49 -0700 Subject: [PATCH 2/2] Clarify Unstructured Transform MCP template --- apps/docs/content/docs/en/agents/mcp.mdx | 2 +- .../components/mcp-server-form-modal/mcp-server-templates.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/docs/en/agents/mcp.mdx b/apps/docs/content/docs/en/agents/mcp.mdx index efee53360e5..c307be35643 100644 --- a/apps/docs/content/docs/en/agents/mcp.mdx +++ b/apps/docs/content/docs/en/agents/mcp.mdx @@ -76,7 +76,7 @@ When you type `{{` in the URL or header fields, a dropdown appears showing avail The add modal includes starter templates for common MCP servers. -For [Unstructured Transform](https://docs.unstructured.io/transform/quickstart), first add a workspace environment variable named `UNSTRUCTURED_API_KEY`, then choose the Unstructured Transform template. It pre-fills: +For [Unstructured Transform](https://docs.unstructured.io/transform/quickstart), first add a workspace environment variable named `UNSTRUCTURED_API_KEY`, then choose the Unstructured Transform template. Unstructured Transform converts documents (PDF, DOCX, PPTX, HTML, and images, including scanned or image-only pages via OCR) into clean markdown, JSON, HTML, or text. It also supports RAG preprocessing with chunking, enrichment, and embedding. The template pre-fills: ``` URL: https://mcp.transform.unstructured.io diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-templates.ts b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-templates.ts index 58297bc1c3e..df016ff6e5d 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-templates.ts +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-templates.ts @@ -17,7 +17,8 @@ export const MCP_SERVER_TEMPLATES = [ { id: 'unstructured-transform', name: 'Unstructured Transform', - description: 'Process PDFs, images, Office files, and other documents through Transform.', + description: + 'Convert PDFs, DOCX, PPTX, HTML, and images into clean markdown, JSON, HTML, or text with OCR and RAG preprocessing.', transport: 'streamable-http', url: 'https://mcp.transform.unstructured.io', headers: [{ key: 'Authorization', value: 'Bearer {{UNSTRUCTURED_API_KEY}}' }],