Commit graph kotlin-sdk/src
Author SHA1 Message Date
Pavel Gorgulov
0cff2ca718
add ios and wasm targets (#81)
* add wasm and ios targets

* add yarn.lock file to gitignore

* clean up code

* fix typo in method name

* add wasm server example

* update jrelease publishing for klibs

* update gradle-publish workflow to use macos runner

* update README to reflect multiplatform support and clarify server setup for JVM and WASM

* remove the old main file from the kotlin-mcp-server example

* update api dump

* Refactor `build.gradle.kts`

* clean up imports and remove unnecessary charset specification in tests

* add JS target configuration and update API dump
2025-05-29 05:01:50 +00:00
adamglin0
7ce665b931
fix: Remove @SerialName annotation for inputSchema (#105)
* Remove unused @SerialName annotation for inputSchema

* update test
2025-05-27 07:03:31 +00:00
Vaibhav Raj
782b525f27
nit: apply requestBuilder headers when rpc messages (#96)
fixes: #63

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-05-13 13:36:41 +00:00
Theeraphol Wattanavekin
5fa378c49d
Make McpJson public to allow flexible protocol development (#103) 2025-05-13 06:54:57 +00:00
shiqicao
fb568bbcab
fix(client) add encodeDefault for field with non spec default value (#99)
* fix(client) add encodeDefault for field with non spec default value

* add test
2025-05-09 06:52:40 +00:00
shiqicao
9341f1e42f
fix(client): serialize inputSchema as input_schema (#97) 2025-05-06 06:39:12 +00:00
SeanChinJunKai
9f00f22596
feat: Add audio type according to 2025-03-26 spec (#68)
* feat: Add audio type according to 2025-03-26 spec

* chore: update documentation

* feat: add unit test

* chore: commit api dump

* feat: Add audio type according to 2025-03-26 spec

* chore: update documentation

* feat: add unit test

* chore: rebase and commit api dump

---------

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-04-30 12:58:05 +00:00
SeanChinJunKai
b60e12af8f
feat: add message field to ProgressNotification according to 2025-03-26 spec (#69)
* feat: add message field to ProgressNotification to provide descriptive status updates

* chore: commit api dump

---------

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-04-30 07:42:19 +00:00
Stream
129731c34c
feat(server): add utility functions for CallToolResult (#73)
* feat(server): add utility functions for CallToolResult

CallToolResult.Companion.ok and CallToolResult.Companion.error

* test(server): add unit test for `CallToolResult.Companion.ok`and `CallToolResult.Companion.error`

* feat: update api dump

---------

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-04-30 04:34:43 +00:00
JiHwan Oh
d7b31aa37b
feat(server): Support removing tools, prompts and resources (#85)
* Add removing APIs for tools, prompts and resources

* Add remove tests

* API dump
2025-04-30 04:30:16 +00:00
Konstantin Aleev
dc5c155761
Skip empty lines (#89) 2025-04-29 12:09:03 +00:00
Pavel Gorgulov
63a50c1bf4
Update to Kotlin 2.1.20 and minor refactoring (#78)
* update kotlin version to 2.1.20

* change atomics from atomicfu to kotlin.concurrent

* refactor to use the writechannel

* cancel job and close channel
2025-04-17 09:54:08 +00:00
SeanChinJunKai
63288ea63a
Add specific error handling for client connect (#64)
* feat: add specific error handling for client connect

* chore: fix typo

* feat(tests): Add unit test for client connect function

* feat: remove else block to improve readability

* feat: remove unneeded file

* feat: revert change to misc.xml

---------

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-04-10 14:23:35 +00:00
Pavel Gorgulov
1c5e54936d
Refactor onCloseCallback to onClose and update related usages across the codebase (#62) 2025-03-26 14:04:28 +00:00
이용진
1fbf819ac5
Change ErrorCodeSerializer descriptor kind (#54)
* Change descriptor to INT for correct serialization

* Remove @OptIn(ExperimentalSerializationApi::class)

bacause The opt-in annotation is redundant: no matching experimental API is used

---------

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-03-26 09:05:43 +00:00
Abdullatif Ghajar
be4f9c37e0
Test and fix #52 (#53)
* Add test to reproduce #52

* Solve issue #52 by improving url handling in SseClientTransport

* Remove unnecessary url processing

---------

Co-authored-by: Abdullatif.Ghajar <abdullatif.ghajar@jetbrains.com>
2025-03-26 08:29:48 +00:00
Adithya Kamath
7d2e993b96
Remove the double bang operator and replace it with a null check instead. (#49)
2. add try catch in the block for transport send in acatch block

Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
2025-03-12 09:48:21 +00:00
Jose Flores
78ef0f9e2b
Process JSONRPCRequest with default param (#42) (#46) 2025-02-23 08:40:05 +00:00
Kazik Pogoda
0d6fa860cd
Add support for testing JSON serialization of the mcp API (#45)
* Add kotest-assertions-json dependency + ToolSerializationTest

* ToolSerializationTest update
2025-02-21 17:21:14 +00:00
Alexander Sysoev
de5ef4460f
Modify SSE config for server (#23)
* Fixed compilation

* Added `mcp` Ktor server route alongside Application extension

* Fix AbstractTransport to not skip messages
2025-01-24 12:31:32 +00:00
Leonid Stashevsky
8426228bf8
Migrate to kotlin style callbacks. Close #14 (#36) 2025-01-14 16:24:55 +01:00
Pavel Gorgulov
e8c2f007a5
Migrate project to Multiplatform (KMP) (#22)
* Migrate to Kotlin multiplatform

* Fix publication

* Switch to using `alias` for the AtomicFu plugin

---------

Co-authored-by: Alexander Sysoev <Alexander.Sysoev@jetbrains.com>
2025-01-07 10:26:16 +01:00
Sergey Ignatov
67d1f7775a
Cleanup API (#29) 2024-12-23 17:14:24 +01:00
Sergey Ignatov
be6e47391f
Rewrite properties in idiomatic Kotlin, fix #21 (#28) 2024-12-23 09:05:12 +01:00
Sergey Ignatov
772195b5e6
Drop generics from Protocol class (#30)
The generic types in the Protocol class were not providing significant value and made
the code more complex. This change simplifies the API by removing these generic
parameters while maintaining the same functionality.
2024-12-23 09:04:06 +01:00
Sergey Ignatov
9931b1e666
Fix the difference in error handling between Kotlin and Typescript implementations in onClose (#31)
Makes the error handling behavior consistent between Kotlin and TypeScript
implementations when handling connection closure events.
2024-12-23 09:03:35 +01:00
Sergey Ignatov
16f60b4bc4
Accept requestID as a string #25 (#26) 2024-12-22 08:43:46 +01:00
Konstantin Aleev
512e7b65aa
Add required field to tool input (#24) 2024-12-21 20:38:19 +01:00
leonid.stashevsky
1f32a72b6c Change content permission and ignore wesocket test 2024-12-17 16:41:20 +01:00
Leonid Stashevsky
74dbce4fcf
Disable test to make the release (#18) 2024-12-17 13:29:45 +01:00
Leonid Stashevsky
215effb7d6
Update package name across the project (#2)
* Change package name

* Update publication

* Update docs

* Update settings.gradle.kts, README and CONTRIBUTING

* Cleanup leftovers
2024-12-17 07:28:51 +01:00
Alexander Sysoev
9e71ab0b21
fix compilation (#1) 2024-12-16 21:30:17 +01:00
Alexander Sysoev
852a4a3d5e
Enable Explicit Api (#21) 2024-12-16 20:59:53 +01:00
Alexander Sysoev
5d1854723b
Added Space Packages Publication (#9) 2024-12-16 14:38:53 +01:00
leonid.stashevsky
7b32c3e3da Initial commit 2024-12-15 20:17:55 +01:00