@mcp-use/inspector 20.0.0-beta.4 → 20.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -78
- package/dist/app/inspector.css.gz +0 -0
- package/dist/app/inspector.js.gz +0 -0
- package/dist/app/providers/anthropic.png +0 -0
- package/dist/app/providers/google.png +0 -0
- package/dist/app/providers/openai.png +0 -0
- package/dist/cli.js +74 -1398
- package/dist/client/index.d.ts +1402 -50
- package/dist/client/index.js +165 -24019
- package/dist/server/index.d.ts +79 -7
- package/dist/server/index.js +99 -23
- package/package.json +77 -35
- package/dist/cdn/AnimatePresence-Dcw-FOy8.js +0 -393
- package/dist/cdn/ChatTab-UQAPDRQG.js +0 -6744
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/ConnectionSettingsForm-DrY1p-NO.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-B1cRD7hz.js +0 -150
- package/dist/cdn/ElicitationTab-CL1KJ0bz.js +0 -654
- package/dist/cdn/FormContext-tmgN_Vdr.js +0 -135
- package/dist/cdn/InspectorContext-UjtEbNod.js +0 -123
- package/dist/cdn/JSONDisplay-BFxf5oEu.js +0 -324
- package/dist/cdn/ListTabHeader-Cv-GmtGF.js +0 -88
- package/dist/cdn/ManufactOAuthCallback-B98kSYCj.js +0 -31
- package/dist/cdn/MarkdownRenderer-BoDJE8tP.js +0 -3610
- package/dist/cdn/NotificationsTab-CeImSrhx.js +0 -290
- package/dist/cdn/OAuthCallback-C9AvCkOn.js +0 -58
- package/dist/cdn/PromptsTab-CkAWyWVb.js +0 -901
- package/dist/cdn/ResourcesTab-BtBKxd4c.js +0 -564
- package/dist/cdn/SamplingTab-Czp7Rmhz.js +0 -658
- package/dist/cdn/ServerMetadataTab-CvrKX8fz.js +0 -244
- package/dist/cdn/StatusIcon-D0-ARyOh.js +0 -66
- package/dist/cdn/ToolsTab-Dm4vCB8D.js +0 -2033
- package/dist/cdn/ViewPreview-CZvl_7x-.js +0 -238
- package/dist/cdn/WidgetDebugContext-D4usL_MA.js +0 -324
- package/dist/cdn/WidgetWrapper-DeiogRXV.js +0 -2210
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-CGjAO_0s.js +0 -10
- package/dist/cdn/browser-CbQIH4w2.js +0 -42
- package/dist/cdn/brush-B_mKhyxG.js +0 -17
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-By0FklhG.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-CmUbSx_B.js +0 -12
- package/dist/cdn/code-V_0nf5rg.js +0 -10
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/dialog-BsDpuJd3.js +0 -1028
- package/dist/cdn/dist-3QLh0dt8.js +0 -2306
- package/dist/cdn/dist-DaMB0Su9.js +0 -616
- package/dist/cdn/external-link-CjmfT6rW.js +0 -17
- package/dist/cdn/eye-B7H96av8.js +0 -29
- package/dist/cdn/folder-open-B3lu2rG_.js +0 -7
- package/dist/cdn/hash-BVQnWi7q.js +0 -33
- package/dist/cdn/history-Csw4rb44.js +0 -17
- package/dist/cdn/index-browser-CIoYSwCt.js +0 -1934
- package/dist/cdn/info-CNiOwqkf.js +0 -19
- package/dist/cdn/input-C2OBd4PJ.js +0 -12160
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/inspector.css +0 -2
- package/dist/cdn/inspector.js +0 -24523
- package/dist/cdn/jsx-runtime-CIxvMpEo.js +0 -180
- package/dist/cdn/label-B9Jmm9be.js +0 -60
- package/dist/cdn/loader-circle-BLy9A_pp.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-CH5Lq90B.js +0 -21
- package/dist/cdn/maximize-BALCV_ep.js +0 -21
- package/dist/cdn/message-square-BnxdpJxZ.js +0 -7
- package/dist/cdn/not-found-DEtSM_Wd.js +0 -34
- package/dist/cdn/play-vuZ5PLnI.js +0 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/providers/anthropic.png +0 -0
- package/dist/cdn/providers/google.png +0 -0
- package/dist/cdn/providers/openai.png +0 -0
- package/dist/cdn/react-0oJnFpBS.js +0 -5425
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/refresh-cw-BXY-Pa0U.js +0 -21
- package/dist/cdn/save-Tgil_AJZ.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-DDdiIPR2.js +0 -2594
- package/dist/cdn/servers-Dm72iTpY.js +0 -26
- package/dist/cdn/shared-DaILIQPP.js +0 -1700
- package/dist/cdn/sheet-Br_l2kry.js +0 -2077
- package/dist/cdn/sparkles-BntO2rDR.js +0 -23
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/cdn/square-check-big-BvwQ17Bl.js +0 -10
- package/dist/cdn/switch-C3IyQuid.js +0 -664
- package/dist/cdn/tabs-subtle-CkdI6Mac.js +0 -787
- package/dist/cdn/telemetry-BbhH1Z_E.js +0 -240
- package/dist/cdn/textarea-DSbwcFVt.js +0 -14
- package/dist/cdn/trash-2-RwpJY5SL.js +0 -25
- package/dist/cdn/useAriaLabelledBy-DqAdnppm.js +0 -29
- package/dist/cdn/useCompositeItem-BRqEzYh-.js +0 -26
- package/dist/cdn/useConfig-BNpU7Atw.js +0 -235
- package/dist/cdn/useSavedRequests-Ci2I919u.js +0 -51
- package/dist/cdn/useViewHostProps-ru80AnlT.js +0 -349
- package/dist/cdn/wrench-DzGmCfnb.js +0 -7
- package/dist/cdn/x-C3vRQIYu.js +0 -10
- package/dist/cdn/zap-Mb-pbw2X.js +0 -10
- package/dist/client/auth/manufact-auth.d.ts +0 -32
- package/dist/client/auth/manufact-auth.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryHeader.d.ts +0 -4
- package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryPanel.d.ts +0 -28
- package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryRail.d.ts +0 -5
- package/dist/client/chat-history/ChatHistoryRail.d.ts.map +0 -1
- package/dist/client/chat-history/ChatList.d.ts +0 -18
- package/dist/client/chat-history/ChatList.d.ts.map +0 -1
- package/dist/client/chat-history/ChatTitleReveal.d.ts +0 -10
- package/dist/client/chat-history/ChatTitleReveal.d.ts.map +0 -1
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +0 -13
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +0 -1
- package/dist/client/chat-history/chat-title.d.ts +0 -10
- package/dist/client/chat-history/chat-title.d.ts.map +0 -1
- package/dist/client/chat-history/providers/local-storage.d.ts +0 -21
- package/dist/client/chat-history/providers/local-storage.d.ts.map +0 -1
- package/dist/client/chat-history/types.d.ts +0 -39
- package/dist/client/chat-history/types.d.ts.map +0 -1
- package/dist/client/chat-history/useChatHistory.d.ts +0 -20
- package/dist/client/chat-history/useChatHistory.d.ts.map +0 -1
- package/dist/client/chat-history/useChatTitleGeneration.d.ts +0 -17
- package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +0 -1
- package/dist/client/components/AddToClientDropdown.d.ts +0 -52
- package/dist/client/components/AddToClientDropdown.d.ts.map +0 -1
- package/dist/client/components/ChatTab.d.ts +0 -98
- package/dist/client/components/ChatTab.d.ts.map +0 -1
- package/dist/client/components/IframeConsole.d.ts +0 -7
- package/dist/client/components/IframeConsole.d.ts.map +0 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts +0 -19
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +0 -1
- package/dist/client/components/PromptsTab.d.ts +0 -34
- package/dist/client/components/PromptsTab.d.ts.map +0 -1
- package/dist/client/components/ResourcesTab.d.ts +0 -31
- package/dist/client/components/ResourcesTab.d.ts.map +0 -1
- package/dist/client/components/ToolsTab.d.ts +0 -39
- package/dist/client/components/ToolsTab.d.ts.map +0 -1
- package/dist/client/components/chat/AssistantMessage.d.ts +0 -10
- package/dist/client/components/chat/AssistantMessage.d.ts.map +0 -1
- package/dist/client/components/chat/ChatHeader.d.ts +0 -70
- package/dist/client/components/chat/ChatHeader.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInput.d.ts +0 -29
- package/dist/client/components/chat/ChatInput.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +0 -65
- package/dist/client/components/chat/ChatInputArea.d.ts.map +0 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +0 -15
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +0 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +0 -10
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +0 -1
- package/dist/client/components/chat/ChatTraceView.d.ts +0 -7
- package/dist/client/components/chat/ChatTraceView.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts +0 -42
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +0 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +0 -1
- package/dist/client/components/chat/CopyButton.d.ts +0 -10
- package/dist/client/components/chat/CopyButton.d.ts.map +0 -1
- package/dist/client/components/chat/FloatingChatElicitation.d.ts +0 -10
- package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +0 -1
- package/dist/client/components/chat/McpReconnectBanner.d.ts +0 -10
- package/dist/client/components/chat/McpReconnectBanner.d.ts.map +0 -1
- package/dist/client/components/chat/MessageList.d.ts +0 -47
- package/dist/client/components/chat/MessageList.d.ts.map +0 -1
- package/dist/client/components/chat/MessageMetaActions.d.ts +0 -7
- package/dist/client/components/chat/MessageMetaActions.d.ts.map +0 -1
- package/dist/client/components/chat/PromptResultsList.d.ts +0 -8
- package/dist/client/components/chat/PromptResultsList.d.ts.map +0 -1
- package/dist/client/components/chat/PromptsDropdown.d.ts +0 -11
- package/dist/client/components/chat/PromptsDropdown.d.ts.map +0 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts +0 -7
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +0 -1
- package/dist/client/components/chat/SystemPromptButton.d.ts +0 -11
- package/dist/client/components/chat/SystemPromptButton.d.ts.map +0 -1
- package/dist/client/components/chat/ToolCallDisplay.d.ts +0 -10
- package/dist/client/components/chat/ToolCallDisplay.d.ts.map +0 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts +0 -15
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +0 -1
- package/dist/client/components/chat/ToolSelector.d.ts +0 -13
- package/dist/client/components/chat/ToolSelector.d.ts.map +0 -1
- package/dist/client/components/chat/UserMessage.d.ts +0 -10
- package/dist/client/components/chat/UserMessage.d.ts.map +0 -1
- package/dist/client/components/chat/chat-bar-styles.d.ts +0 -6
- package/dist/client/components/chat/chat-bar-styles.d.ts.map +0 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +0 -11
- package/dist/client/components/chat/chatModeStorage.d.ts.map +0 -1
- package/dist/client/components/chat/conversion.d.ts +0 -19
- package/dist/client/components/chat/conversion.d.ts.map +0 -1
- package/dist/client/components/chat/freeTier.d.ts +0 -32
- package/dist/client/components/chat/freeTier.d.ts.map +0 -1
- package/dist/client/components/chat/managedChatNotice.d.ts +0 -16
- package/dist/client/components/chat/managedChatNotice.d.ts.map +0 -1
- package/dist/client/components/chat/providerMeta.d.ts +0 -27
- package/dist/client/components/chat/providerMeta.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/local-storage.d.ts +0 -5
- package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/types.d.ts +0 -8
- package/dist/client/components/chat/system-prompt/types.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +0 -3
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt-default.d.ts +0 -2
- package/dist/client/components/chat/system-prompt-default.d.ts.map +0 -1
- package/dist/client/components/chat/trace.d.ts +0 -84
- package/dist/client/components/chat/trace.d.ts.map +0 -1
- package/dist/client/components/chat/types.d.ts +0 -75
- package/dist/client/components/chat/types.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessages.d.ts +0 -76
- package/dist/client/components/chat/useChatMessages.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +0 -43
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +0 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +0 -14
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +0 -1
- package/dist/client/components/chat/useConfig.d.ts +0 -24
- package/dist/client/components/chat/useConfig.d.ts.map +0 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +0 -14
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +0 -1
- package/dist/client/components/chat/useManagedCloudModel.d.ts +0 -14
- package/dist/client/components/chat/useManagedCloudModel.d.ts.map +0 -1
- package/dist/client/components/chat/utils.d.ts +0 -11
- package/dist/client/components/chat/utils.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +0 -12
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +0 -9
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts +0 -8
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts +0 -13
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts +0 -9
- package/dist/client/components/prompts/PromptInputForm.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptMessageCard.d.ts +0 -29
- package/dist/client/components/prompts/PromptMessageCard.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts +0 -34
- package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptsList.d.ts +0 -10
- package/dist/client/components/prompts/PromptsList.d.ts.map +0 -1
- package/dist/client/components/prompts/SavedPromptsList.d.ts +0 -19
- package/dist/client/components/prompts/SavedPromptsList.d.ts.map +0 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts +0 -16
- package/dist/client/components/resources/PropsConfigDialog.d.ts.map +0 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts +0 -30
- package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +0 -1
- package/dist/client/components/resources/ResourcesList.d.ts +0 -10
- package/dist/client/components/resources/ResourcesList.d.ts.map +0 -1
- package/dist/client/components/shared/CollapsibleJSON.d.ts +0 -6
- package/dist/client/components/shared/CollapsibleJSON.d.ts.map +0 -1
- package/dist/client/components/shared/InspectorScrollArea.d.ts +0 -9
- package/dist/client/components/shared/InspectorScrollArea.d.ts.map +0 -1
- package/dist/client/components/shared/JSONDisplay.d.ts +0 -12
- package/dist/client/components/shared/JSONDisplay.d.ts.map +0 -1
- package/dist/client/components/shared/ListItem.d.ts +0 -24
- package/dist/client/components/shared/ListItem.d.ts.map +0 -1
- package/dist/client/components/shared/ListTabHeader.d.ts +0 -47
- package/dist/client/components/shared/ListTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +0 -15
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +0 -1
- package/dist/client/components/shared/SchemaFormField.d.ts +0 -12
- package/dist/client/components/shared/SchemaFormField.d.ts.map +0 -1
- package/dist/client/components/shared/SearchTabHeader.d.ts +0 -28
- package/dist/client/components/shared/SearchTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/StatusIcon.d.ts +0 -12
- package/dist/client/components/shared/StatusIcon.d.ts.map +0 -1
- package/dist/client/components/shared/index.d.ts +0 -7
- package/dist/client/components/shared/index.d.ts.map +0 -1
- package/dist/client/components/tools/SaveRequestDialog.d.ts +0 -11
- package/dist/client/components/tools/SaveRequestDialog.d.ts.map +0 -1
- package/dist/client/components/tools/SavedRequestsList.d.ts +0 -19
- package/dist/client/components/tools/SavedRequestsList.d.ts.map +0 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts +0 -20
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/tools/ToolInputForm.d.ts +0 -14
- package/dist/client/components/tools/ToolInputForm.d.ts.map +0 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -24
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +0 -1
- package/dist/client/components/tools/ToolsList.d.ts +0 -10
- package/dist/client/components/tools/ToolsList.d.ts.map +0 -1
- package/dist/client/components/tools/schema-utils.d.ts +0 -13
- package/dist/client/components/tools/schema-utils.d.ts.map +0 -1
- package/dist/client/components/tools/useToolExecution.d.ts +0 -26
- package/dist/client/components/tools/useToolExecution.d.ts.map +0 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts +0 -35
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +0 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +0 -13
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +0 -1
- package/dist/client/components/ui/WidgetWrapper.d.ts +0 -12
- package/dist/client/components/ui/WidgetWrapper.d.ts.map +0 -1
- package/dist/client/components/ui/alert-dialog.d.ts +0 -15
- package/dist/client/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/client/components/ui/ask-user-questions.d.ts +0 -80
- package/dist/client/components/ui/ask-user-questions.d.ts.map +0 -1
- package/dist/client/components/ui/badge.d.ts +0 -34
- package/dist/client/components/ui/badge.d.ts.map +0 -1
- package/dist/client/components/ui/blur-fade.d.ts +0 -25
- package/dist/client/components/ui/blur-fade.d.ts.map +0 -1
- package/dist/client/components/ui/button.d.ts +0 -34
- package/dist/client/components/ui/button.d.ts.map +0 -1
- package/dist/client/components/ui/chat-message.d.ts +0 -23
- package/dist/client/components/ui/chat-message.d.ts.map +0 -1
- package/dist/client/components/ui/checkbox.d.ts +0 -4
- package/dist/client/components/ui/checkbox.d.ts.map +0 -1
- package/dist/client/components/ui/client-icons.d.ts +0 -20
- package/dist/client/components/ui/client-icons.d.ts.map +0 -1
- package/dist/client/components/ui/command.d.ts +0 -17
- package/dist/client/components/ui/command.d.ts.map +0 -1
- package/dist/client/components/ui/dialog.d.ts +0 -37
- package/dist/client/components/ui/dialog.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +0 -25
- package/dist/client/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown.d.ts +0 -30
- package/dist/client/components/ui/dropdown.d.ts.map +0 -1
- package/dist/client/components/ui/file-thumbnail.d.ts +0 -9
- package/dist/client/components/ui/file-thumbnail.d.ts.map +0 -1
- package/dist/client/components/ui/input.d.ts +0 -4
- package/dist/client/components/ui/input.d.ts.map +0 -1
- package/dist/client/components/ui/kbd.d.ts +0 -3
- package/dist/client/components/ui/kbd.d.ts.map +0 -1
- package/dist/client/components/ui/label.d.ts +0 -4
- package/dist/client/components/ui/label.d.ts.map +0 -1
- package/dist/client/components/ui/menu-item.d.ts +0 -52
- package/dist/client/components/ui/menu-item.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +0 -12
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +0 -1
- package/dist/client/components/ui/not-found.d.ts +0 -9
- package/dist/client/components/ui/not-found.d.ts.map +0 -1
- package/dist/client/components/ui/popover.d.ts +0 -6
- package/dist/client/components/ui/popover.d.ts.map +0 -1
- package/dist/client/components/ui/resizable.d.ts +0 -10
- package/dist/client/components/ui/resizable.d.ts.map +0 -1
- package/dist/client/components/ui/scroll-area.d.ts +0 -4
- package/dist/client/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/client/components/ui/select.d.ts +0 -52
- package/dist/client/components/ui/select.d.ts.map +0 -1
- package/dist/client/components/ui/sheet.d.ts +0 -14
- package/dist/client/components/ui/sheet.d.ts.map +0 -1
- package/dist/client/components/ui/skeleton.d.ts +0 -4
- package/dist/client/components/ui/skeleton.d.ts.map +0 -1
- package/dist/client/components/ui/spinner.d.ts +0 -3
- package/dist/client/components/ui/spinner.d.ts.map +0 -1
- package/dist/client/components/ui/switch.d.ts +0 -22
- package/dist/client/components/ui/switch.d.ts.map +0 -1
- package/dist/client/components/ui/table.d.ts +0 -9
- package/dist/client/components/ui/table.d.ts.map +0 -1
- package/dist/client/components/ui/tabs-subtle.d.ts +0 -25
- package/dist/client/components/ui/tabs-subtle.d.ts.map +0 -1
- package/dist/client/components/ui/text-shimmer.d.ts +0 -11
- package/dist/client/components/ui/text-shimmer.d.ts.map +0 -1
- package/dist/client/components/ui/textarea.d.ts +0 -4
- package/dist/client/components/ui/textarea.d.ts.map +0 -1
- package/dist/client/components/ui/tooltip.d.ts +0 -43
- package/dist/client/components/ui/tooltip.d.ts.map +0 -1
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts +0 -19
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts.map +0 -1
- package/dist/client/console-log-bus.d.ts +0 -24
- package/dist/client/console-log-bus.d.ts.map +0 -1
- package/dist/client/constants/debug-options.d.ts +0 -16
- package/dist/client/constants/debug-options.d.ts.map +0 -1
- package/dist/client/context/InspectorContext.d.ts +0 -134
- package/dist/client/context/InspectorContext.d.ts.map +0 -1
- package/dist/client/context/ThemeContext.d.ts +0 -17
- package/dist/client/context/ThemeContext.d.ts.map +0 -1
- package/dist/client/context/WidgetDebugContext.d.ts +0 -121
- package/dist/client/context/WidgetDebugContext.d.ts.map +0 -1
- package/dist/client/hooks/use-merge-split.d.ts +0 -36
- package/dist/client/hooks/use-merge-split.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover-index.d.ts +0 -27
- package/dist/client/hooks/use-proximity-hover-index.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover.d.ts +0 -26
- package/dist/client/hooks/use-proximity-hover.d.ts.map +0 -1
- package/dist/client/hooks/use-touch-primary.d.ts +0 -2
- package/dist/client/hooks/use-touch-primary.d.ts.map +0 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +0 -18
- package/dist/client/hooks/useDeviceViewport.d.ts.map +0 -1
- package/dist/client/hooks/useHostedSession.d.ts +0 -9
- package/dist/client/hooks/useHostedSession.d.ts.map +0 -1
- package/dist/client/hooks/useIframeConsole.d.ts +0 -24
- package/dist/client/hooks/useIframeConsole.d.ts.map +0 -1
- package/dist/client/hooks/useKeyboardShortcuts.d.ts +0 -28
- package/dist/client/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/client/hooks/useMCPPrompts.d.ts +0 -94
- package/dist/client/hooks/useMCPPrompts.d.ts.map +0 -1
- package/dist/client/hooks/useMcpAppsHostContext.d.ts +0 -27
- package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +0 -1
- package/dist/client/hooks/usePropsLLM.d.ts +0 -20
- package/dist/client/hooks/usePropsLLM.d.ts.map +0 -1
- package/dist/client/hooks/useResourceProps.d.ts +0 -14
- package/dist/client/hooks/useResourceProps.d.ts.map +0 -1
- package/dist/client/hooks/useSavedRequests.d.ts +0 -6
- package/dist/client/hooks/useSavedRequests.d.ts.map +0 -1
- package/dist/client/hooks/useViewHostProps.d.ts +0 -19
- package/dist/client/hooks/useViewHostProps.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/lib/elevated.d.ts +0 -28
- package/dist/client/lib/elevated.d.ts.map +0 -1
- package/dist/client/lib/font-weight.d.ts +0 -10
- package/dist/client/lib/font-weight.d.ts.map +0 -1
- package/dist/client/lib/icon-context.d.ts +0 -15
- package/dist/client/lib/icon-context.d.ts.map +0 -1
- package/dist/client/lib/shape-context.d.ts +0 -21
- package/dist/client/lib/shape-context.d.ts.map +0 -1
- package/dist/client/lib/springs.d.ts +0 -32
- package/dist/client/lib/springs.d.ts.map +0 -1
- package/dist/client/lib/surface-classes.d.ts +0 -2
- package/dist/client/lib/surface-classes.d.ts.map +0 -1
- package/dist/client/lib/surface-context.d.ts +0 -7
- package/dist/client/lib/surface-context.d.ts.map +0 -1
- package/dist/client/lib/utils.d.ts +0 -3
- package/dist/client/lib/utils.d.ts.map +0 -1
- package/dist/client/mcp-apps/csp.d.ts +0 -26
- package/dist/client/mcp-apps/csp.d.ts.map +0 -1
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +0 -17
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +0 -1
- package/dist/client/mcp-apps/logging-transport.d.ts +0 -13
- package/dist/client/mcp-apps/logging-transport.d.ts.map +0 -1
- package/dist/client/rpc-traffic-coalesce.d.ts +0 -7
- package/dist/client/rpc-traffic-coalesce.d.ts.map +0 -1
- package/dist/client/rpc-traffic-store.d.ts +0 -37
- package/dist/client/rpc-traffic-store.d.ts.map +0 -1
- package/dist/client/telemetry/capture.d.ts +0 -7
- package/dist/client/telemetry/capture.d.ts.map +0 -1
- package/dist/client/telemetry/events.d.ts +0 -168
- package/dist/client/telemetry/events.d.ts.map +0 -1
- package/dist/client/telemetry/index.d.ts +0 -5
- package/dist/client/telemetry/index.d.ts.map +0 -1
- package/dist/client/telemetry/init.d.ts +0 -2
- package/dist/client/telemetry/init.d.ts.map +0 -1
- package/dist/client/telemetry/utils.d.ts +0 -7
- package/dist/client/telemetry/utils.d.ts.map +0 -1
- package/dist/client/types/message-content-block.d.ts +0 -19
- package/dist/client/types/message-content-block.d.ts.map +0 -1
- package/dist/client/types/pending-requests.d.ts +0 -17
- package/dist/client/types/pending-requests.d.ts.map +0 -1
- package/dist/client/utils/basePath.d.ts +0 -34
- package/dist/client/utils/basePath.d.ts.map +0 -1
- package/dist/client/utils/browser.d.ts +0 -5
- package/dist/client/utils/browser.d.ts.map +0 -1
- package/dist/client/utils/format.d.ts +0 -4
- package/dist/client/utils/format.d.ts.map +0 -1
- package/dist/client/utils/highlightJson.d.ts +0 -11
- package/dist/client/utils/highlightJson.d.ts.map +0 -1
- package/dist/client/utils/jsonUtils.d.ts +0 -24
- package/dist/client/utils/jsonUtils.d.ts.map +0 -1
- package/dist/client/utils/mcpClientUtils.d.ts +0 -131
- package/dist/client/utils/mcpClientUtils.d.ts.map +0 -1
- package/dist/client/utils/servers.d.ts +0 -14
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/asset-urls.d.ts +0 -18
- package/dist/server/asset-urls.d.ts.map +0 -1
- package/dist/server/asset-urls.js +0 -17
- package/dist/server/cdn-shell.d.ts +0 -18
- package/dist/server/cdn-shell.d.ts.map +0 -1
- package/dist/server/cdn-shell.js +0 -12
- package/dist/server/chunk-5L3HMC5B.js +0 -72
- package/dist/server/chunk-BEJGHVKM.js +0 -148
- package/dist/server/chunk-H6ZCIKBS.js +0 -63
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-J4FNYLBF.js +0 -54
- package/dist/server/chunk-K2F2AJOI.js +0 -619
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-M5TZA42I.js +0 -54
- package/dist/server/chunk-OWR2BIBW.js +0 -40
- package/dist/server/chunk-PGN3B3MQ.js +0 -156
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-UJLXHNQP.js +0 -43
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/chunk-XCNS5CIW.js +0 -199
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -141
- package/dist/server/create-dev-api-app.d.ts +0 -4
- package/dist/server/create-dev-api-app.d.ts.map +0 -1
- package/dist/server/create-dev-api-app.js +0 -11
- package/dist/server/dev-callback-redirect.d.ts +0 -3
- package/dist/server/dev-callback-redirect.d.ts.map +0 -1
- package/dist/server/dev-callback-redirect.js +0 -18
- package/dist/server/favicon-links.d.ts +0 -12
- package/dist/server/favicon-links.d.ts.map +0 -1
- package/dist/server/favicon-links.js +0 -11
- package/dist/server/favicon-static.d.ts +0 -4
- package/dist/server/favicon-static.d.ts.map +0 -1
- package/dist/server/favicon-static.js +0 -8
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/middleware.d.ts +0 -40
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -17
- package/dist/server/proxy/index.d.ts +0 -3
- package/dist/server/proxy/index.d.ts.map +0 -1
- package/dist/server/proxy/index.js +0 -12
- package/dist/server/proxy/mcp-proxy.d.ts +0 -101
- package/dist/server/proxy/mcp-proxy.d.ts.map +0 -1
- package/dist/server/proxy/mcp-proxy.js +0 -10
- package/dist/server/proxy/oauth-proxy.d.ts +0 -26
- package/dist/server/proxy/oauth-proxy.d.ts.map +0 -1
- package/dist/server/proxy/oauth-proxy.js +0 -9
- package/dist/server/proxy-routes.d.ts +0 -16
- package/dist/server/proxy-routes.d.ts.map +0 -1
- package/dist/server/proxy-routes.js +0 -10
- package/dist/server/rpc-log-bus.d.ts +0 -17
- package/dist/server/rpc-log-bus.d.ts.map +0 -1
- package/dist/server/rpc-log-bus.js +0 -77
- package/dist/server/server.d.ts +0 -15
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -66
- package/dist/server/static-assets.d.ts +0 -5
- package/dist/server/static-assets.d.ts.map +0 -1
- package/dist/server/static-assets.js +0 -9
- package/dist/server/utils.d.ts +0 -33
- package/dist/server/utils.d.ts.map +0 -1
- package/dist/server/utils.js +0 -17
- package/dist/server/version.d.ts +0 -7
- package/dist/server/version.d.ts.map +0 -1
- package/dist/server/version.js +0 -9
- package/dist/server/vite-dev-api-plugin.d.ts +0 -4
- package/dist/server/vite-dev-api-plugin.d.ts.map +0 -1
- package/dist/server/vite-dev-api-plugin.js +0 -30
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-B_5S87J1.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-XwjwKfsO.js +0 -1
- package/dist/web/assets/ElicitationTab-BD1tfmYR.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/ManufactOAuthCallback-DD3qfIC3.js +0 -1
- package/dist/web/assets/MarkdownRenderer-DH-7vpw0.js +0 -47
- package/dist/web/assets/NotificationsTab-Cg48O6IH.js +0 -1
- package/dist/web/assets/OAuthCallback-4i2i3YpE.js +0 -1
- package/dist/web/assets/PromptsTab-pAR6izrQ.js +0 -15
- package/dist/web/assets/ResourcesTab-CgvfWrsU.js +0 -2
- package/dist/web/assets/SamplingTab-DfIWMQFY.js +0 -1
- package/dist/web/assets/ServerMetadataTab-Dsz8Qhyr.js +0 -1
- package/dist/web/assets/ToolsTab-ln9w58BW.js +0 -8
- package/dist/web/assets/ViewPreview-CQ3G3VP0.js +0 -1
- package/dist/web/assets/WidgetWrapper-A-zaxY5s.js +0 -34
- package/dist/web/assets/brush--0LobUi4.js +0 -1
- package/dist/web/assets/checkbox-DZWS_U_i.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/dist-DxRFPg-B.js +0 -21
- package/dist/web/assets/index-CoRK2C3M.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/label-Cdim77Jw.js +0 -1
- package/dist/web/assets/maximize-2-BTT9QQU9.js +0 -1
- package/dist/web/assets/maximize-_O55kFcr.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-C9wQl8_d.js +0 -1
- package/dist/web/assets/save-B-MsgxX9.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-Dbc2GbRx.js +0 -1
- package/dist/web/assets/sparkles-2OAsc1aP.js +0 -1
- package/dist/web/assets/tabs-subtle-CxMZqhP6.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useConfig-Cg-BtSHA.js +0 -1
- package/dist/web/assets/useViewHostProps-CMgPpdfy.js +0 -1
- package/dist/web/assets/zap-Du2Uc5pa.js +0 -1
- package/dist/web/favicon-96x96.png +0 -0
- package/dist/web/favicon-black.svg +0 -5
- package/dist/web/favicon-white.svg +0 -5
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +0 -5
- package/dist/web/index.html +0 -89
- package/dist/web/providers/anthropic.png +0 -0
- package/dist/web/providers/google.png +0 -0
- package/dist/web/providers/openai.png +0 -0
- package/dist/web/site.webmanifest +0 -21
- package/dist/web/web-app-manifest-192x192.png +0 -0
- package/dist/web/web-app-manifest-512x512.png +0 -0
- /package/dist/{cdn → app}/apple-touch-icon.png +0 -0
- /package/dist/{cdn → app}/favicon-96x96.png +0 -0
- /package/dist/{cdn → app}/favicon-black.svg +0 -0
- /package/dist/{cdn → app}/favicon-white.svg +0 -0
- /package/dist/{cdn → app}/favicon.ico +0 -0
- /package/dist/{cdn → app}/favicon.svg +0 -0
- /package/dist/{cdn → app}/site.webmanifest +0 -0
- /package/dist/{cdn → app}/web-app-manifest-192x192.png +0 -0
- /package/dist/{cdn → app}/web-app-manifest-512x512.png +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// src/server/static-assets.ts
|
|
2
|
-
import { existsSync, readFileSync } from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
var CONTENT_TYPES = {
|
|
6
|
-
".js": "application/javascript",
|
|
7
|
-
".css": "text/css",
|
|
8
|
-
".svg": "image/svg+xml",
|
|
9
|
-
".png": "image/png",
|
|
10
|
-
".ico": "image/x-icon",
|
|
11
|
-
".webmanifest": "application/manifest+json"
|
|
12
|
-
};
|
|
13
|
-
function resolveDistCdnDir() {
|
|
14
|
-
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
for (const dir of [
|
|
16
|
-
path.resolve(here, "cdn"),
|
|
17
|
-
// dist/cli.js (bundled)
|
|
18
|
-
path.resolve(here, "../cdn")
|
|
19
|
-
// dist/server/*.js
|
|
20
|
-
]) {
|
|
21
|
-
if (existsSync(path.join(dir, "inspector.js"))) {
|
|
22
|
-
return dir;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
throw new Error(
|
|
26
|
-
"Inspector bundle not found (expected dist/cdn/inspector.js)"
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
function registerInspectorStaticAssets(app, basePath = "") {
|
|
30
|
-
const cdnDir = resolveDistCdnDir();
|
|
31
|
-
const mountPath = `${basePath}/dist/cdn`;
|
|
32
|
-
app.get(`${mountPath}/*`, (c) => {
|
|
33
|
-
const subPath = c.req.path.slice(mountPath.length);
|
|
34
|
-
const relative = subPath.startsWith("/") ? subPath.slice(1) : subPath;
|
|
35
|
-
if (!relative || relative.includes("..")) {
|
|
36
|
-
return c.notFound();
|
|
37
|
-
}
|
|
38
|
-
const file = path.resolve(cdnDir, relative);
|
|
39
|
-
const root = cdnDir.endsWith(path.sep) ? cdnDir : `${cdnDir}${path.sep}`;
|
|
40
|
-
if (!file.startsWith(root) || !existsSync(file)) {
|
|
41
|
-
return c.notFound();
|
|
42
|
-
}
|
|
43
|
-
const ext = path.extname(file);
|
|
44
|
-
return c.body(readFileSync(file), 200, {
|
|
45
|
-
"Content-Type": CONTENT_TYPES[ext] ?? "application/octet-stream",
|
|
46
|
-
"Cache-Control": "public, max-age=3600"
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
resolveDistCdnDir,
|
|
53
|
-
registerInspectorStaticAssets
|
|
54
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerInspectorProxyRoutes
|
|
3
|
-
} from "./chunk-UJLXHNQP.js";
|
|
4
|
-
|
|
5
|
-
// src/server/create-dev-api-app.ts
|
|
6
|
-
import { Hono } from "hono";
|
|
7
|
-
import { cors } from "hono/cors";
|
|
8
|
-
import { logger } from "hono/logger";
|
|
9
|
-
function createDevApiApp() {
|
|
10
|
-
const app = new Hono();
|
|
11
|
-
app.use(
|
|
12
|
-
"*",
|
|
13
|
-
cors({
|
|
14
|
-
origin: "*",
|
|
15
|
-
allowHeaders: [
|
|
16
|
-
"Authorization",
|
|
17
|
-
"Content-Type",
|
|
18
|
-
"Accept",
|
|
19
|
-
"X-Target-URL",
|
|
20
|
-
"X-MCP-Target",
|
|
21
|
-
"Mcp-Session-Id",
|
|
22
|
-
"mcp-session-id",
|
|
23
|
-
"mcp-protocol-version",
|
|
24
|
-
"X-Server-Id",
|
|
25
|
-
"X-Requested-With"
|
|
26
|
-
],
|
|
27
|
-
exposeHeaders: ["*"]
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
app.use("/inspector/api/*", logger());
|
|
31
|
-
registerInspectorProxyRoutes(app, {
|
|
32
|
-
oauthProxyAllowedOrigins: [],
|
|
33
|
-
oauthProxyAllowLoopback: true
|
|
34
|
-
});
|
|
35
|
-
return app;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
createDevApiApp
|
|
40
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
// package.json
|
|
2
|
-
var package_default = {
|
|
3
|
-
name: "@mcp-use/inspector",
|
|
4
|
-
type: "module",
|
|
5
|
-
version: "20.0.0-beta.3",
|
|
6
|
-
description: "MCP Inspector - A tool for inspecting and debugging MCP servers",
|
|
7
|
-
author: "",
|
|
8
|
-
license: "MIT",
|
|
9
|
-
homepage: "https://github.com/mcp-use/mcp-use#readme",
|
|
10
|
-
repository: {
|
|
11
|
-
type: "git",
|
|
12
|
-
url: "git+https://github.com/mcp-use/mcp-use.git",
|
|
13
|
-
directory: "libraries/typescript/packages/inspector"
|
|
14
|
-
},
|
|
15
|
-
bugs: {
|
|
16
|
-
url: "https://github.com/mcp-use/mcp-use/issues"
|
|
17
|
-
},
|
|
18
|
-
keywords: [
|
|
19
|
-
"mcp",
|
|
20
|
-
"inspector",
|
|
21
|
-
"debug",
|
|
22
|
-
"tools"
|
|
23
|
-
],
|
|
24
|
-
exports: {
|
|
25
|
-
".": {
|
|
26
|
-
types: "./dist/server/index.d.ts",
|
|
27
|
-
import: "./dist/server/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./proxy": {
|
|
30
|
-
types: "./dist/server/proxy-routes.d.ts",
|
|
31
|
-
import: "./dist/server/proxy-routes.js"
|
|
32
|
-
},
|
|
33
|
-
"./client": {
|
|
34
|
-
types: "./dist/client/index.d.ts",
|
|
35
|
-
import: "./dist/client/index.js"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
main: "./dist/server/index.js",
|
|
39
|
-
types: "./dist/server/index.d.ts",
|
|
40
|
-
bin: {
|
|
41
|
-
"mcp-inspect": "./dist/cli.js"
|
|
42
|
-
},
|
|
43
|
-
files: [
|
|
44
|
-
"dist"
|
|
45
|
-
],
|
|
46
|
-
scripts: {
|
|
47
|
-
dev: "rimraf node_modules/.vite && VITE_MANUFACT_CHAT_URL=${VITE_MANUFACT_CHAT_URL:-http://localhost:8000/api/v1/inspector/chat/stream} vite --strictPort",
|
|
48
|
-
"dev:client": "pnpm run dev",
|
|
49
|
-
"dev:server": "VITE_DEV=true tsx watch src/server/server.ts",
|
|
50
|
-
"dev:standalone": "tsx watch src/server/server.ts",
|
|
51
|
-
build: "npm run build:client && npm run build:client-exports && npm run build:server && npm run build:cli && npm run build:cdn",
|
|
52
|
-
"build:cdn": "vite build --config vite.cdn.config.ts",
|
|
53
|
-
"watch:cdn": "vite build --watch --config vite.cdn.config.ts",
|
|
54
|
-
"preview:cdn": "vite preview --config vite.cdn.config.ts --host 127.0.0.1",
|
|
55
|
-
"serve:cdn": "pnpm build:cdn && pnpm preview:cdn",
|
|
56
|
-
"analyze:cdn": "ANALYZE=true vite build --config vite.cdn.config.ts",
|
|
57
|
-
"build:client": "vite build",
|
|
58
|
-
"build:client-exports": "tsup --config tsup.client.ts && tsc -p tsconfig.client.json --emitDeclarationOnly --declaration",
|
|
59
|
-
"build:server": "tsup 'src/server/**/*.ts' --format esm --out-dir dist/server && tsc -p tsconfig.server.json --emitDeclarationOnly --declaration",
|
|
60
|
-
"build:cli": "tsup src/server/cli.ts --format esm --out-dir dist/",
|
|
61
|
-
prepublishOnly: "pnpm --filter @mcp-use/client build && pnpm build",
|
|
62
|
-
start: "node dist/cli.js --port 3000",
|
|
63
|
-
preview: "vite preview",
|
|
64
|
-
"type-check": "tsc --noEmit",
|
|
65
|
-
lint: "eslint .",
|
|
66
|
-
"lint:fix": "eslint . --fix",
|
|
67
|
-
"test:e2e": "playwright test",
|
|
68
|
-
"test:e2e:ui": "playwright test --ui",
|
|
69
|
-
"test:e2e:debug": "playwright test --debug",
|
|
70
|
-
"test:e2e:builtin": "node tests/e2e/scripts/run-test-matrix.mjs builtin",
|
|
71
|
-
"test:e2e:prod": "node tests/e2e/scripts/run-test-matrix.mjs prod",
|
|
72
|
-
"test:e2e:mix": "node tests/e2e/scripts/run-test-matrix.mjs mix",
|
|
73
|
-
"test:e2e:prod:ui": "TEST_MODE=production playwright test --ui",
|
|
74
|
-
"test:e2e:codegen": "playwright codegen http://localhost:3000/inspector",
|
|
75
|
-
"test:e2e:report": "playwright show-report",
|
|
76
|
-
"test:e2e:python": "node tests/e2e/scripts/run-python-e2e.mjs",
|
|
77
|
-
"test:unit": "vitest run",
|
|
78
|
-
"test:unit:watch": "vitest",
|
|
79
|
-
"test:e2e:tunnel": "node tests/e2e/scripts/run-tunnel-test.mjs",
|
|
80
|
-
"install:yarn": "yarn install",
|
|
81
|
-
"install:pnpm": "pnpm install",
|
|
82
|
-
"install:npm": "npm install",
|
|
83
|
-
"lint:yarn": "yarn eslint . --fix",
|
|
84
|
-
"lint:npm": "npm run lint:fix",
|
|
85
|
-
"lint:pnpm": "pnpm lint:fix"
|
|
86
|
-
},
|
|
87
|
-
engines: {
|
|
88
|
-
node: ">=22.22.2"
|
|
89
|
-
},
|
|
90
|
-
peerDependencies: {
|
|
91
|
-
"@mcp-use/client": "^2.0.0-alpha.0",
|
|
92
|
-
express: "^4.21.2 || ^5.0.0",
|
|
93
|
-
react: "^18.0.0 || ^19.0.0",
|
|
94
|
-
"react-dom": "^18.0.0 || ^19.0.0",
|
|
95
|
-
"react-router": "^7.12.0"
|
|
96
|
-
},
|
|
97
|
-
peerDependenciesMeta: {
|
|
98
|
-
express: {
|
|
99
|
-
optional: true
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
dependencies: {
|
|
103
|
-
"@base-ui/react": "^1.6.0",
|
|
104
|
-
"@hono/node-server": "^1.19.13",
|
|
105
|
-
"@mcp-use/agent": "workspace:*",
|
|
106
|
-
"@mcp-use/client": "workspace:*",
|
|
107
|
-
"class-variance-authority": "^0.7.1",
|
|
108
|
-
clsx: "^2.1.1",
|
|
109
|
-
hono: "^4.12.12",
|
|
110
|
-
"lucide-react": "^0.562.0",
|
|
111
|
-
"markdown-to-jsx": "^9.7.4",
|
|
112
|
-
motion: "^12.34.2",
|
|
113
|
-
open: "^11.0.0",
|
|
114
|
-
"react-resizable-panels": "^4.6.4",
|
|
115
|
-
sonner: "^2.0.7",
|
|
116
|
-
"tailwind-merge": "^3.5.0"
|
|
117
|
-
},
|
|
118
|
-
publishConfig: {
|
|
119
|
-
access: "public"
|
|
120
|
-
},
|
|
121
|
-
devDependencies: {
|
|
122
|
-
"@playwright/test": "^1.58.2",
|
|
123
|
-
"@tailwindcss/vite": "^4.2.0",
|
|
124
|
-
"@types/express": "^5.0.6",
|
|
125
|
-
"mcp-use": "workspace:*",
|
|
126
|
-
"@vitejs/plugin-react": "^6.0.0",
|
|
127
|
-
emulate: "0.5.0",
|
|
128
|
-
eslint: "^9.39.2",
|
|
129
|
-
express: "^5.2.1",
|
|
130
|
-
"oauth2-mock-server": "^8.2.2",
|
|
131
|
-
react: "^19.2.3",
|
|
132
|
-
"react-dom": "^19.2.3",
|
|
133
|
-
"react-router": "^7.12.0",
|
|
134
|
-
"rollup-plugin-visualizer": "^6.0.3",
|
|
135
|
-
tailwindcss: "^4.2.0",
|
|
136
|
-
tsup: "^8.5.1",
|
|
137
|
-
tsx: "^4.21.0",
|
|
138
|
-
"tw-animate-css": "^1.4.0",
|
|
139
|
-
typescript: "^5.9.3",
|
|
140
|
-
vite: "^8.0.16",
|
|
141
|
-
vitest: "^4.1.0",
|
|
142
|
-
"wait-on": "^9.0.4",
|
|
143
|
-
zod: "^4.2.0"
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
// src/server/version.ts
|
|
148
|
-
var VERSION = package_default.version;
|
|
149
|
-
function getInspectorVersion() {
|
|
150
|
-
return VERSION;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export {
|
|
154
|
-
VERSION,
|
|
155
|
-
getInspectorVersion
|
|
156
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
__publicField
|
|
7
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
mountMcpProxy
|
|
3
|
-
} from "./chunk-XCNS5CIW.js";
|
|
4
|
-
import {
|
|
5
|
-
mountOAuthProxy
|
|
6
|
-
} from "./chunk-K2F2AJOI.js";
|
|
7
|
-
|
|
8
|
-
// src/server/proxy-routes.ts
|
|
9
|
-
function registerInspectorProxyRoutes(app, config, basePath = "") {
|
|
10
|
-
const p = (suffix) => `${basePath}${suffix}`;
|
|
11
|
-
const allowLoopback = config?.oauthProxyAllowLoopback ?? false;
|
|
12
|
-
const mountOAuth = config?.oauth !== false;
|
|
13
|
-
app.get(p("/inspector/health"), (c) => {
|
|
14
|
-
return c.json({
|
|
15
|
-
status: "ok",
|
|
16
|
-
protocol: "mcp-use-inspector-preview",
|
|
17
|
-
version: 1,
|
|
18
|
-
capabilities: ["view-preview"]
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
mountMcpProxy(app, {
|
|
22
|
-
path: p("/inspector/api/proxy"),
|
|
23
|
-
allowLoopback
|
|
24
|
-
});
|
|
25
|
-
if (mountOAuth) {
|
|
26
|
-
mountOAuthProxy(app, {
|
|
27
|
-
basePath: p("/inspector/api/oauth"),
|
|
28
|
-
enableLogging: true,
|
|
29
|
-
allowedOrigins: config?.oauthProxyAllowedOrigins ?? [],
|
|
30
|
-
allowLoopback
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
if (config?.autoConnectUrl !== void 0) {
|
|
34
|
-
const autoConnectUrl = config.autoConnectUrl;
|
|
35
|
-
app.get(p("/inspector/config.json"), (c) => {
|
|
36
|
-
return c.json({ autoConnectUrl: autoConnectUrl ?? null });
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
registerInspectorProxyRoutes
|
|
43
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/server/favicon-links.ts
|
|
2
|
-
var FAVICON_CACHE_VERSION = "4";
|
|
3
|
-
var INSPECTOR_FAVICON_ASSETS = [
|
|
4
|
-
"favicon.svg",
|
|
5
|
-
"favicon-96x96.png",
|
|
6
|
-
"favicon.ico",
|
|
7
|
-
"apple-touch-icon.png",
|
|
8
|
-
"site.webmanifest",
|
|
9
|
-
"web-app-manifest-192x192.png",
|
|
10
|
-
"web-app-manifest-512x512.png",
|
|
11
|
-
"favicon-black.svg",
|
|
12
|
-
"favicon-white.svg"
|
|
13
|
-
];
|
|
14
|
-
function renderInspectorFaviconLinks(basePath = "") {
|
|
15
|
-
const prefix = basePath.replace(/\/$/, "");
|
|
16
|
-
const href = `${prefix}/favicon-black.svg?v=${FAVICON_CACHE_VERSION}`;
|
|
17
|
-
return `<link rel="icon" type="image/svg+xml" href="${href}" />`;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
FAVICON_CACHE_VERSION,
|
|
22
|
-
INSPECTOR_FAVICON_ASSETS,
|
|
23
|
-
renderInspectorFaviconLinks
|
|
24
|
-
};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isSafeProxyTarget
|
|
3
|
-
} from "./chunk-K2F2AJOI.js";
|
|
4
|
-
|
|
5
|
-
// src/server/proxy/mcp-proxy.ts
|
|
6
|
-
import { cors } from "hono/cors";
|
|
7
|
-
import { logger } from "hono/logger";
|
|
8
|
-
function isOpenEndedSseResponse(contentType, contentLength) {
|
|
9
|
-
return contentType.includes("text/event-stream") && !contentLength;
|
|
10
|
-
}
|
|
11
|
-
function mountMcpProxy(app, options = {}) {
|
|
12
|
-
const basePath = options.path || "/mcp/proxy";
|
|
13
|
-
const enableLogging = options.enableLogging !== false;
|
|
14
|
-
app.use(
|
|
15
|
-
`${basePath}/*`,
|
|
16
|
-
cors({
|
|
17
|
-
origin: "*",
|
|
18
|
-
allowHeaders: [
|
|
19
|
-
"Authorization",
|
|
20
|
-
"Content-Type",
|
|
21
|
-
"Accept",
|
|
22
|
-
"X-Target-URL",
|
|
23
|
-
"X-MCP-Target",
|
|
24
|
-
"Mcp-Session-Id",
|
|
25
|
-
"mcp-session-id",
|
|
26
|
-
"mcp-protocol-version",
|
|
27
|
-
"X-Server-Id",
|
|
28
|
-
"X-Requested-With"
|
|
29
|
-
],
|
|
30
|
-
exposeHeaders: ["*"]
|
|
31
|
-
})
|
|
32
|
-
);
|
|
33
|
-
if (enableLogging) {
|
|
34
|
-
app.use(`${basePath}/*`, logger());
|
|
35
|
-
}
|
|
36
|
-
app.all(`${basePath}/*`, async (c) => {
|
|
37
|
-
try {
|
|
38
|
-
if (options.authenticate) {
|
|
39
|
-
const isAuthenticated = await options.authenticate(c);
|
|
40
|
-
if (!isAuthenticated) {
|
|
41
|
-
return c.json({ error: "Unauthorized" }, 401);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const targetUrl = c.req.header("X-Target-URL");
|
|
45
|
-
if (!targetUrl) {
|
|
46
|
-
return c.json(
|
|
47
|
-
{
|
|
48
|
-
error: "X-Target-URL header is required",
|
|
49
|
-
usage: "Set X-Target-URL header to the MCP server URL you want to proxy to"
|
|
50
|
-
},
|
|
51
|
-
400
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
if (!await isSafeProxyTarget(targetUrl, options.allowLoopback ?? false)) {
|
|
55
|
-
return c.json(
|
|
56
|
-
{
|
|
57
|
-
error: "Invalid target URL",
|
|
58
|
-
details: "Target is not allowed by the proxy network policy"
|
|
59
|
-
},
|
|
60
|
-
403
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
if (options.validateRequest) {
|
|
64
|
-
const isValid = await options.validateRequest(targetUrl, c);
|
|
65
|
-
if (!isValid) {
|
|
66
|
-
return c.json(
|
|
67
|
-
{
|
|
68
|
-
error: "Invalid target URL",
|
|
69
|
-
details: "The requested target URL is not allowed"
|
|
70
|
-
},
|
|
71
|
-
403
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
new URL(targetUrl);
|
|
77
|
-
} catch {
|
|
78
|
-
return c.json(
|
|
79
|
-
{
|
|
80
|
-
error: "Invalid target URL format",
|
|
81
|
-
details: "The X-Target-URL must be a valid HTTP/HTTPS URL"
|
|
82
|
-
},
|
|
83
|
-
400
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
const method = c.req.method;
|
|
87
|
-
const headers = {};
|
|
88
|
-
const requestHeaders = c.req.header();
|
|
89
|
-
for (const [key, value] of Object.entries(requestHeaders)) {
|
|
90
|
-
const lowerKey = key.toLowerCase();
|
|
91
|
-
if (!lowerKey.startsWith("x-proxy-") && !lowerKey.startsWith("x-target-") && !lowerKey.startsWith("x-mcp-") && !lowerKey.startsWith("x-forwarded-") && !lowerKey.startsWith("cf-") && lowerKey !== "x-original-host" && lowerKey !== "host" && lowerKey !== "accept-encoding" && lowerKey !== "cdn-loop") {
|
|
92
|
-
headers[key] = value;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
headers["Accept-Encoding"] = "identity";
|
|
96
|
-
try {
|
|
97
|
-
const targetUrlObj = new URL(targetUrl);
|
|
98
|
-
headers.Host = targetUrlObj.host;
|
|
99
|
-
} catch {
|
|
100
|
-
return c.json({ error: "Invalid target URL" }, 400);
|
|
101
|
-
}
|
|
102
|
-
const body = method !== "GET" && method !== "HEAD" ? new Uint8Array(await c.req.arrayBuffer()).slice() : void 0;
|
|
103
|
-
const response = await fetch(targetUrl, {
|
|
104
|
-
method,
|
|
105
|
-
headers,
|
|
106
|
-
body,
|
|
107
|
-
redirect: "manual"
|
|
108
|
-
});
|
|
109
|
-
if (response.status >= 300 && response.status < 400) {
|
|
110
|
-
const location = response.headers.get("location");
|
|
111
|
-
if (location) {
|
|
112
|
-
const redirectUrl = new URL(location, targetUrl).toString();
|
|
113
|
-
if (!await isSafeProxyTarget(
|
|
114
|
-
redirectUrl,
|
|
115
|
-
options.allowLoopback ?? false
|
|
116
|
-
) || options.validateRequest && !await options.validateRequest(redirectUrl, c)) {
|
|
117
|
-
return c.json({ error: "Redirect target is not allowed" }, 403);
|
|
118
|
-
}
|
|
119
|
-
const redirectResponse = await fetch(redirectUrl, {
|
|
120
|
-
method,
|
|
121
|
-
headers,
|
|
122
|
-
body,
|
|
123
|
-
redirect: "manual"
|
|
124
|
-
});
|
|
125
|
-
const redirectHeaders = {};
|
|
126
|
-
redirectResponse.headers.forEach((value, key) => {
|
|
127
|
-
const lowerKey = key.toLowerCase();
|
|
128
|
-
if (lowerKey !== "content-encoding" && lowerKey !== "transfer-encoding" && lowerKey !== "content-length") {
|
|
129
|
-
redirectHeaders[key] = value;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
return new Response(redirectResponse.body, {
|
|
133
|
-
status: redirectResponse.status,
|
|
134
|
-
statusText: redirectResponse.statusText,
|
|
135
|
-
headers: redirectHeaders
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const responseHeaders = {};
|
|
140
|
-
response.headers.forEach((value, key) => {
|
|
141
|
-
const lowerKey = key.toLowerCase();
|
|
142
|
-
if (lowerKey !== "content-encoding" && lowerKey !== "transfer-encoding" && lowerKey !== "content-length") {
|
|
143
|
-
responseHeaders[key] = value;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
const contentType = response.headers.get("content-type") || "";
|
|
147
|
-
const upstreamContentLength = response.headers.get("content-length");
|
|
148
|
-
const isTrueStream = isOpenEndedSseResponse(
|
|
149
|
-
contentType,
|
|
150
|
-
upstreamContentLength
|
|
151
|
-
);
|
|
152
|
-
if (isTrueStream) {
|
|
153
|
-
return new Response(response.body, {
|
|
154
|
-
status: response.status,
|
|
155
|
-
statusText: response.statusText,
|
|
156
|
-
headers: responseHeaders
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
const bodyBuffer = await response.arrayBuffer();
|
|
160
|
-
responseHeaders["Content-Length"] = String(bodyBuffer.byteLength);
|
|
161
|
-
return new Response(bodyBuffer, {
|
|
162
|
-
status: response.status,
|
|
163
|
-
statusText: response.statusText,
|
|
164
|
-
headers: responseHeaders
|
|
165
|
-
});
|
|
166
|
-
} catch (error) {
|
|
167
|
-
const message = error instanceof Error ? error.message : "Unknown error";
|
|
168
|
-
const targetUrl = c.req.header("X-Target-URL");
|
|
169
|
-
const isConnectionRefused = error instanceof Error && (error.message.includes("ECONNREFUSED") || error.message.includes("fetch failed"));
|
|
170
|
-
if (isConnectionRefused) {
|
|
171
|
-
console.warn(
|
|
172
|
-
`[MCP Proxy] Connection refused to ${targetUrl || "unknown target"} - server may not be running`
|
|
173
|
-
);
|
|
174
|
-
} else {
|
|
175
|
-
console.error(
|
|
176
|
-
"[MCP Proxy] Request failed:",
|
|
177
|
-
message,
|
|
178
|
-
"\nTarget URL:",
|
|
179
|
-
targetUrl || "unknown",
|
|
180
|
-
"\nError:",
|
|
181
|
-
error
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
return c.json(
|
|
185
|
-
{
|
|
186
|
-
error: "Proxy request failed",
|
|
187
|
-
details: message,
|
|
188
|
-
targetUrl: targetUrl || "unknown"
|
|
189
|
-
},
|
|
190
|
-
500
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export {
|
|
197
|
-
isOpenEndedSseResponse,
|
|
198
|
-
mountMcpProxy
|
|
199
|
-
};
|
package/dist/server/cli.d.ts
DELETED
package/dist/server/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/server/cli.ts"],"names":[],"mappings":""}
|
package/dist/server/cli.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
findAvailablePort,
|
|
4
|
-
isValidUrl
|
|
5
|
-
} from "./chunk-KD7K27XK.js";
|
|
6
|
-
import {
|
|
7
|
-
registerInspectorCdnShell
|
|
8
|
-
} from "./chunk-BEJGHVKM.js";
|
|
9
|
-
import "./chunk-M5TZA42I.js";
|
|
10
|
-
import {
|
|
11
|
-
getInspectorVersion
|
|
12
|
-
} from "./chunk-PGN3B3MQ.js";
|
|
13
|
-
import "./chunk-H6ZCIKBS.js";
|
|
14
|
-
import {
|
|
15
|
-
registerInspectorProxyRoutes
|
|
16
|
-
} from "./chunk-UJLXHNQP.js";
|
|
17
|
-
import "./chunk-IKTZUWSX.js";
|
|
18
|
-
import "./chunk-XCNS5CIW.js";
|
|
19
|
-
import "./chunk-K2F2AJOI.js";
|
|
20
|
-
import "./chunk-J4FNYLBF.js";
|
|
21
|
-
import "./chunk-WFT4JHYI.js";
|
|
22
|
-
import "./chunk-PKBMQBKP.js";
|
|
23
|
-
|
|
24
|
-
// src/server/cli.ts
|
|
25
|
-
import { serve } from "@hono/node-server";
|
|
26
|
-
import { Hono } from "hono";
|
|
27
|
-
import { cors } from "hono/cors";
|
|
28
|
-
import { logger } from "hono/logger";
|
|
29
|
-
import open from "open";
|
|
30
|
-
var args = process.argv.slice(2);
|
|
31
|
-
var mcpUrl;
|
|
32
|
-
var startPort = 8080;
|
|
33
|
-
var noOpen = false;
|
|
34
|
-
for (let i = 0; i < args.length; i++) {
|
|
35
|
-
if (args[i] === "--url") {
|
|
36
|
-
if (i + 1 >= args.length || args[i + 1].startsWith("-")) {
|
|
37
|
-
console.error("Error: --url requires a value");
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
const url = args[i + 1];
|
|
41
|
-
if (!isValidUrl(url)) {
|
|
42
|
-
console.error(`Error: Invalid URL format: ${url}`);
|
|
43
|
-
console.error("URL must start with http://, https://, ws://, or wss://");
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
mcpUrl = url;
|
|
47
|
-
i++;
|
|
48
|
-
} else if (args[i] === "--port") {
|
|
49
|
-
if (i + 1 >= args.length || args[i + 1].startsWith("-")) {
|
|
50
|
-
console.error("Error: --port requires a value");
|
|
51
|
-
process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
const parsedPort = Number.parseInt(args[i + 1], 10);
|
|
54
|
-
if (Number.isNaN(parsedPort) || parsedPort < 1 || parsedPort > 65535) {
|
|
55
|
-
console.error(
|
|
56
|
-
`Error: Port must be a number between 1 and 65535, got: ${args[i + 1]}`
|
|
57
|
-
);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
startPort = parsedPort;
|
|
61
|
-
i++;
|
|
62
|
-
} else if (args[i] === "--no-open") {
|
|
63
|
-
noOpen = true;
|
|
64
|
-
} else if (args[i] === "--version" || args[i] === "-v") {
|
|
65
|
-
console.log(getInspectorVersion());
|
|
66
|
-
process.exit(0);
|
|
67
|
-
} else if (args[i] === "--help" || args[i] === "-h") {
|
|
68
|
-
console.log(`
|
|
69
|
-
MCP Inspector - Inspect and debug MCP servers
|
|
70
|
-
|
|
71
|
-
Usage:
|
|
72
|
-
npx @mcp-use/inspector [options]
|
|
73
|
-
|
|
74
|
-
Options:
|
|
75
|
-
--url <url> MCP server URL to auto-connect to (e.g., http://localhost:3000/mcp)
|
|
76
|
-
--port <port> Starting port to try (default: 8080, will find next available)
|
|
77
|
-
--no-open Do not auto-open inspector in browser
|
|
78
|
-
--version, -v Show the inspector version
|
|
79
|
-
--help, -h Show this help message
|
|
80
|
-
|
|
81
|
-
Examples:
|
|
82
|
-
npx @mcp-use/inspector --url http://localhost:3000/mcp
|
|
83
|
-
npx @mcp-use/inspector --url http://localhost:3000/mcp --port 9000
|
|
84
|
-
npx @mcp-use/inspector
|
|
85
|
-
`);
|
|
86
|
-
process.exit(0);
|
|
87
|
-
} else {
|
|
88
|
-
console.error(`Error: Unknown option: ${args[i]}`);
|
|
89
|
-
console.error("Run with --help to see available options.");
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
var app = new Hono();
|
|
94
|
-
app.use(
|
|
95
|
-
"*",
|
|
96
|
-
cors({
|
|
97
|
-
origin: "*",
|
|
98
|
-
exposeHeaders: ["*"]
|
|
99
|
-
})
|
|
100
|
-
);
|
|
101
|
-
app.use("/inspector/api/proxy/*", logger());
|
|
102
|
-
var inspectorMode = process.env.MCP_INSPECTOR_MODE ?? (process.env.RAILWAY_ENVIRONMENT_NAME ? "cloud" : "standalone");
|
|
103
|
-
registerInspectorProxyRoutes(app, {
|
|
104
|
-
autoConnectUrl: mcpUrl,
|
|
105
|
-
oauthProxyAllowedOrigins: [],
|
|
106
|
-
oauthProxyAllowLoopback: inspectorMode === "standalone"
|
|
107
|
-
});
|
|
108
|
-
registerInspectorCdnShell(app, {
|
|
109
|
-
inspectorMode,
|
|
110
|
-
manufactChatUrl: process.env.MANUFACT_CHAT_URL
|
|
111
|
-
});
|
|
112
|
-
async function startServer() {
|
|
113
|
-
try {
|
|
114
|
-
const port = await findAvailablePort(startPort);
|
|
115
|
-
serve({
|
|
116
|
-
fetch: app.fetch,
|
|
117
|
-
port
|
|
118
|
-
});
|
|
119
|
-
console.log(`\u{1F680} MCP Inspector running on http://localhost:${port}`);
|
|
120
|
-
if (mcpUrl) {
|
|
121
|
-
console.log(`\u{1F4E1} Auto-connecting to: ${mcpUrl}`);
|
|
122
|
-
}
|
|
123
|
-
if (!noOpen) {
|
|
124
|
-
const openUrl = new URL(`http://localhost:${port}/inspector`);
|
|
125
|
-
if (mcpUrl) {
|
|
126
|
-
openUrl.searchParams.set("autoConnect", mcpUrl);
|
|
127
|
-
}
|
|
128
|
-
try {
|
|
129
|
-
await open(openUrl.toString());
|
|
130
|
-
console.log(`\u{1F310} Browser opened`);
|
|
131
|
-
} catch {
|
|
132
|
-
console.log(`\u{1F310} Please open ${openUrl} in your browser`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return { port, fetch: app.fetch };
|
|
136
|
-
} catch (error) {
|
|
137
|
-
console.error("Failed to start server:", error);
|
|
138
|
-
process.exit(1);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
startServer();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-dev-api-app.d.ts","sourceRoot":"","sources":["../../src/server/create-dev-api-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,qEAAqE;AACrE,wBAAgB,eAAe,IAAI,IAAI,CA+BtC"}
|