Commit graph inspector/client/src/lib
Author SHA1 Message Date
Cliff Hall
eda6c05ba1
Merge branch 'main' into feature/elicitations 2025-07-24 11:00:41 -04:00
Ola Hungerford
144755b369
Merge branch 'main' into feature/elicitations 2025-07-23 21:50:48 -07:00
Xiao Yijun
f6c9342678
test: update tests 2025-07-23 07:57:21 +08:00
Xiao Yijun
ee39d56e6d
chore: fix lint issue 2025-07-21 11:26:27 +08:00
Xiao Yijun
91aacba85d
Merge branch 'main' into feat-support-enter-oauth-client-information-manually 2025-07-14 17:24:38 +08:00
Xiao Yijun
3b3205228f
refactor: remove resource config 2025-07-08 10:21:40 +08:00
Xiao Yijun
b8120d9f85
feat: support manual entry of OAuth client information 2025-07-08 09:41:55 +08:00
Ola Hungerford
e106194b40
Merge branch 'main' into completion-support-default 2025-07-07 05:00:52 -07:00
Alex Andru
19ff315dd1 Merge branch 'origin/main' into feature/elicitations
Resolved conflicts by adopting the improved form input handling from main:
- Standardized JsonSchemaType.required to only accept string arrays (JSON Schema standard)
- Adopted enhanced object and array rendering with proper nested support
- Improved boolean field rendering (removed extra wrapper div)
- Enhanced array handling with add/remove functionality
- Simplified required field validation logic

