Skip to content

Commit 730ddf5

Browse files
ui improvements for deploy mcp (#2718)
1 parent ef4bec2 commit 730ddf5

File tree

6 files changed

+50
-21
lines changed

6 files changed

+50
-21
lines changed

apps/docs/content/docs/en/mcp/deploy-workflows.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MCP servers group your workflow tools together. Create and manage them in worksp
1616
<Video src="mcp/mcp-server.mp4" width={700} height={450} />
1717
</div>
1818

19-
1. Navigate to **Settings → MCP Servers**
19+
1. Navigate to **Settings → Deployed MCPs**
2020
2. Click **Create Server**
2121
3. Enter a name and optional description
2222
4. Copy the server URL for use in your MCP clients
@@ -78,7 +78,7 @@ Include your API key header (`X-API-Key`) for authenticated access when using mc
7878

7979
## Server Management
8080

81-
From the server detail view in **Settings → MCP Servers**, you can:
81+
From the server detail view in **Settings → Deployed MCPs**, you can:
8282

8383
- **View tools**: See all workflows added to a server
8484
- **Copy URL**: Get the server URL for MCP clients

apps/docs/content/docs/en/mcp/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ MCP servers provide collections of tools that your agents can use. Configure the
2727
</div>
2828

2929
1. Navigate to your workspace settings
30-
2. Go to the **MCP Servers** section
30+
2. Go to the **Deployed MCPs** section
3131
3. Click **Add MCP Server**
3232
4. Enter the server configuration details
3333
5. Save the configuration

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
44
import { createLogger } from '@sim/logger'
55
import { useParams } from 'next/navigation'
6-
import { Badge, Combobox, type ComboboxOption, Input, Label, Textarea } from '@/components/emcn'
6+
import {
7+
Badge,
8+
Button,
9+
Combobox,
10+
type ComboboxOption,
11+
Input,
12+
Label,
13+
Textarea,
14+
} from '@/components/emcn'
715
import { Skeleton } from '@/components/ui'
816
import { generateToolInputSchema, sanitizeToolName } from '@/lib/mcp/workflow-tool-schema'
917
import { normalizeInputFormatValue } from '@/lib/workflows/input-format-utils'
@@ -35,6 +43,7 @@ interface McpDeployProps {
3543
onAddedToServer?: () => void
3644
onSubmittingChange?: (submitting: boolean) => void
3745
onCanSaveChange?: (canSave: boolean) => void
46+
onHasServersChange?: (hasServers: boolean) => void
3847
}
3948

4049
/**
@@ -83,6 +92,7 @@ export function McpDeploy({
8392
onAddedToServer,
8493
onSubmittingChange,
8594
onCanSaveChange,
95+
onHasServersChange,
8696
}: McpDeployProps) {
8797
const params = useParams()
8898
const workspaceId = params.workspaceId as string
@@ -247,6 +257,10 @@ export function McpDeploy({
247257
onCanSaveChange?.(hasChanges && hasDeployedTools && !!toolName.trim())
248258
}, [hasChanges, hasDeployedTools, toolName, onCanSaveChange])
249259

260+
useEffect(() => {
261+
onHasServersChange?.(servers.length > 0)
262+
}, [servers.length, onHasServersChange])
263+
250264
/**
251265
* Save tool configuration to all deployed servers
252266
*/
@@ -428,14 +442,16 @@ export function McpDeploy({
428442

429443
if (servers.length === 0) {
430444
return (
431-
<div className='flex h-full items-center justify-center text-[13px] text-[var(--text-muted)]'>
432-
<button
433-
type='button'
445+
<div className='flex h-full flex-col items-center justify-center gap-3'>
446+
<p className='text-[13px] text-[var(--text-muted)]'>
447+
Create an MCP Server in Settings → Deployed MCPs first.
448+
</p>
449+
<Button
450+
variant='tertiary'
434451
onClick={() => openSettingsModal({ section: 'workflow-mcp-servers' })}
435-
className='transition-colors hover:text-[var(--text-secondary)]'
436452
>
437-
Create an MCP Server in Settings → MCP Servers first.
438-
</button>
453+
Create MCP Server
454+
</Button>
439455
</div>
440456
)
441457
}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getEnv } from '@/lib/core/config/env'
1919
import { getInputFormatExample as getInputFormatExampleUtil } from '@/lib/workflows/operations/deployment-utils'
2020
import type { WorkflowDeploymentVersionResponse } from '@/lib/workflows/persistence/utils'
2121
import { startsWithUuid } from '@/executor/constants'
22+
import { useSettingsModalStore } from '@/stores/settings-modal/store'
2223
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
2324
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
2425
import type { WorkflowState } from '@/stores/workflows/workflow/types'
@@ -62,6 +63,7 @@ export function DeployModal({
6263
isLoadingDeployedState,
6364
refetchDeployedState,
6465
}: DeployModalProps) {
66+
const openSettingsModal = useSettingsModalStore((state) => state.openModal)
6567
const deploymentStatus = useWorkflowRegistry((state) =>
6668
state.getWorkflowDeploymentStatus(workflowId)
6769
)
@@ -89,6 +91,7 @@ export function DeployModal({
8991
const [templateSubmitting, setTemplateSubmitting] = useState(false)
9092
const [mcpToolSubmitting, setMcpToolSubmitting] = useState(false)
9193
const [mcpToolCanSave, setMcpToolCanSave] = useState(false)
94+
const [hasMcpServers, setHasMcpServers] = useState(false)
9295
const [hasExistingTemplate, setHasExistingTemplate] = useState(false)
9396
const [templateStatus, setTemplateStatus] = useState<{
9497
status: 'pending' | 'approved' | 'rejected' | null
@@ -627,6 +630,7 @@ export function DeployModal({
627630
isDeployed={isDeployed}
628631
onSubmittingChange={setMcpToolSubmitting}
629632
onCanSaveChange={setMcpToolCanSave}
633+
onHasServersChange={setHasMcpServers}
630634
/>
631635
)}
632636
</ModalTabsContent>
@@ -674,16 +678,25 @@ export function DeployModal({
674678
</div>
675679
</ModalFooter>
676680
)}
677-
{activeTab === 'mcp' && isDeployed && (
681+
{activeTab === 'mcp' && isDeployed && hasMcpServers && (
678682
<ModalFooter className='items-center'>
679-
<Button
680-
type='button'
681-
variant='tertiary'
682-
onClick={handleMcpToolFormSubmit}
683-
disabled={mcpToolSubmitting || !mcpToolCanSave}
684-
>
685-
{mcpToolSubmitting ? 'Saving...' : 'Save Tool Schema'}
686-
</Button>
683+
<div className='flex gap-2'>
684+
<Button
685+
type='button'
686+
variant='default'
687+
onClick={() => openSettingsModal({ section: 'workflow-mcp-servers' })}
688+
>
689+
Manage
690+
</Button>
691+
<Button
692+
type='button'
693+
variant='tertiary'
694+
onClick={handleMcpToolFormSubmit}
695+
disabled={mcpToolSubmitting || !mcpToolCanSave}
696+
>
697+
{mcpToolSubmitting ? 'Saving...' : 'Save Tool Schema'}
698+
</Button>
699+
</div>
687700
</ModalFooter>
688701
)}
689702
{activeTab === 'template' && (

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/general/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export function General({ onOpenChange }: GeneralProps) {
480480
</div>
481481

482482
<div className='flex items-center justify-between'>
483-
<Label htmlFor='auto-connect'>Auto-connect on drop</Label>
483+
<Label htmlFor='auto-connect'>Auto-connect on drag</Label>
484484
<Switch
485485
id='auto-connect'
486486
checked={settings?.autoConnect ?? true}

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/settings-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const allNavigationItems: NavigationItem[] = [
118118
{ id: 'mcp', label: 'MCP Tools', icon: McpIcon, section: 'tools' },
119119
{ id: 'environment', label: 'Environment', icon: FolderCode, section: 'system' },
120120
{ id: 'apikeys', label: 'API Keys', icon: Key, section: 'system' },
121-
{ id: 'workflow-mcp-servers', label: 'MCP Servers', icon: Server, section: 'system' },
121+
{ id: 'workflow-mcp-servers', label: 'Deployed MCPs', icon: Server, section: 'system' },
122122
{
123123
id: 'byok',
124124
label: 'BYOK',

0 commit comments

Comments
 (0)