Skip to content

Add deep link support for MCP server creation via /mcps/add#11876

Open
DocX wants to merge 5 commits intodanny-avila:mainfrom
zendesk:mcp-deep-link
Open

Add deep link support for MCP server creation via /mcps/add#11876
DocX wants to merge 5 commits intodanny-avila:mainfrom
zendesk:mcp-deep-link

Conversation

@DocX
Copy link

@DocX DocX commented Feb 20, 2026

Summary

Fixes #11727

Adds new UI route for prefilling new MCP server dialog:

/mcps/add?name=My+MCP+Server&url=https://my-server/mcp&transport=streamable-http

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

Open

http://localhost:3090/mcps/add?name=My+MCP+Server&url=https://my-server/mcp&transport=streamable-http

This will redirect to /c/new with the MCP dialog opened and the name, URL and transport type preselected.

Test Configuration:

NA

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • A pull request for updating the documentation has been submitted.

DocX added 2 commits February 20, 2026 12:24
- Introduce MCPAddRedirect route to parse MCP params from query string and forward
  them to /c/new via route state
- Add useMCPDeepLink hook to open MCP server dialog with initial values from route state
- Render MCPDeepLinkDialog in ChatView to trigger dialog on deep link
- Update MCPServerDialog and useMCPServerForm to accept initialValues for pre-filling form
- Add tests for MCPAddRedirect and useMCPDeepLink behavior
const onOpenChange = useCallback((open: boolean) => {
setIsOpen(open);
if (!open) {
setInitialValues(undefined);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once opened, clear the initial values to allow user to close and open dialog with empty state

@DocX DocX marked this pull request as ready for review February 20, 2026 11:41
@danny-avila danny-avila requested a review from Copilot February 20, 2026 15:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds deep link support for MCP server creation, allowing users to prefill the MCP server dialog via a URL route. The implementation introduces a new /mcps/add route that accepts query parameters for server name, URL, and transport type, then redirects to /c/new with these values passed via route state to automatically open and prefill the MCP server creation dialog.

Changes:

  • Added /mcps/add route that extracts query parameters and redirects to the chat page with state
  • Created useMCPDeepLink hook to detect deep link state and manage dialog opening
  • Created MCPDeepLinkDialog component to render the dialog when deep link parameters are present
  • Extended MCPServerDialog and useMCPServerForm to accept and use initialValues for prefilling
  • Added comprehensive test coverage for both the redirect component and the hook

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
client/src/routes/index.tsx Adds /mcps/add route to routing configuration
client/src/routes/MCPAddRedirect.tsx Redirect component that extracts query parameters and navigates to /c/new with state
client/src/routes/tests/MCPAddRedirect.spec.tsx Tests for the redirect component
client/src/hooks/MCP/useMCPDeepLink.ts Hook to detect deep link state and manage dialog lifecycle
client/src/hooks/MCP/index.ts Exports the new hook
client/src/hooks/MCP/tests/useMCPDeepLink.spec.tsx Tests for the deep link hook
client/src/components/SidePanel/MCPBuilder/MCPDeepLinkDialog.tsx Wrapper component that conditionally renders dialog based on deep link state
client/src/components/Chat/ChatView.tsx Integrates MCPDeepLinkDialog into the chat view
client/src/components/SidePanel/MCPBuilder/MCPServerDialog/index.tsx Accepts initialValues prop for prefilling
client/src/components/SidePanel/MCPBuilder/MCPServerDialog/hooks/useMCPServerForm.ts Uses initialValues to set form defaults

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Deeplink URL to autoconfigure user MCP server

1 participant

Comments