Kalvin Chau
5087087190
style: fix linting error on String vs string
2025-01-22 09:25:28 -08:00
Kalvin Chau
443c0829ed
feat: add mcp client instruction support
2025-01-22 09:17:59 -08:00
Justin Spahr-Summers
1506bd1b51
Allow capabilities to be dynamically registered after initialization
2025-01-07 14:34:00 +00:00
Chris Dickinson
d55f966562
feat(client/sse): add {EventSource,Request}Init options param
...
This enables users of the SSE client to optionally send cookie-based credentials
to the event source MCP server using `EventSourceInit` [1] parameters and set
the outgoing request headers for the POST call.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource#options
2024-12-30 23:11:00 -08:00
Justin Spahr-Summers
1962943b22
Revert "Remove CompatibilityCallToolResult"
2024-12-04 17:09:31 +00:00
Justin Spahr-Summers
e911ece970
Remove CompatibilityCallToolResult
...
Resolves #82 .
2024-12-03 16:03:26 +00:00
Anaïs Betts
9fd52c861e
Use windowsHide because detached seems to break stdio redirection on npx
2024-11-26 15:41:23 +01:00
Justin Spahr-Summers
1025b3fc55
Add way to get child process stderr pipe
2024-11-20 21:19:06 +00:00
Anaïs Betts
e0c821cad9
Special-case this fix to Electron apps
2024-11-20 15:55:11 +01:00
Anaïs Betts
17a32b14d4
Use detached: true on Windows
...
Unfortunately, the fix in #55 was not sufficient - the behavior of spawn
depends on the "console'ness" of the originally launched process, which has the
effect of development behavior for Claude Desktop on Windows being
different than in production, since the launching process is Claude.exe
(a Win32 Subsystem app) vs `yarn start` which is effectively a Console
Subsystem app.
2024-11-20 14:41:53 +01:00
Justin Spahr-Summers
437a870029
Tests for request timeout
2024-11-16 16:37:24 +00:00
Justin Spahr-Summers
7d50d8ca16
Add missing options to request methods
2024-11-16 15:59:03 +00:00
Justin Spahr-Summers
c3495d2f7a
Merge pull request #56 from modelcontextprotocol/justin/configurable-stderr
...
Make stderr behavior configurable
2024-11-15 13:39:30 +00:00
Justin Spahr-Summers
9db00579b0
Merge pull request #54 from modelcontextprotocol/justin/cancellation
...
Implement cancellation notifications and handling
2024-11-15 13:39:17 +00:00
Justin Spahr-Summers
b59c381abf
Make stderr behavior configurable
2024-11-14 20:13:13 +00:00
Anaïs Betts
8e2e917992
Don't open a terminal window on Windows
2024-11-14 16:11:10 +01:00
Justin Spahr-Summers
6ec4c09325
Add tests for issuing cancellation notifications
2024-11-14 14:11:11 +00:00
Justin Spahr-Summers
1451d0ea24
Explicitly allow cancelled notifications without any capability
2024-11-14 14:07:28 +00:00
Justin Spahr-Summers
54d146bbdc
Support passing an AbortSignal to request()
2024-11-14 13:42:18 +00:00
Justin Spahr-Summers
70cfb0f0d4
Unify error text
2024-11-12 12:17:35 +00:00
Justin Spahr-Summers
8b307a5d62
Check capabilities when request handlers are set
2024-11-12 12:16:43 +00:00
Justin Spahr-Summers
64c2862883
Check and add tests for notification capabilities too
2024-11-12 12:02:10 +00:00
Justin Spahr-Summers
dc45f5d148
Handle capabilities checks at the request() level, make non-strict by default
2024-11-12 10:57:59 +00:00
Justin Spahr-Summers
7ab5880569
Use explicit capabilities lists for now
2024-11-11 22:38:43 +00:00
Justin Spahr-Summers
90e91cdd62
Tests and assertions for client/server capabilities
...
Resolves #45 .
2024-11-11 22:30:50 +00:00
Justin Spahr-Summers
c82d633d8d
Disconnect from client side if initialization fails
...
Resolves #24 .
2024-11-11 22:08:46 +00:00
Justin Spahr-Summers
8ea66e7df9
Tests for protocol version negotiation
...
Resolves #44 .
2024-11-11 22:05:13 +00:00
Justin Spahr-Summers
1f3dbef66c
Support old tools/call result structure, if explicitly opted in
2024-11-07 13:09:20 +00:00
Justin Spahr-Summers
b618157c93
Continue allowing 2024-10-07 in version negotiation
2024-11-07 13:00:52 +00:00
Justin Spahr-Summers
099c2e2be3
Update client and server convenience methods
2024-11-06 11:46:55 +00:00
Justin Spahr-Summers
e95e91a77c
Merge pull request #35 from modelcontextprotocol/justin/conveniences
...
Add convenience methods for issuing requests
2024-11-05 16:54:49 +00:00
Justin Spahr-Summers
2b9b1b73fa
Merge pull request #33 from modelcontextprotocol/justin/custom-requests
...
Fix typing for custom requests, notification, and result types
2024-11-05 16:36:02 +00:00
Justin Spahr-Summers
08b89404a3
Trim Windows list down based on review
2024-11-05 12:10:24 +00:00
Justin Spahr-Summers
3447575417
Inherit environment variables deemed safe by default
2024-11-05 11:56:47 +00:00
Justin Spahr-Summers
12c92341b4
Support onprogress callbacks
2024-11-04 22:38:10 +00:00
Justin Spahr-Summers
3d32ce69df
Convenience methods for Client
2024-11-04 22:38:10 +00:00
Justin Spahr-Summers
f5fa3cf8e3
Oops, ignore more lints
2024-11-04 21:22:05 +00:00
Justin Spahr-Summers
af9df1ff14
Don't actually run request() and notification()
2024-11-04 21:13:00 +00:00
Justin Spahr-Summers
2026260668
Wrap into one test (required)
2024-11-04 21:12:17 +00:00
Justin Spahr-Summers
9774e2fdfe
Disable unused vars lint
2024-11-04 21:10:35 +00:00
Justin Spahr-Summers
7cc7e81387
Support custom client request, notification, and result types
2024-11-04 21:07:41 +00:00
Justin Spahr-Summers
7b718de77c
Report errors when start() is called multiple times
2024-10-16 13:14:47 +01:00
Justin Spahr-Summers
8d80cc53a8
Merge branch 'main' into justin/fix-race-condition
2024-10-16 13:05:05 +01:00
ashwin-ant
05a3e54751
fix protocol version in client
2024-10-14 20:20:52 -07:00
Justin Spahr-Summers
e9c64fbc53
Update tests and CLI
2024-10-11 16:49:22 +01:00
Justin Spahr-Summers
c39f8084d7
Update client transports
2024-10-11 16:49:21 +01:00
Justin Spahr-Summers
42fbfe2ff4
Update Protocol type inference
2024-10-02 22:01:49 +01:00
Justin Spahr-Summers
3ea255f088
Use Zod for message validation at transport layer
2024-10-02 15:06:30 +01:00
Justin Spahr-Summers
3786c88960
Combine types into one file
2024-10-02 14:17:31 +01:00
David Soria Parra
02e421c1f1
Initial import
2024-09-24 21:53:34 +01:00