Skip to content

feat: support mcp auth flow#9178

Merged
ZxBing0066 merged 8 commits intofeat/support-mcp-clientfrom
feat/mcp-auth-flow
Sep 26, 2025
Merged

feat: support mcp auth flow#9178
ZxBing0066 merged 8 commits intofeat/support-mcp-clientfrom
feat/mcp-auth-flow

Conversation

@ZxBing0066
Copy link
Member

@ZxBing0066 ZxBing0066 commented Sep 26, 2025

INS-1427

Changes

  • Support MCP auth flow

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 implements support for MCP (Model Context Protocol) OAuth authentication flow, allowing MCP servers to authenticate users through OAuth 2.0 when required.

Key changes include:

  • Addition of a new mcp-auth-flow grant type to OAuth2 authentication
  • Implementation of an MCP OAuth client provider to handle authentication flows
  • Integration of authentication confirmation modals and status tracking
  • Enhanced error handling and token management for MCP connections

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/insomnia/src/ui/modals.tsx Registers the OAuth authorization status modal
packages/insomnia/src/ui/components/modals/oauth-authorization-status-modal.tsx Adds IPC event handlers for showing/hiding auth modal
packages/insomnia/src/ui/components/modals/ask-modal.tsx Adds onHide callback support and reorders modal operations
packages/insomnia/src/ui/components/mcp/mcp-url-bar.tsx Implements MCP auth confirmation dialog handling
packages/insomnia/src/ui/components/mcp/mcp-request-pane.tsx Enables MCP auth flow in request pane
packages/insomnia/src/ui/components/mcp/mcp-pane.tsx Adds safe result extraction for MCP events
packages/insomnia/src/ui/components/editors/auth/o-auth-2-auth.tsx Adds MCP auth flow grant type and UI modifications
packages/insomnia/src/ui/components/editors/auth/components/auth-select-row.tsx Adds disabled state support to select element
packages/insomnia/src/ui/components/editors/auth/auth-wrapper.tsx Passes MCP auth flow flag to OAuth2Auth component
packages/insomnia/src/network/o-auth-2/get-token.ts Skips token handling for MCP auth flow
packages/insomnia/src/network/o-auth-2/constants.ts Defines MCP auth flow grant type constant
packages/insomnia/src/models/request.ts Updates OAuth2 type definition to include MCP auth flow
packages/insomnia/src/models/mcp-response.ts Adds updateOrCreate method for MCP responses
packages/insomnia/src/main/network/mcp.ts Implements comprehensive MCP OAuth provider and auth flow
packages/insomnia/src/main/ipc/electron.ts Adds IPC channel definitions for auth events
packages/insomnia/src/entry.preload.ts Exposes auth confirmation method to renderer
packages/insomnia/src/common/import-v5-parser.ts Updates schema to include MCP auth flow grant type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ZxBing0066 ZxBing0066 merged commit bc373ce into feat/support-mcp-client Sep 26, 2025
10 checks passed
@ZxBing0066 ZxBing0066 deleted the feat/mcp-auth-flow branch September 26, 2025 09:48
cwangsmv pushed a commit that referenced this pull request Oct 9, 2025
cwangsmv pushed a commit that referenced this pull request Oct 10, 2025
cwangsmv pushed a commit that referenced this pull request Oct 13, 2025
cwangsmv pushed a commit that referenced this pull request Oct 13, 2025
cwangsmv pushed a commit that referenced this pull request Oct 22, 2025
cwangsmv pushed a commit that referenced this pull request Oct 23, 2025
CurryYangxx added a commit that referenced this pull request Oct 23, 2025
* feat: mcp client creation-[INS-1328] (#9103)

* feat: mcp client creation

* fix:: type check

* feat: fix icon

* feat: mcp workspace card dropdown

* feat: mcp client support - SDK integration & Basic request pane (#9109)

* 1.initial check-in for mcp main

* add initial mcp request pane

* fix name

* fix type issues

* fix type issue

* fix issue

* feat: add custom mcp icon (#9112)

* feat: mcp workspace icon

* fix: mcp redirect route path

* feat: Support server capability list (#9117)

* support server capability list

* fix type issue

* feat: integrate rjsf (#9120)

* feat: custom rjsf theme (#9125)

* feat: Add basic response pane for MCP (#9131)

* New List page
* Add a common utility function
* Add response pane ui
* Support events and logs

* feat: support stdio transport (#9135)

* Chore: Move MCP request page into debug router path (#9140)

* refactor mcp page router path
* fix lint issue

* feat: support stdio events, console, and UI (#9142)

* feat: Enhance MCP response pane (#9144)

* support notification panel
* adjust code from rebase
* preview issue

* fix rebase issue of duplicate close

* feat: support resource&prompt calling (#9148)

* feat: support resource&prompt calling

* fix: hide editor for resource template

* change method detection logic

* remove unuse code

---------

Co-authored-by: Kent Wang <kent.wang@konghq.com>

* fix: classNames

* fix message issue

* feat: add access grant modal for stdio transport (#9149)

* feat: disable sync&export for mcp (#9155)

* feat: store params in mcp payload model (#9153)

* feat: store params in mcp payload model

* fix: useLatest

* fix: merge import statement

* update

* update

* add hint for server list update (#9160)

* fix: parse value (#9161)

* fix: base select placeholder

* feat: complete the existing auth for mcp client (#9159)

* feat: Change observer pattern for mcp events and enable auto selection (#9165)

* change polling method
* auto activate latest event for mcp
* support showing error details for mcp

* Feat: add MCP tab - [INS-1354] (#9166)

* feat: support mcp tab

* feat: mcp tab

* custom ui form mcp tab

* fix: mcp tab name

* support filter (#9169)

* fix: resource template

* feat: add roots support for mcp client (#9175)

* add mcp roots pane
* support filter and activate tabs automatically
* basic implement of roots in main

* fix: text color

* feat: support mcp auth flow (#9178)

* customize more template (#9177)

* customize more template

* fix

* delete unuse props

* make call tool button sticky to top

* feat: hide duplicate (#9187)

* fix: hide runner & hide send button & avoid multiple connect (#9186)

* fix: mcp multiple tab issue (#9185)

* fix multiple tab issue
* clear resource subscription when mcp connection closed.
* Do not allow subscription when not connected

* fix: mcp issues (#9196)

* add missing libs

* 1.fix type issue

* fix type issues

* fix: UX improvement for mcp client (#9229)

* fix call tool data issue
* add api key auth

* fix: params overview (#9233)

* update size issue

* update rebase issues

* feat: add mcp segment events (#9240)

* feat: revise the message in the MCP auth confirmation modal (#9241)

* Escape tabs and new lines for CodeMirror display (#9245)

* update sse main process issue

* Fix: MCP workspace creation issue in Git sync (#9263)

* add unique ids

* fix issues (#9270)

* fix: get valid mcp stdio PATH env (#9269)

* fix issues from comment

* fix: consistent the auth grant type naming style

* 1.fix issues from comment

* fix: support the encrypt auth flow for mcp auth (#9289)

* code clean

* fix: fix status indicator in the stdio response history (#9304)

* fix: mcp disconnection (#9303)

* fix from comments

* update package-lock

---------

Co-authored-by: Kent Wang <kent.wang@konghq.com>
Co-authored-by: Bingbing <ZxBing0066@gmail.com>
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.

3 participants