@mcp-use/inspector 20.0.0-beta.17 → 20.0.0-beta.19
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 +1 -1
- 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 +14 -1446
- package/dist/client/index.d.ts +1399 -50
- package/dist/client/index.js +170 -24320
- package/dist/server/index.d.ts +79 -6
- package/dist/server/index.js +99 -18
- package/package.json +61 -37
- package/dist/app/inspector.css +0 -2
- package/dist/app/inspector.js +0 -92352
- 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 -48
- 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/partialToolArgs.d.ts +0 -10
- package/dist/client/components/chat/partialToolArgs.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 -76
- 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/mcp-apps/McpAppsViewPanel.d.ts +0 -29
- package/dist/client/components/mcp-apps/McpAppsViewPanel.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 -25
- 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-animation-pause.d.ts +0 -14
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +0 -6
- package/dist/client/components/ui/mesh-gradient-colors.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 -111
- 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 -14
- 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 -19
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/chunk-2K7OKCVV.js +0 -199
- package/dist/server/chunk-EKD2XITW.js +0 -44
- package/dist/server/chunk-EPPZCSJQ.js +0 -199
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-JWDVSQED.js +0 -156
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-PZF2PUDE.js +0 -58
- package/dist/server/chunk-RFJAZOK7.js +0 -173
- package/dist/server/chunk-RKFQG67Z.js +0 -38
- package/dist/server/chunk-V5A5XLFJ.js +0 -762
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -136
- 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/index.d.ts.map +0 -1
- package/dist/server/inspector-shell.d.ts +0 -20
- package/dist/server/inspector-shell.d.ts.map +0 -1
- package/dist/server/inspector-shell.js +0 -10
- package/dist/server/middleware.d.ts +0 -65
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -15
- 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 -28
- 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/index-Dj_E94k4.css +0 -1
- package/dist/web/assets/index-O3gsi3le.js +0 -643
- 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 -81
- 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
|
@@ -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
|
-
};
|
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,136 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
findAvailablePort,
|
|
4
|
-
isValidUrl
|
|
5
|
-
} from "./chunk-KD7K27XK.js";
|
|
6
|
-
import {
|
|
7
|
-
registerInspectorShell
|
|
8
|
-
} from "./chunk-EPPZCSJQ.js";
|
|
9
|
-
import "./chunk-PZF2PUDE.js";
|
|
10
|
-
import {
|
|
11
|
-
getInspectorVersion
|
|
12
|
-
} from "./chunk-RFJAZOK7.js";
|
|
13
|
-
import "./chunk-WFT4JHYI.js";
|
|
14
|
-
import {
|
|
15
|
-
registerInspectorProxyRoutes
|
|
16
|
-
} from "./chunk-EKD2XITW.js";
|
|
17
|
-
import "./chunk-IKTZUWSX.js";
|
|
18
|
-
import "./chunk-2K7OKCVV.js";
|
|
19
|
-
import "./chunk-V5A5XLFJ.js";
|
|
20
|
-
import "./chunk-PKBMQBKP.js";
|
|
21
|
-
|
|
22
|
-
// src/server/cli.ts
|
|
23
|
-
import { serve } from "@hono/node-server";
|
|
24
|
-
import { Hono } from "hono";
|
|
25
|
-
import { cors } from "hono/cors";
|
|
26
|
-
import open from "open";
|
|
27
|
-
var args = process.argv.slice(2);
|
|
28
|
-
var mcpUrl;
|
|
29
|
-
var startPort = 8080;
|
|
30
|
-
var noOpen = false;
|
|
31
|
-
for (let i = 0; i < args.length; i++) {
|
|
32
|
-
if (args[i] === "--url") {
|
|
33
|
-
if (i + 1 >= args.length || args[i + 1].startsWith("-")) {
|
|
34
|
-
console.error("Error: --url requires a value");
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
const url = args[i + 1];
|
|
38
|
-
if (!isValidUrl(url)) {
|
|
39
|
-
console.error(`Error: Invalid URL format: ${url}`);
|
|
40
|
-
console.error("URL must start with http://, https://, ws://, or wss://");
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
mcpUrl = url;
|
|
44
|
-
i++;
|
|
45
|
-
} else if (args[i] === "--port") {
|
|
46
|
-
if (i + 1 >= args.length || args[i + 1].startsWith("-")) {
|
|
47
|
-
console.error("Error: --port requires a value");
|
|
48
|
-
process.exit(1);
|
|
49
|
-
}
|
|
50
|
-
const parsedPort = Number.parseInt(args[i + 1], 10);
|
|
51
|
-
if (Number.isNaN(parsedPort) || parsedPort < 1 || parsedPort > 65535) {
|
|
52
|
-
console.error(
|
|
53
|
-
`Error: Port must be a number between 1 and 65535, got: ${args[i + 1]}`
|
|
54
|
-
);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
|
-
startPort = parsedPort;
|
|
58
|
-
i++;
|
|
59
|
-
} else if (args[i] === "--no-open") {
|
|
60
|
-
noOpen = true;
|
|
61
|
-
} else if (args[i] === "--version" || args[i] === "-v") {
|
|
62
|
-
console.log(getInspectorVersion());
|
|
63
|
-
process.exit(0);
|
|
64
|
-
} else if (args[i] === "--help" || args[i] === "-h") {
|
|
65
|
-
console.log(`
|
|
66
|
-
MCP Inspector - Inspect and debug MCP servers
|
|
67
|
-
|
|
68
|
-
Usage:
|
|
69
|
-
npx @mcp-use/inspector [options]
|
|
70
|
-
|
|
71
|
-
Options:
|
|
72
|
-
--url <url> MCP server URL to auto-connect to (e.g., http://localhost:3000/mcp)
|
|
73
|
-
--port <port> Starting port to try (default: 8080, will find next available)
|
|
74
|
-
--no-open Do not auto-open inspector in browser
|
|
75
|
-
--version, -v Show the inspector version
|
|
76
|
-
--help, -h Show this help message
|
|
77
|
-
|
|
78
|
-
Examples:
|
|
79
|
-
npx @mcp-use/inspector --url http://localhost:3000/mcp
|
|
80
|
-
npx @mcp-use/inspector --url http://localhost:3000/mcp --port 9000
|
|
81
|
-
npx @mcp-use/inspector
|
|
82
|
-
`);
|
|
83
|
-
process.exit(0);
|
|
84
|
-
} else {
|
|
85
|
-
console.error(`Error: Unknown option: ${args[i]}`);
|
|
86
|
-
console.error("Run with --help to see available options.");
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
var app = new Hono();
|
|
91
|
-
app.use(
|
|
92
|
-
"*",
|
|
93
|
-
cors({
|
|
94
|
-
origin: "*",
|
|
95
|
-
exposeHeaders: ["*"]
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
registerInspectorProxyRoutes(app, {
|
|
99
|
-
autoConnectUrl: mcpUrl,
|
|
100
|
-
oauthProxyAllowedOrigins: [],
|
|
101
|
-
oauthProxyAllowLoopback: true
|
|
102
|
-
});
|
|
103
|
-
registerInspectorShell(app, {
|
|
104
|
-
inspectorMode: "standalone",
|
|
105
|
-
manufactChatUrl: process.env.MANUFACT_CHAT_URL
|
|
106
|
-
});
|
|
107
|
-
async function startServer() {
|
|
108
|
-
try {
|
|
109
|
-
const port = await findAvailablePort(startPort);
|
|
110
|
-
serve({
|
|
111
|
-
fetch: app.fetch,
|
|
112
|
-
port
|
|
113
|
-
});
|
|
114
|
-
console.log(`\u{1F680} MCP Inspector running on http://localhost:${port}`);
|
|
115
|
-
if (mcpUrl) {
|
|
116
|
-
console.log(`\u{1F4E1} Auto-connecting to: ${mcpUrl}`);
|
|
117
|
-
}
|
|
118
|
-
if (!noOpen) {
|
|
119
|
-
const openUrl = new URL(`http://localhost:${port}/inspector`);
|
|
120
|
-
if (mcpUrl) {
|
|
121
|
-
openUrl.searchParams.set("autoConnect", mcpUrl);
|
|
122
|
-
}
|
|
123
|
-
try {
|
|
124
|
-
await open(openUrl.toString());
|
|
125
|
-
console.log(`\u{1F310} Browser opened`);
|
|
126
|
-
} catch {
|
|
127
|
-
console.log(`\u{1F310} Please open ${openUrl} in your browser`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return { port, fetch: app.fetch };
|
|
131
|
-
} catch (error) {
|
|
132
|
-
console.error("Failed to start server:", error);
|
|
133
|
-
process.exit(1);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
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;AAI5B,qEAAqE;AACrE,wBAAgB,eAAe,IAAI,IAAI,CA6BtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev-callback-redirect.d.ts","sourceRoot":"","sources":["../../src/server/dev-callback-redirect.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYpE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "./chunk-PKBMQBKP.js";
|
|
2
|
-
|
|
3
|
-
// src/server/dev-callback-redirect.ts
|
|
4
|
-
function getDevCallbackRedirect(rawUrl) {
|
|
5
|
-
const queryIndex = rawUrl.indexOf("?");
|
|
6
|
-
const path = queryIndex === -1 ? rawUrl : rawUrl.slice(0, queryIndex);
|
|
7
|
-
const queryString = queryIndex === -1 ? "" : rawUrl.slice(queryIndex);
|
|
8
|
-
if (path === "/oauth/callback") {
|
|
9
|
-
return `/inspector/oauth/callback${queryString}`;
|
|
10
|
-
}
|
|
11
|
-
if (path === "/auth/callback") {
|
|
12
|
-
return `/inspector/auth/callback${queryString}`;
|
|
13
|
-
}
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
getDevCallbackRedirect
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Bust Chrome's aggressive favicon cache when the asset changes. */
|
|
2
|
-
export declare const FAVICON_CACHE_VERSION = "4";
|
|
3
|
-
/** Static favicon assets copied alongside the Inspector browser bundle. */
|
|
4
|
-
export declare const INSPECTOR_FAVICON_ASSETS: readonly ["favicon.svg", "favicon-96x96.png", "favicon.ico", "apple-touch-icon.png", "site.webmanifest", "web-app-manifest-192x192.png", "web-app-manifest-512x512.png", "favicon-black.svg", "favicon-white.svg"];
|
|
5
|
-
/**
|
|
6
|
-
* Render `<link>` tags for inspector favicons.
|
|
7
|
-
*
|
|
8
|
-
* Uses same-origin `favicon-black.svg` (light icon in all color schemes).
|
|
9
|
-
* Keep favicon URLs on the same package-local asset route as the application.
|
|
10
|
-
*/
|
|
11
|
-
export declare function renderInspectorFaviconLinks(basePath?: string): string;
|
|
12
|
-
//# sourceMappingURL=favicon-links.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"favicon-links.d.ts","sourceRoot":"","sources":["../../src/server/favicon-links.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,oNAU3B,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,SAAK,GAAG,MAAM,CAIjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,4BAA4B,EAC5B,KAAK,0BAA0B,GAChC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Hono } from "hono";
|
|
2
|
-
type InspectorMode = "standalone" | "embedded" | "cloud";
|
|
3
|
-
type InspectorShellConfig = {
|
|
4
|
-
basePath?: string;
|
|
5
|
-
devMode?: boolean;
|
|
6
|
-
sandboxOrigin?: string | null;
|
|
7
|
-
/** Relative proxy path, e.g. `/inspector/api/proxy`. `null` disables proxy in the client. */
|
|
8
|
-
proxyUrl?: string | null;
|
|
9
|
-
inspectorMode?: InspectorMode;
|
|
10
|
-
manufactChatUrl?: string | null;
|
|
11
|
-
disableTelemetry?: boolean;
|
|
12
|
-
/** Preserve the standalone CLI's `/` to `/inspector` redirect (default true). */
|
|
13
|
-
rootRedirect?: boolean;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Serve the inspector UI at `${basePath}/inspector`.
|
|
17
|
-
*/
|
|
18
|
-
export declare function registerInspectorShell(app: Hono, config?: InspectorShellConfig, basePath?: string): void;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=inspector-shell.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspector-shell.d.ts","sourceRoot":"","sources":["../../src/server/inspector-shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAM1C,KAAK,aAAa,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAkJF;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,IAAI,EACT,MAAM,CAAC,EAAE,oBAAoB,EAC7B,QAAQ,GAAE,MAAW,QAyDtB"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { Express } from "express";
|
|
2
|
-
import { Hono } from "hono";
|
|
3
|
-
/** Web-standard handler returned by {@link mountInspector}. */
|
|
4
|
-
export type InspectorFetchHandler = (request: globalThis.Request) => Promise<globalThis.Response>;
|
|
5
|
-
/** Configuration shared by framework-neutral and framework-mounted inspectors. */
|
|
6
|
-
export interface MountInspectorOptions {
|
|
7
|
-
/**
|
|
8
|
-
* MCP URL passed to the client for automatic connection. For the returned
|
|
9
|
-
* Fetch handler, omission derives `${request.origin}${basePath}` so localhost
|
|
10
|
-
* and public tunnel URLs both target the listener the browser actually used.
|
|
11
|
-
* Pass `null` to disable auto-connect.
|
|
12
|
-
*/
|
|
13
|
-
autoConnectUrl?: string | null;
|
|
14
|
-
manufactChatUrl?: string | null;
|
|
15
|
-
/** Whether to enable the same-origin development sandbox (default `true`). */
|
|
16
|
-
devMode?: boolean;
|
|
17
|
-
/** Override the sandbox origin for MCP Apps widgets. */
|
|
18
|
-
sandboxOrigin?: string | null;
|
|
19
|
-
/** Explicit cross-origin callers of the OAuth BFF. Same-origin is implicit. */
|
|
20
|
-
oauthProxyAllowedOrigins?: readonly string[];
|
|
21
|
-
/** Allow OAuth and MCP proxy requests to loopback targets (default `true`). */
|
|
22
|
-
oauthProxyAllowLoopback?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Server-wide MCP path prefix (default `/mcp`; `""` = root). The Inspector
|
|
25
|
-
* is served from `${basePath}/inspector` and its API from
|
|
26
|
-
* `${basePath}/inspector/api/*`.
|
|
27
|
-
*/
|
|
28
|
-
basePath?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Create or mount the local MCP Inspector.
|
|
32
|
-
*
|
|
33
|
-
* With options (or no arguments), this returns a framework-neutral Fetch
|
|
34
|
-
* handler. A development server can dispatch Inspector requests to this
|
|
35
|
-
* handler on its existing listener without starting a child process or a
|
|
36
|
-
* second port.
|
|
37
|
-
*
|
|
38
|
-
* Passing an Express or Hono app preserves the v1 mounting API. Hono routes
|
|
39
|
-
* are registered directly; Express receives a narrowly scoped adapter.
|
|
40
|
-
*
|
|
41
|
-
* The UI bundle is always served from this installed package. The same Hono
|
|
42
|
-
* route implementation owns the UI, MCP proxy, OAuth BFF, callback, health,
|
|
43
|
-
* and config routes in every integration.
|
|
44
|
-
*
|
|
45
|
-
* @example Framework-neutral, same-listener use
|
|
46
|
-
* ```typescript
|
|
47
|
-
* const inspector = mountInspector({
|
|
48
|
-
* basePath: "/mcp",
|
|
49
|
-
* autoConnectUrl: "http://localhost:3000/mcp",
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* const response = await inspector(request);
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @example Legacy Hono or Express mounting
|
|
56
|
-
* ```typescript
|
|
57
|
-
* mountInspector(app, {
|
|
58
|
-
* basePath: "/mcp",
|
|
59
|
-
* autoConnectUrl: "http://localhost:3000/mcp",
|
|
60
|
-
* });
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export declare function mountInspector(options?: MountInspectorOptions): InspectorFetchHandler;
|
|
64
|
-
export declare function mountInspector(app: Express | Hono, options?: MountInspectorOptions): void;
|
|
65
|
-
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAmC,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ5B,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,UAAU,CAAC,OAAO,KACxB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAElC,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,+EAA+E;IAC/E,wBAAwB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,qBAAqB,CAAC;AAEzB,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,GAAG,IAAI,EACnB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
mountInspector
|
|
3
|
-
} from "./chunk-JWDVSQED.js";
|
|
4
|
-
import "./chunk-EPPZCSJQ.js";
|
|
5
|
-
import "./chunk-PZF2PUDE.js";
|
|
6
|
-
import "./chunk-RFJAZOK7.js";
|
|
7
|
-
import "./chunk-WFT4JHYI.js";
|
|
8
|
-
import "./chunk-EKD2XITW.js";
|
|
9
|
-
import "./chunk-IKTZUWSX.js";
|
|
10
|
-
import "./chunk-2K7OKCVV.js";
|
|
11
|
-
import "./chunk-V5A5XLFJ.js";
|
|
12
|
-
import "./chunk-PKBMQBKP.js";
|
|
13
|
-
export {
|
|
14
|
-
mountInspector
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Proxy Middleware for Hono
|
|
3
|
-
*
|
|
4
|
-
* Provides a CORS proxy for browser-based MCP clients to connect to remote MCP servers
|
|
5
|
-
* that don't support CORS or require server-side forwarding.
|
|
6
|
-
*
|
|
7
|
-
* @module mcp-proxy
|
|
8
|
-
*/
|
|
9
|
-
import type { Context, Hono } from "hono";
|
|
10
|
-
/**
|
|
11
|
-
* Options for configuring the MCP proxy middleware
|
|
12
|
-
*/
|
|
13
|
-
interface McpProxyOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Route path for the proxy endpoint
|
|
16
|
-
* @default "/mcp/proxy"
|
|
17
|
-
* @example "/inspector/api/proxy"
|
|
18
|
-
*/
|
|
19
|
-
path?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional authentication function to validate requests
|
|
22
|
-
* Return true to allow the request, false to reject with 401
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* authenticate: async (c) => {
|
|
27
|
-
* const apiKey = c.req.header("X-API-Key");
|
|
28
|
-
* return apiKey === process.env.API_KEY;
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
authenticate?: (c: Context) => Promise<boolean> | boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Optional request validator to check if target URL is allowed
|
|
35
|
-
* Return true to allow, false to reject with 403
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* validateRequest: (targetUrl) => {
|
|
40
|
-
* // Only allow specific domains
|
|
41
|
-
* return targetUrl.startsWith("https://api.example.com");
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
validateRequest?: (targetUrl: string, c: Context) => Promise<boolean> | boolean;
|
|
46
|
-
/** Permit loopback HTTP targets for explicit local development. */
|
|
47
|
-
allowLoopback?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Enable request logging
|
|
50
|
-
* @default true
|
|
51
|
-
*/
|
|
52
|
-
enableLogging?: boolean;
|
|
53
|
-
}
|
|
54
|
-
/** Whether an MCP response must remain streaming instead of being buffered. */
|
|
55
|
-
export declare function isOpenEndedSseResponse(contentType: string, contentLength: string | null): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Mount MCP proxy middleware on a Hono app
|
|
58
|
-
*
|
|
59
|
-
* This middleware proxies MCP requests to target servers based on the X-Target-URL header.
|
|
60
|
-
* It handles CORS, streaming responses (SSE), and provides optional authentication.
|
|
61
|
-
*
|
|
62
|
-
* The proxy:
|
|
63
|
-
* 1. Reads the target URL from the X-Target-URL header
|
|
64
|
-
* 2. Forwards the request to that URL with appropriate headers
|
|
65
|
-
* 3. Streams the response back to the client
|
|
66
|
-
* 4. Handles compression and encoding correctly
|
|
67
|
-
*
|
|
68
|
-
* @param app - Hono application instance
|
|
69
|
-
* @param options - Configuration options for the proxy
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```typescript
|
|
73
|
-
* import { Hono } from "hono";
|
|
74
|
-
* import { mountMcpProxy } from "mcp-use";
|
|
75
|
-
*
|
|
76
|
-
* const app = new Hono();
|
|
77
|
-
*
|
|
78
|
-
* // Basic usage
|
|
79
|
-
* mountMcpProxy(app);
|
|
80
|
-
*
|
|
81
|
-
* // With authentication
|
|
82
|
-
* mountMcpProxy(app, {
|
|
83
|
-
* path: "/api/proxy",
|
|
84
|
-
* authenticate: async (c) => {
|
|
85
|
-
* const token = c.req.header("Authorization");
|
|
86
|
-
* return token === `Bearer ${process.env.SECRET_TOKEN}`;
|
|
87
|
-
* },
|
|
88
|
-
* validateRequest: (targetUrl) => {
|
|
89
|
-
* // Only allow specific domains
|
|
90
|
-
* return targetUrl.startsWith("https://mcp.example.com");
|
|
91
|
-
* }
|
|
92
|
-
* });
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* @remarks
|
|
96
|
-
* WARNING: This proxy does not implement authentication by default.
|
|
97
|
-
* For production use, provide an `authenticate` function or restrict access to localhost only.
|
|
98
|
-
*/
|
|
99
|
-
export declare function mountMcpProxy(app: Hono, options?: McpProxyOptions): void;
|
|
100
|
-
export {};
|
|
101
|
-
//# sourceMappingURL=mcp-proxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy.d.ts","sourceRoot":"","sources":["../../../src/server/proxy/mcp-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ1C;;GAEG;AACH,UAAU,eAAe;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAE1D;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,EAAE,CAChB,SAAS,EAAE,MAAM,EACjB,CAAC,EAAE,OAAO,KACP,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAEhC,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,OAAO,CAET;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI,CAiO5E"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Context, Hono } from "hono";
|
|
2
|
-
interface OAuthProxyOptions {
|
|
3
|
-
/** @default "/oauth" */
|
|
4
|
-
basePath?: string;
|
|
5
|
-
/** Cross-origin browser origins allowed to call the BFF. Same-origin calls are always allowed. */
|
|
6
|
-
allowedOrigins?: readonly string[];
|
|
7
|
-
/** Permit HTTP(S) loopback MCP/OAuth targets. Intended only for explicit local development. */
|
|
8
|
-
allowLoopback?: boolean;
|
|
9
|
-
/** @default 10000 */
|
|
10
|
-
timeoutMs?: number;
|
|
11
|
-
/** @default 65536 */
|
|
12
|
-
maxRequestBodyBytes?: number;
|
|
13
|
-
/** @default 1048576 */
|
|
14
|
-
maxResponseBodyBytes?: number;
|
|
15
|
-
/** Exact browser callback path enforced on dynamic registrations. */
|
|
16
|
-
callbackPath?: string;
|
|
17
|
-
/** @default true */
|
|
18
|
-
enableLogging?: boolean;
|
|
19
|
-
/** Optional authentication applied before any outbound request. */
|
|
20
|
-
authenticate?: (c: Context) => Promise<boolean> | boolean;
|
|
21
|
-
/** Optional deployment policy applied after built-in URL and network checks. */
|
|
22
|
-
validateServerUrl?: (serverUrl: string, c: Context) => Promise<boolean> | boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare function mountOAuthProxy(app: Hono, options?: OAuthProxyOptions): void;
|
|
25
|
-
/** Validate a proxy target against the BFF's HTTPS and SSRF policy. */
|
|
26
|
-
export declare function isSafeProxyTarget(value: string, allowLoopback?: boolean): Promise<boolean>;
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=oauth-proxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-proxy.d.ts","sourceRoot":"","sources":["../../../src/server/proxy/oauth-proxy.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA6B1C,UAAU,iBAAiB;IACzB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,+FAA+F;IAC/F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC1D,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,CAClB,SAAS,EAAE,MAAM,EACjB,CAAC,EAAE,OAAO,KACP,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CACjC;AA4BD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,IAAI,EACT,OAAO,GAAE,iBAAsB,GAC9B,IAAI,CAmRN;AAkDD,uEAAuE;AACvE,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,EACb,aAAa,UAAQ,GACpB,OAAO,CAAC,OAAO,CAAC,CAElB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Hono } from "hono";
|
|
2
|
-
export type InspectorProxyRoutesConfig = {
|
|
3
|
-
/** URL passed to the client via config.json for auto-connect. */
|
|
4
|
-
autoConnectUrl?: string | null;
|
|
5
|
-
/** Explicit cross-origin callers of the OAuth BFF. Same-origin is implicit. */
|
|
6
|
-
oauthProxyAllowedOrigins?: readonly string[];
|
|
7
|
-
/** Allow the OAuth BFF to reach loopback servers in local development. */
|
|
8
|
-
oauthProxyAllowLoopback?: boolean;
|
|
9
|
-
/** Mount OAuth BFF routes (default true). */
|
|
10
|
-
oauth?: boolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Register minimal inspector backend routes: health, MCP CORS proxy, OAuth BFF.
|
|
14
|
-
*/
|
|
15
|
-
export declare function registerInspectorProxyRoutes(app: Hono, config?: InspectorProxyRoutesConfig, basePath?: string): void;
|
|
16
|
-
//# sourceMappingURL=proxy-routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-routes.d.ts","sourceRoot":"","sources":["../../src/server/proxy-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGjC,MAAM,MAAM,0BAA0B,GAAG;IACvC,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,+EAA+E;IAC/E,wBAAwB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,0EAA0E;IAC1E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,IAAI,EACT,MAAM,CAAC,EAAE,0BAA0B,EACnC,QAAQ,GAAE,MAAW,QAoCtB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type RpcLogEvent = {
|
|
2
|
-
serverId: string;
|
|
3
|
-
direction: "send" | "receive";
|
|
4
|
-
timestamp: string;
|
|
5
|
-
message: unknown;
|
|
6
|
-
};
|
|
7
|
-
declare class RpcLogBus {
|
|
8
|
-
private readonly emitter;
|
|
9
|
-
private readonly bufferByServer;
|
|
10
|
-
publish(event: RpcLogEvent): void;
|
|
11
|
-
subscribe(serverIds: string[], listener: (event: RpcLogEvent) => void): () => void;
|
|
12
|
-
getBuffer(serverIds: string[], limit: number): RpcLogEvent[];
|
|
13
|
-
clear(serverIds?: string[]): void;
|
|
14
|
-
}
|
|
15
|
-
export declare const rpcLogBus: RpcLogBus;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=rpc-log-bus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-log-bus.d.ts","sourceRoot":"","sources":["../../src/server/rpc-log-bus.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,cAAM,SAAS;IACb,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IACpD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoC;IAEnE,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAWjC,SAAS,CACP,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACrC,MAAM,IAAI;IASb,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,EAAE;IAgB5D,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;CAUlC;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|