This maintains elicitation functionality while benefiting from the form input fixes.
2025-07-03 16:14:21 +02:00
Paul Carleton
5db64265ce
[auth] Add resource compatibility to debugger (RFC 8707) (#526)
* pass resource in auth debugger, reusing server url

* throw error on resource url mismatch to match regular auth flow

* lint & tests

* add test

* make authserver url make more sense

* use latest typescript sdk

* more lenient resource checking

* pick resource, and store in state

* fixing tests and types

* [auth] use sdk function for selecting resource (#537)

* use sdk function

* bump typescript sdk

* fix some tests
2025-06-23 16:39:07 +01:00
Alex Andru
dfbf10c575 test: elicitation handling 2025-06-19 17:39:24 +02:00
Alex Andru
e163aea0e0 feat: add elicitations to useConnection 2025-06-19 15:03:39 +02:00
Jerome
ef90c58882
Lint 2025-06-14 18:45:14 +01:00
Jerome
ba7b35cbf3
Filling out other required args for FetchLike invocation 2025-06-14 18:43:28 +01:00
Jerome
349e23f992
Fixing signature of eventSourceInit fetch signature 2025-06-14 18:25:16 +01:00
Jerome
760c7e4056
fix: replace require() imports with ES modules in tests
- Replaced all require() imports with proper ES module imports
- Fixed ESLint @typescript-eslint/no-require-imports errors
- Removed unused variable mockGetMCPProxyAddress
- Added proper TypeScript types instead of 'any'
- All tests passing and linting clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 18:11:16 +01:00
Jerome
37cff101b1
test: add tests for X-MCP-Proxy-Auth header implementation
- Added comprehensive test coverage for proxy authentication using X-MCP-Proxy-Auth header
- Tests verify proper header separation between proxy and server authentication
- Fixed transport mocks to properly capture options and headers
- Updated config structure in tests to match production code
- All proxy auth tests now passing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 17:20:30 +01:00
Jerome
fdae89ecbf
fix: use X-MCP-Proxy-Auth header for proxy authentication
Changed proxy authentication to use a custom header (X-MCP-Proxy-Auth) instead of the standard Authorization header. This prevents conflicts when the proxy needs to forward the client's Authorization header to upstream MCP servers.

- Updated client to send proxy auth token in X-MCP-Proxy-Auth header
- Updated server auth middleware to check X-MCP-Proxy-Auth header
- Applies to all transport types (SSE, stdio, streamable-http)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 13:07:02 +01:00
Jerome
3207959af0
Linting 2025-06-13 16:04:25 +01:00
Felix Weinberger
ab062d8f9d
refactor: implement split storage for inspector config
- Add is_session_item field to ConfigItem type to control storage location
- Store auth tokens in sessionStorage (cleared on browser close)
- Store other settings in localStorage (persist between sessions)
- Maintain backward compatibility with existing config structure

This provides better security for auth tokens while preserving user
preferences across browser sessions.
2025-06-11 14:42:40 +01:00
Felix Weinberger
908d0ee36a
feat: add client support for proxy authentication
- Add MCP_PROXY_AUTH_TOKEN configuration field to store session token
- Update useConnection hook to include proxy auth token in all requests
- Add separate proxy auth headers to avoid conflicts with MCP server auth
- Add specific error handling for proxy authentication failures
- Show helpful toast message directing users to Configuration settings
- Update README with instructions for configuring token in UI

The client now properly authenticates with the proxy server using the
session token displayed in the proxy console.
2025-06-10 18:16:32 +01:00
Ola Hungerford
a2d2cf6f3d
Merge pull request #459 from msabramo/resizable-left-sidebar
Resizable left sidebar
2025-06-04 19:58:59 -07:00
Marc Abramowitz
13d31596af Merge branch 'main' into resizable-left-sidebar 2025-06-03 22:29:15 -07:00
Paul Carleton
e2d3989bb2
use scopes from PRM if available 2025-06-03 11:05:45 +01:00
Paul Carleton
9371006838
less noisy errors 2025-06-03 11:02:34 +01:00
Paul Carleton
0f4a289a4d
Merge branch 'main' into pcarleton/auth-debugger-draft 2025-06-02 16:41:44 +01:00
Paul Carleton
2d7936d10b
fix type errors 2025-06-02 16:20:16 +01:00
Cliff Hall
7df0ac40c5
Merge pull request #470 from cliffhall/send-delete-on-streamable-http-disconnect
Send HTTP DELETE on streamable transport disconnect
2025-06-02 10:05:30 -04:00
xiaoli
b51ee625cd style: fix code style to pass CI checks 2025-05-30 10:14:03 +08:00
cliffhall
02aacb46a2 Send HTTP/DELETE when disconnecting client
* In server/src/index.ts
  - add delete handler for /mcp endpoint
    - gets the server transport for the sessionId
    - calls terminateSession on it
    - removes the webapp and server transports for the sessionId from the maps
    - returns status 200 to the client.

* In client/src/lib/hooks/useConnection.ts
  - import Transport
  - add useState for clientTransport, type Transport or null initialized to null
  - in connect() function
    - move creation of client transport down a ways, just before calling client.connect with it
    - immendiately efter calling client.connect, call setClientTransport with the connected transport (has to happen after, so that what's saved has the abort controller, etc. otherwise it doesn't work to save it prior.
    - in disconnect() function
      - immediately call clientTransport.terminateSession if transportType is "streamable-http"
      - setClientTransport to null
2025-05-29 19:54:36 -04:00
Cliff Hall
c186f531b8
Merge branch 'main' into fix/header 2025-05-29 12:01:17 -04:00
Cliff Hall
7fb2211bf2
Merge branch 'main' into fix-port-numbers 2025-05-29 11:41:10 -04:00
Xiaoli
ee8c29b3ad
Merge branch 'main' into fix/header 2025-05-29 23:30:11 +08:00
Paul Carleton
03bb303bf9
rm loading, prm test 2025-05-29 14:10:32 +01:00
Paul Carleton
cc49358f5a
add test + prettier 2025-05-29 13:42:54 +01:00
Paul Carleton
0dbf75a664
store state before redirect 2025-05-29 11:50:09 +01:00
Paul Carleton
82858bed30
show proper authserverurl 2025-05-29 11:17:21 +01:00
Paul Carleton
73fde03aa4
working metadata fetch 2025-05-29 10:56:09 +01:00
Paul Carleton
c6ddcf4c90
fix 2025-05-29 10:11:44 +01:00
Paul Carleton
00893afc0b
wip new metadata 2025-05-29 10:11:44 +01:00
Paul Carleton
befadc0042
very wip draft auth spec support 2025-05-29 10:11:44 +01:00
xiaoli
10e3202832 fix: Fix the issue of accidentally losing 'x-custom-auth-header' 2025-05-29 11:49:57 +08:00
Marc Abramowitz
0a3b994540 npm run prettier-fix 2025-05-27 17:33:51 -07:00
Marc Abramowitz
bff09e0409 Resizable left sidebar
Make left sidebar resizable so long URLs can be viewed in their
entirety.

Fixes https://github.com/modelcontextprotocol/inspector/issues/457

Vibe-coded with Cursor
2025-05-27 17:28:04 -07:00
Frédéric Barthelet
4e6c7f9878 Set completion support to false by default 2025-05-25 16:29:00 -07:00
xiaoli
2870441fea fix: fix review comments, again😉
- Remove unnecessary auth header name check
- Extract operations on headers into a function
2025-05-25 11:17:37 +08:00
ihrpr
014ef7d35e
refactor 2025-05-20 17:25:44 +01:00
xiaoli
13f736033a fix: fix review comments
- Avoid calling .lowerCase twice
- Keep 'Bearer ' prefix when header equals 'Authorization'
- Remove unnecessary Array type checks
2025-05-20 13:10:55 +08:00
xiaoli
618f24a9ac feat: support custom authorization headers, fix #395 2025-05-20 10:38:03 +08:00
ihrpr
2f6a9fca11
format 2025-05-19 19:03:22 +01:00