Commit graph inspector/server
Author SHA1 Message Date
claude[bot]
7f6e5792b2 Bump version to 0.19.0 across all packages
- Updated version in root package.json
- Updated version in cli/package.json
- Updated version in client/package.json
- Updated version in server/package.json
- Updated workspace dependencies in root package.json
- Updated package-lock.json via npm install

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2026-01-21 12:37:36 +00:00
Copilot
da684d0a9d
Update LICENSE and package.json for Linux Foundation transition (#1018)
* Initial plan

* Update LICENSE to Apache 2.0 + MIT + CC-BY-4.0 hybrid license for Linux Foundation transition

Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>

* Update package.json license fields to reference LICENSE file

Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: olaservo <16480113+olaservo@users.noreply.github.com>
Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
2026-01-19 09:33:43 -07:00
Cliff Hall
8cb845798e
Merge branch 'main' into inspector/error-popup 2026-01-09 15:52:22 -05:00
olaservo
66b84b0431 Update minimum SDK version to ^1.25.2 in package.json files
Ensures fresh installs without lock file get the patched version.

🦉 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:51:05 -07:00
Cliff Hall
1977e2a597
Merge pull request #966 from olaservo/fix/streamable-http-401-handling
fix: detect 401 errors from StreamableHTTP transport for OAuth flow
2025-12-13 18:04:34 -05:00
cliffhall
96e256687e Bump TS SDK version to 1.24.3 2025-12-13 12:01:40 -05:00
olaservo
b3a27297c8 chore: bump version to 0.18.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 08:08:44 -07:00
olaservo
d1fcbd2c93 fix: detect 401 errors from StreamableHTTP transport for OAuth flow
The server-side error handling only checked for SseError instances
when detecting 401 responses from MCP servers. StreamableHTTPClientTransport
throws a different error type (generic Error with "HTTP 401" message)
when there's no authProvider configured.

This caused the proxy to return 500 instead of 401 to the client,
preventing the OAuth discovery and redirect flow from triggering.

Added is401Error() helper that checks for:
- SseError with code 401
- StreamableHTTPError with code 401
- Generic Error with "HTTP 401" or "(401)" in message

Fixes #960

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 07:22:29 -07:00
cliffhall
124e73311a Bump version to 0.17.5 2025-12-04 09:46:13 -05:00
Felix Weinberger
fe57d7e952
fix: proper stream cleanup and transport close on disconnect
1. createWebReadableStream: Add closed flag and cancel() callback to
   prevent double-close crashes when SSE streams end. This fixes the
   "Controller is already closed" error that occurs when the SDK calls
   response.body.cancel() on 202 responses.

2. DELETE handler: Call serverTransport.close() after terminateSession()
   to properly cleanup the transport and cancel pending reconnections.
   - terminateSession() notifies the server (sends DELETE request)
   - close() cleans up client-side resources (abort controller, timeouts)
   - Both are needed for a complete disconnect
2025-11-28 19:39:49 +00:00
olaservo
54a9e7a8b8 Bump version to 0.17.4
Version 0.17.3 had TypeScript build errors that prevented successful builds. This patch release fixes those errors and bumps the version to 0.17.4.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 06:38:44 -07:00
olaservo
3930bdd700 Bump version to 0.17.3 2025-11-12 18:29:41 -07:00
olaservo
d99a3576b1 chore: bump version to 0.17.2
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 08:23:24 -07:00
cliffhall
742fd8e18d Bump TS SDK to latest + npm audit fix
* In package.json under cli/, client/, server/ and /
  - bump @modelcontextprotocol/sdk to ^1.20.1
* In client/package.json
  - bump @vitejs/plugin-react to ^5.0.4
  - bump vite to ^7.1.11
* In package-lock.json
  - bump playwright to 1.56.1
  - cascading changes to rollup and other dependencies
2025-10-21 12:17:56 -04:00
Cliff Hall
68788fcdae
Merge branch 'main' into inspector/error-popup 2025-10-18 14:49:40 -04:00
John Howard
2bfbdca485 Add a toast on connection error
When failing to connect to an MCP server, its very hard to understand
why. There is only an opaque "Connection Error" message with no
additional info. This also doesn't change at all on repeated attempts,
so there is no indication we attempted again and failed.

This change introduces a `toast` to visualize the error, and adds the
`cause` into the error message for further debugging
2025-10-13 08:22:15 -07:00
olaservo
8fab47668d Bump version to 0.17.1 2025-10-12 21:02:52 -07:00
cliffhall
0a60c58d4f Bump Inspector version to 0.17.0
- New feature: Connection Type
- Reverts "fix: filter out client_secret when storing OAuth client information"
- Fixes STDIO "Headers is undefined" message when connecting to an SSE server.
2025-09-30 15:41:09 -04:00
Ola Hungerford
801f650faa
Merge branch 'main' into claude/issue-807-20250916-0337 2025-09-17 14:48:01 -07:00
cliffhall
f1e93e0475 * In server/index.ts
- in createCustomFetch function
    - convert finalHeaders to headers object for node-fetch compatibility
    - for SSE streams, convert node stream to response body to web ReadableStream since EventSource polyfill expects web-compatible stream

* In package-lock.json and package.json
  - add node-fetch as a dependency

This fixes #600
2025-09-17 14:45:58 -04:00
claude[bot]
7b338b3ea3 chore: bump version to 0.16.8
Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2025-09-16 03:39:40 +00:00
cliffhall
51d28cd7b4 When the client sends a request, do not pass on the mcp-session-id header for the Client <-> Proxy connection. This causes a problem for stateless SSE or StreamableHttp connections. 2025-09-15 18:09:44 -04:00
Jeetul Samaiya
f36c649bb9
Merge branch 'main' into main 2025-09-15 19:30:18 +05:30
claude[bot]
1c5f5e4839 chore: bump version to 0.16.7
Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2025-09-12 14:30:54 +00:00
cliffhall
ca26a4f7a9 Bumped TS SDK in all the packages to ^1.18.0 2025-09-11 16:41:03 -04:00
jeetul.samaiya
cb8c45456b refactor: improve code formatting and readability across multiple files 2025-09-09 13:44:57 +05:30
jeetul.samaiya
c5acc63129 Add support for custom headers and migrate from legacy auth
- Introduced CustomHeaders component for managing custom headers.
- Updated Sidebar to include CustomHeaders component.
- Enhanced useConnection hook to handle custom headers and legacy auth migration.
- Added tests for custom headers functionality.
- Updated package.json and package-lock.json for new dependencies.
2025-09-09 13:44:57 +05:30
cliffhall
2f420c4edf A new updateHeadersInPlace function *mutates* the original header object instead of replacing it. This ensures that transports holding a static reference, like SSEClientTransport, always see the latest headers.
* In `src/server/index.ts`,
  - Added `updateHeadersInPlace` helper function to solve the stale header reference issue in `SSEClientTransport`. It mutates the header object in-place, ensuring the transport sees all updates, while carefully preserving the original `Accept` header required by the transport.
  - in `/mcp GET`, `/mcp POST`, and `/message POST`, use `updateHeadersInPlace` to replace current headers with new headers, retaining the Accept header.
2025-09-06 15:51:43 -04:00
cliffhall
1896f2001e Implement dynamic header injection for proxy transports. Fixes #679
Adds a mechanism to dynamically inject and update HTTP headers for ongoing proxy sessions, resolving an issue where headers introduced after the initial handshake (e.g, Mcp-Protocol-Version) were not being forwarded to the server.

The core problem was that the `transportToServer` instance was created once with a static set of headers. This meant that critical, dynamically added headers like `mcp-protocol-version` and `last-event-id` were being dropped in subsequent requests.

The solution implemented here is to wrap the `fetch` function used by the HTTP-based transports (`StreamableHttp` and `SSE`). This custom wrapper merges the latest headers from the client with the headers of each outgoing request from the proxy, ensuring all headers are preserved for the lifetime of the session.

Changes:

In `src/index.ts`:
  - Added `sessionHeaderHolders`, a `Map` to store the most recent set of headers for each active session ID.
  - Added `createCustomFetch`, a new helper function that creates a `fetch` wrapper. This wrapper merges the session headers from `sessionHeaderHolders` with the request-specific headers from the SDK (like `Content-Type`)
  - In `createTransport`, use `createCustomFetch` for both the `StreamableHTTPClientTransport` and `SSEClientTransport`. This injects the dynamic header logic into the transport layer.
  - In `/mcp`, `/sse`, `/message` route handlers, added logic to update the `sessionHeaderHolders` map with the latest headers from every incoming client request.
  - Added cleanup logic to the `onsessionclosed` callback and the `/mcp` DELETE handler to remove session data from `sessionHeaderHolders`.
  - In `getHttpHeaders`, more robust handling of `string[]` and `undefined` values from `req.headers`, satisfying the `"strict": true` TypeScript configuration.
2025-09-06 14:05:24 -04:00
cliffhall
31dd05634e Bump version to 0.16.6 2025-09-03 10:21:29 -04:00
cliffhall
6db41c19d5 * In all package.json and package-lock.json,
- set TS SDK to 1.17.5, which has the automatic log level handling
* In useConnection.ts
  - push the logging/setLevel message onto the message history stack so it is clear in the Inspector that it has been sent.
2025-09-02 16:17:04 -04:00
Richard Michael
61db7918af Align similar /sse and /stdio handlers: formatting and move log statement 2025-08-22 00:47:40 -07:00
Richard Michael
3628abca9e Use MCP_PROXY_FULL_ADDRESS for SSE transport backed endpoints
The STDIO and SSE transports use SSE between the client and the proxy
server.  SSE requires the client to initiate the MCP conversation
(event-stream) at the endpoint provided by the server.  The endpoint
provided by the server must obey where the client sees the server,
rather than being assumed to be server-root `/message`.

The Streamable HTTP endpoint does not need the full proxy address
because the response is an event-stream directly, and does not use SSE.
2025-08-21 23:11:08 -07:00
Ola Hungerford
f22aa1f5e2
Merge pull request #741 from cliffhall/stderr-handling
Handling of stderr on STDIO servers
2025-08-21 19:10:19 -07:00
cliffhall
4cf7aeb9ed proper levels for server shutdown messages 2025-08-21 19:08:51 -04:00
cliffhall
fb0b56505a Trim message before sending to client 2025-08-21 18:55:58 -04:00
cliffhall
c54215252e Trim message before sending to client 2025-08-21 18:40:19 -04:00
cliffhall
f472327ea0 Trim message before sending to client 2025-08-21 18:12:38 -04:00
cliffhall
ec99372d92 * Remove handling of out-of-spec 'notification/stderr' messages. It's not a thing. See https://github.com/modelcontextprotocol/servers/pull/2469
* Inspect the stderr output of STDIO servers and attempt to assign an appropriate RFC 5424 Syslog Protocol level before sending a leveled logging message to the client
2025-08-21 18:04:07 -04:00
cliffhall
9dbd5cc85b * Remove handling of out-of-spec 'notification/stderr' messages. It's not a thing. See https://github.com/modelcontextprotocol/servers/pull/2469
* Inspect the stderr output of STDIO servers and attempt to assign an appropriate RFC 5424 Syslog Protocol level before sending a leveled logging message to the client
2025-08-21 18:01:29 -04:00
Ola Hungerford
0e30df8801
Merge branch 'main' into fix-704-trim-command-whitespace 2025-08-19 21:12:41 -07:00
cliffhall
2f93d70364 bump version to 0.16.5 2025-08-18 11:37:41 -04:00
cliffhall
28c0bf176a Update Typescript SDK version to latest 2025-08-18 11:13:49 -04:00
Ola Hungerford
44b4417951
Merge branch 'main' into reverse-env-order-for-cli-stdio 2025-08-18 06:57:16 -07:00
Richard Michael
9a1540c79a Trim whitespace from command query parameter 2025-08-14 14:25:51 -07:00
olaservo
b6af0c7f67 bump @modelcontextprotocol/sdk version to ^1.17.2 in all package.json files 2025-08-13 11:06:13 -07:00
olaservo
ca913eb06f Bump to 0.16.4 2025-08-12 20:16:06 -07:00
Ola Hungerford
62926b61ff
Merge branch 'main' into bump-version 2025-08-08 18:35:10 -07:00
olaservo
b89b10beac Bump version 2025-08-08 15:46:58 -07:00
Felix Weinberger
7ea47c0caa
Fix transport type propagation from CLI to web client
- Add --transport and --server-url support to client/bin/start.js
- Pass transport configuration through server to client via /config endpoint
- Update client App.tsx to use defaultTransport and defaultServerUrl from server
- Ensure SSE and HTTP transport configs work properly from CLI
2025-08-05 19:38:44 +01:00