Commit graph

1,922 commits

Author SHA1 Message Date
Bill Lau
068ad016c7
Merge branch 'main' into fixWrongRoleValue 2025-09-13 04:26:08 +08:00
Cliff Hall
2352993106
Merge pull request #799 from modelcontextprotocol/claude/issue-792-20250912-1429 0.16.7
chore: bump version to 0.16.7
2025-09-12 10:56:13 -04:00
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
Ola Hungerford
cbdc50415c
Merge pull request #798 from cliffhall/bump-ts-sdk-to-1.18.0
Bump TS SDK to 1.18.0
2025-09-12 07:24:11 -07:00
cliffhall
ca26a4f7a9 Bumped TS SDK in all the packages to ^1.18.0 2025-09-11 16:41:03 -04:00
bill lau
89f6945ee4 fix wrong role default value 2025-09-11 17:24:07 +08:00
Jeetul Samaiya
743bb52d92
Merge branch 'main' into main 2025-09-11 12:12:33 +05:30
David Soria Parra
f1c78fdde7
fix prettier 2025-09-10 20:40:49 +01:00
jeetul.samaiya
90ab419d12 fix: enhance error handling for custom headers and improve test coverage for header management 2025-09-10 21:01:24 +05:30
Ola Hungerford
2f2dd4c083
Merge pull request #789 from wei/fix-copy-toast
fix: toast message when copying server entry for a Streamable HTTP transport URL
2025-09-10 08:20:24 -07:00
jeetul.samaiya
fde55efc2f fix: standardize formatting in bug report issue template 2025-09-10 18:50:15 +05:30
dependabot[bot]
a1e04c72fe
Bump vite in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.3.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 02:14:39 +00:00
jeetul.samaiya
6f727b6662 fix: update error handling in JSON parsing and add ESLint rule for unused variables 2025-09-09 13:44:57 +05:30
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
David Soria Parra
b476ece67e
Update issue templates 2025-09-08 11:50:36 +01:00
Ola Hungerford
9e4bbab776
Merge pull request #787 from cliffhall/dynamic-headers
Implement dynamic header injection for proxy transports.
2025-09-07 22:03:34 -07:00
Wei He
1207834b7e
docs: add streamable transport examples 2025-09-07 00:27:56 -04:00
Wei He
0caaeed9ce
docs: add streamable transport examples 2025-09-06 23:57:16 -04:00
Wei He
d728d54614
fix: toast message when copying server entry for a Streamable HTTP transport URL 2025-09-06 23:47:54 -04:00
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
Cliff Hall
ec84e21556
Merge pull request #786 from max-stytch/max/fix-url-serialization
fix: correct authState.authorizationUrl type to URL
2025-09-06 11:16:30 -04:00
Max Gerber
71583caf3b
fix: correct authState.authorizationUrl type to URL 2025-09-05 18:40:48 -07:00
Jean-Marc Le Roux
4e385ee744
Merge branch 'main' into fix/optional-arrays-issue-771 2025-09-05 11:33:49 +02:00
Cliff Hall
7792125a02
Merge pull request #781 from ln-12/clear_history_and_notification_panel
feat: add clear buttons for request history and server notifications
2025-09-04 16:04:43 -04:00
lorenzo.neumann
801ae28ecb feat: add clear buttons for request history and server notifications
fixes #780
2025-09-04 13:37:19 +02:00
Jean-Marc Le Roux
ef219c3a54
Merge branch 'main' into fix/optional-arrays-issue-771 2025-09-04 00:13:23 +02:00
Ola Hungerford
377211061b
Merge pull request #777 from cliffhall/bump-version-to-0.16.6 0.16.6
Bump version to 0.16.6
2025-09-03 08:33:17 -07:00
cliffhall
31dd05634e Bump version to 0.16.6 2025-09-03 10:21:29 -04:00
Ola Hungerford
062cea1d55
Merge pull request #774 from cliffhall/auto-level-handling
Auto log-level handling support
2025-09-02 22:02:46 -07: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
Jean-Marc Le Roux
3904df7915
Merge branch 'main' into fix/optional-arrays-issue-771 2025-09-01 22:11:42 +02:00
Alejandro Borbolla
2fd781ab81
fix: CI by removing unused useEffect 2025-09-01 18:32:16 +02:00
Alejandro Borbolla
16e0077090
fix: Assess PR comments (typo) 2025-09-01 18:31:52 +02:00
Ola Hungerford
e1d311c6e1
Merge pull request #739 from nsheaps/main
fix: correct stdout buffering issues in spawned processes
2025-09-01 09:22:32 -07:00
Cliff Hall
05b279a2e6
Merge pull request #768 from olaservo/cli-header-followups
Add CLI header integration tests and update test scripts
2025-09-01 11:04:42 -04:00
Cliff Hall
d22a8a696a
Merge branch 'main' into cli-header-followups 2025-09-01 10:58:17 -04:00
Ola Hungerford
eaf16a780b
Merge pull request #703 from phuctm97/update-dependencies
`tailwindcss-animate` should be a dev dependency
2025-09-01 07:53:40 -07:00
Cliff Hall
9255ce045a
Merge branch 'main' into update-dependencies 2025-09-01 10:51:22 -04:00
Ola Hungerford
80ab4dcc28
Merge branch 'main' into main 2025-09-01 06:52:44 -07:00
lorenzo.neumann
77a1b426a4 Fixed spacing 2025-09-01 11:07:14 +02:00
Jean-Marc Le Roux
efba8e43ec
Merge branch 'main' into fix/optional-arrays-issue-771 2025-09-01 10:30:09 +02:00
Ola Hungerford
244109402c
Merge pull request #745 from pavan-mellamputi-socure/update-progress-method
Fix a typo in progress notification method name
2025-08-31 20:58:06 -07:00
Ola Hungerford
6505468fbe
Merge branch 'main' into alejandro.borbolla/copy-input 2025-08-31 20:38:40 -07:00
Ola Hungerford
8971add002
Merge branch 'main' into update-dependencies 2025-08-30 06:59:48 -07:00
Jean-Marc Le Roux
409ac3945d fix: return undefined for optional objects instead of empty objects
- Update generateDefaultValue to return undefined for optional object parameters
- Add comprehensive tests for required vs non-required objects
- Fixes issue where MCP Inspector sends empty objects {} for optional parameters
- Objects with required properties still return populated objects
- Empty optional objects now return undefined to be omitted from requests

Refs #771
2025-08-30 14:46:34 +02:00
Jean-Marc Le Roux
3cdb4bd744 fix: return undefined for optional arrays instead of empty arrays
- Update generateDefaultValue to return undefined for optional array parameters
- Add comprehensive tests for required vs non-required arrays
- Fixes issue where MCP Inspector sends empty arrays [] for optional parameters
- Resolves compatibility issues with OpenAPI servers expecting omitted optionals

Refs #771
2025-08-30 14:45:29 +02:00
Cameron Roberts
4a7ae16ffd
Merge branch 'main' into tool-search 2025-08-29 16:51:20 +01:00
lorenzo.neumann
1c406eafbd Added UI to provide additional _meta values 2025-08-29 15:52:31 +02:00