Commit graph typescript-sdk/src/shared
Author SHA1 Message Date
Inna Harper
71d309d0d8
Merge pull request #477 from nichtsam/pr/protocol-overwriting-transport-hooks
Pr/protocol overwriting transport hooks
2025-06-26 14:04:16 +01:00
Konstantin Konstantinov
924c1ce56b
Merge branch 'request-propagation-in-tools' of github.com:KKonstantinov/typescript-sdk into request-propagation-in-tools 2025-06-25 16:25:09 +03:00
Konstantin Konstantinov
606c278668
clean up tests - remove mockRequestInfo 2025-06-25 16:24:30 +03:00
Konstantin Konstantinov
384095c30b
Merge branch 'main' into request-propagation-in-tools 2025-06-25 14:16:18 +03:00
Chris Dickinson
05d98bb3a4
feat(shared/auth): support software_statement in OAuthClientMetadata (#696)
Per [Section 3.1.1][ref], `software_statement` is an OPTIONAL member
of the client creation request, which may contain a JWT encoding claims
about client software.

[ref]: https://datatracker.ietf.org/doc/html/rfc7591#section-3.1.1
2025-06-25 11:20:26 +01:00
Konstantin Konstantinov
166da76b00
extra parameter - remain optional for backwards compatibility 2025-06-24 19:39:37 +03:00
Konstantin Konstantinov
96ff8573cf
Merge branch 'main' into request-propagation-in-tools 2025-06-24 17:21:09 +03:00
Samuel Jensen
9edb619600 make protocol class not overwrite existing hooks when connecting transports 2025-06-20 19:59:30 +02:00
Paul Carleton
87da0e0c3a
adjust default validation for resource parameter in client flow, and server example 2025-06-19 17:52:24 +01:00
Inna Harper
90569d885f
Merge pull request #638 from modelcontextprotocol/ochafik/auth-resource
RFC 8707 Resource Indicators Implementation
2025-06-18 17:34:37 +01:00
ihrpr
741a201a3d
remove hasCustomTitle 2025-06-17 12:35:29 +01:00
Olivier Chafik
224a2e242d
update resource to be a url 2025-06-17 00:18:33 +01:00
Olivier Chafik
02ce81b90c
simplify diff 2025-06-16 23:10:27 +01:00
Olivier Chafik
1f4e42c09e
cleanup auth-utils and remove example files
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 20:05:02 +01:00
Olivier Chafik
7b5bfcee52
implementation of RFC 8707 Resource Indicators (Fixes #592, Fixes #635) 2025-06-16 19:29:04 +01:00
ihrpr
54c30109fb
Merge branch 'main' into ihrpr/elicitation 2025-06-16 19:11:57 +01:00
Konstantin Konstantinov
71abccb874
Merge branch 'main' into request-propagation-in-tools 2025-06-16 18:51:44 +03:00
ihrpr
d1c94a2c69
refactor 2025-06-16 10:43:31 +01:00
ihrpr
4d03b243e3
add title 2025-06-15 20:42:25 +01:00
Konstantin Konstantinov
e714050642
Merge branch 'main' into request-propagation-in-tools 2025-06-14 01:10:58 +03:00
Konstantin Konstantinov
db9ba7b419
raw request propagation in tools - implementation, unit tests, types 2025-06-14 01:08:02 +03:00
Olivier Chafik
33257f14d4
switch to optional Transport.setProtocolVersion 2025-06-13 13:36:04 +01:00
Olivier Chafik
84971c83ea
Set Mcp-Protocol-Version in client requests after init, and warn when it doesn't match negotiated version (it SHOULD match) 2025-06-11 17:29:09 +01:00
ihrpr
eed97c9d17
Merge branch 'main' into ihrpr/elicitation 2025-06-10 14:43:35 +01:00
ihrpr
cdcb00975c
fix build and add tests 2025-05-29 14:59:47 +01:00
PapacyDai
49777d5652
fix: Ensure _meta object is not lost when onprogress option is passed
When the onprogress option is passed, the _meta object in the request
params was being overwritten, causing any existing _meta content to be lost.
2025-05-29 15:15:52 +08:00
ihrpr
04cbbfbb0d
elicitation example 2025-05-21 16:59:37 -04:00
Itsuki
69dbfac0e4
Feat: Separate authorization server and resource server on client auth flow (#416)
* add type and schema for protected resource metadata

* add private variable to keep track of
authorization server url to avoid fetching Protected Resource Metadata every time

* change auth flow to use authroization server and
add function to discover protected resource metadata

* add/modify tests for new added auth functions

* modify test to use the authorization server

* remove unused variable

* add resource parameter when building auth url

* Change resource to use the protected resource metadata

* resolve typo.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* Update src/client/sse.ts import.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove log.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* Update section title.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove log.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* remove resource parameter.

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>

* make backwards compatibile

* s/resourceServerUrl/serverUrl/g for backwards compat

* fix test comment

---------

Co-authored-by: itsuki <itsuki.enjyoy@gmail.com>
Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
Co-authored-by: Paul Carleton <paulc@anthropic.com>
2025-05-21 14:55:38 +01:00
Paul Carleton
ac1b80a331
feat: Add support for separate Authorization Server / Resource server in server flow (spec: DRAFT-2025-v2) (#503)
* add support for .oauth-protected-resource metadata endpoint and www-authenticate

* test and types

* thread throughs scopes

* have example separate AS and RS

* make inmemory explicitly demo

* fix type

* fix types

* fix client example

* fixup comments

* refactor metadata endpoints to cleanup

* almost working w/ forwarding

* separate AS/RS working

* add to readme

* de-async the auth server setup for happier top level flow

* add test for new router

* fix test

* remove redundant comment

* clarify comment

* remove more unused endpoints

* simplify router

* slim down

* simplify verifier, and fix router test

* fix doc string
2025-05-21 13:13:34 +01:00
Basil Hosmer
d37de9b110
Add support for message field in progress notifications
Implements the new optional message field for progress notifications as
defined in the MCP specification update. This allows servers to provide
descriptive status updates alongside progress values.

Changes:
- Add optional message field to ProgressSchema in types.ts
- Add tests for progress notifications with message field
- Update protocol tests to verify message field handling

Refs: https://github.com/modelcontextprotocol/modelcontextprotocol/pull/197

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-16 15:18:28 -04:00
Marcel Samyn
75eb1c431a Pass request _meta to request handlers extra param 2025-04-25 14:42:59 +02:00
Luca Forstner
ec23b71f4e
Pass requestId to handlers via metadata 2025-04-17 11:41:11 +02:00
ihrpr
f9f2ba4717
Merge branch 'main' into ihrpr/resume-long-running-requests 2025-04-15 22:10:58 +01:00
ihrpr
f1c5ef1a8d
apply suggested changes 2025-04-15 20:40:26 +01:00
ihrpr
1359e9fe6a
pull transport send options into own named type 2025-04-15 11:42:16 +01:00
ihrpr
7aeb67988a
improve comments 2025-04-14 09:37:19 +01:00
ihrpr
43cb015844
resume long running requst from new client 2025-04-13 21:40:15 +01:00
Allen Zhou
85e6457b84
Update protocol.ts 2025-04-12 16:47:18 -07:00
Allen Zhou
6f852a1117
Merge remote-tracking branch 'upstream/main' into request-auth-info 2025-04-12 16:41:22 -07:00
Allen Zhou
c4381b857b
Pass extra object instead of authInfo directly 2025-04-12 16:38:55 -07:00
Frédéric Barthelet
4e749dba4d Add isJSONRPCError method 2025-04-10 00:06:07 +02:00
Frédéric Barthelet
8215651552 Add helper functions to distinguish between jsonRPC message types 2025-04-09 23:45:25 +02:00
Allen Zhou
72f46d44c2
Update src/shared/transport.ts
Co-authored-by: Justin Spahr-Summers <justin@jspahrsummers.com>
2025-04-08 12:49:31 -05:00
Allen Zhou
b5b322e859
Merge branch 'main' into request-auth-info 2025-04-07 10:30:00 -07:00
ihrpr
f29cbe7e06
reject session as an array 2025-04-07 16:49:46 +01:00
ihrpr
251bb9d97d
Merge branch 'main' into ihrpr/http-streamable-server 2025-04-07 14:29:09 +01:00
ihrpr
6c1b9ba06a
remove local storage for replaying and remove support for sse connection thought get 2025-04-07 12:12:43 +01:00
Justin Spahr-Summers
44839ee01d
Merge pull request #272 from modelcontextprotocol/revert-249-main
Revert "feat: support extending McpServer with authorization"
2025-04-07 11:17:03 +01:00
Justin Spahr-Summers
b5024bf170
Merge pull request #188 from li-yechao/main
feat: expose variableNames to retrieve all parameters from UriTemplate
2025-04-07 11:16:44 +01:00
Justin Spahr-Summers
4b69f40005
Merge pull request #214 from Shchvova/fixing-for-windows
Fixing for windows terminal forcing \r\n
2025-04-07 11:10:40 +01:00