Commit graph

107 commits

Author SHA1 Message Date
yehorsobko
a0ae212ebf
Improvements and fixes (#223)
Some checks failed
CI / Test (macos-latest, Swift 6.1.0) (push) Has been cancelled
CI / Test (ubuntu-latest, Swift 6.1.0) (push) Has been cancelled
CI / MCP Conformance Tests (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / Linux Static SDK Build (6.1.2 - ubuntu-latest) (push) Has been cancelled
0.12.1
* feat: added http transport context to the task local execution

* fix: added refresh_token to the grantTypes for DCR

* chore: updated documentation
2026-04-29 14:34:21 +03:00
yehorsobko
cb6a62f7c2
feat: auth improvements (#217)
* feat: improvement to oauth resources resolution

* feat: improvements to refreshToken procedure and updates to unit tests

* feat: improvements to documentation of clien_id
2026-04-17 17:34:59 +03:00
Maksym Mova
6132fd4b5b
V0.12.x (#215) 0.12.0
* fix #203 NetworkTransport race, with main-isolated variables (#206)

Co-authored-by: wti <wti@users.noreply.github.com>

* feat/auth: Authentication implementation (#205)

* feat: added authentication

* feat(auth): improvement to error handling

* feat(auth): updated errors and tests in OAuthClientRegistrar

* feat(auth): updated ci conformance package version

* feat(auth): bumped node version

* feat(auth): updated ci conformance step

* feat(auth): improvement to Linux support

* chore: added docc plugin

* chore: added spi yml

* chore: added documentation step to ci

* chore: increased timeout for test from 5 to 10m

---------

Co-authored-by: Paal Øye-Strømme <paal.o.eye@gmail.com>
Co-authored-by: wti <wti@users.noreply.github.com>
Co-authored-by: yehorsobko <yehorsobko@macpaw.com>
2026-03-24 11:05:22 +02:00
yehorsobko
973b46b8f7
feat: 2025-11-25 review fixes (#201)
* fix: review fixes of the latest changes

* fix: updated unit tests

* chore: more conformance compliance improvements

* chore: reverted protocol changes

* chore: more compliance improvements

* chore: more conformance compliance improvements

* chore: improvements to the backcompat and updated to Tool unit tests

* chore: ci update
2026-03-03 17:33:28 +02:00
Maksym Mova
6112a3995a
V0.11.x (#199) 0.11.0
* Support 2025-06-18 Spec (#167)

* Support OpenAI _meta for Tool

* Update init

* Add title and outputSchema

* Concurreny issue

* General fields

* Add Generate Fields to Server elements

* 4 tab spacing

* Update Version

* Elicitation

* Format

* More tests and inits

* Elicitation in README

* Fix orphaned test

* Add title to more structs

* Public init

* Fix meta validation and make tests more generic

* Format and make Result properties public again

* Revert more visibility changes

* feat: 2025-11-25 phase 1, includes Version, Icon, Progress (#181)

* chore: fixed unit tests

* feat: added icon and progess base structs

* feat: added progress notification and meta to callTool

* feat: added tests

* feat: simplified RequestMeta encoding/decoding

* tests: added unit test to track progress

* chore: rebased v0.11.x

* feat: implemented cancellation

* feat: added overloaded callTool method

* fix: encoding Response _meta fix

* chore: added old version to the versions list

* feat: 2025-11-25 phase 2; added Logging and Completions (#196)

* feat: added Logging and Completions

* feat: updated EmbeddedResource for the latest spec

* chore: changed encoding of meta in Prompts to encodeIfPresent

* feat: compliance tests + http server transport (#197)

* feat: http server transport

* feat: added http server transport

* feat: removed unused files

* feat: added conformance tests

* feat: improved conformace testing

* chore: removed redundant files

* feat/2025-11-25: sampling, elicitation, roots (#198)

* feat: Roots implementation

* feat: added unit testing

* feat: improved unit tests and fixed NetworkTransport crash

* feat: implemented sampling and elicitation

* feat: improved sampling tests

* feat: improved elicitation tests

* feat: improved confirmance tests

* feat: improved Prompts unit tests

* feat: removed test code

* feat: updated conformance tests

* chore: removed redundant commas

* chore: removed 6.0.3 swift version from ci

* chore: improved unit tests a little bit

* chore: update README.md

* chore: add server progress tracking example to README.md

* chore: updated README.md

* chore: updated transports table formatting

* chore: updated MockNetworkConnection

---------

Co-authored-by: Austin Evans <austinjevans@me.com>
Co-authored-by: yehorsobko <yehorsobko@macpaw.com>
2026-02-19 13:09:31 +02:00
Den Delimarsky
6fa1a97b41
Add SECURITY.md with GitHub Security Advisories guidance (#200) 2026-02-18 23:09:41 +02:00
adam jones
8eef5fda00
chore: update licensing to Apache 2.0 for new contributions (#177) 2026-01-28 00:03:51 +02:00
Semen Kudriavtsev
c0407a0b52
Add Mac Catalyst to target dependencies for EventSource. (#163) 0.10.2 2025-09-23 13:54:32 -07:00
Yifan Liu
fb6fffbecd
fix: allow description field to be absent from Tool (#159)
* fix: allow description field to be absent from `Tool`
* description field is not a requried field of Tool

* Apply suggestions from code review

* Update Tests/MCPTests/ToolTests.swift

---------

Co-authored-by: Mattt <mattt@me.com>
2025-09-07 04:30:19 -07:00
Mattt
ac90e679cd
Make Tool.description optional (#160)
* Make Tool.description optional

* Make description parameter in Tool initializer optional
2025-09-07 04:24:38 -07:00
Alexey Ivashko
78d187716e
Adopt strict concurrency for project (#157)
* Adopt strict concurrency for project

* Fix one warning related to that

* Add version-specific manifest for Swift 6.0

---------

Co-authored-by: Alexey Ivashko <a_ivashko@apple.com>
Co-authored-by: Mattt Zmuda <mattt@me.com>
2025-09-07 04:21:15 -07:00
Mattt
f1b50e6de2
Update README to document support for Alpine Linux (#153) 0.10.1 2025-08-14 04:37:46 -07:00
Tobias
e019cb6909
Enable building with the Swift Linux SDK (#151) 2025-08-14 04:30:58 -07:00
Mattt Zmuda
e76d61155b
Bump version to 0.10.0 0.10.0 2025-08-10 06:30:53 -07:00
Mattt
0121dccf7e
Add requestModifier property to HTTPClientTransport (#152)
* Add requestModifier property to HTTPClientTransport

Co-authored-by: Tim Wang <tim.wang@ing.com>

* Add test coverage

---------

Co-authored-by: Tim Wang <tim.wang@ing.com>
2025-08-10 06:28:08 -07:00
Eric Marchand
8a50d896c1
docs: fix code example in README.md (#141) 2025-08-10 06:02:15 -07:00
Mattt
7c58239ff6
Revert "Revert "Remove deprecated MCP.Error typealias (#102)" (#104)" (#105)
This reverts commit bc5360ecce.
2025-08-10 05:59:35 -07:00
Pedro Piñera Buendía
778ab33d23
Replace compile-time directives with target platform conditions (#143)
* Replace compile-time directives with target platform conditions

Use Package.swift target platform conditions instead of compile-time #if directives for EventSource dependency. This leverages Swift Package Manager's native dependency support for platform-specific targets at runtime rather than compile-time.

* Update reference for EventSource package

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mattt <mattt@me.com>
2025-08-10 05:52:50 -07:00
Glacio
e2afccdcaa
Add plumbing to set instructions on Server (#145)
* Add plumbing to set instructions on Server

* Use instructions description from MCP schema

---------

Co-authored-by: Peter Liddle <development.peter@liddle.network>
Co-authored-by: Mattt <mattt@me.com>
2025-08-10 05:52:28 -07:00
Mattt
63fd276dbd
Implement in-memory / passthrough transport (#122)
* Implement in-memory / passthrough transport

* Add InMemoryTransport to README
2025-08-10 05:52:20 -07:00
Sébastien Stormacq
9ad382d397
remove info level logging message and use debug instead (#132) 2025-08-10 05:40:56 -07:00
Mattt
f3b9ba4a59
Make Tool.inputSchema nonoptional (#123) 2025-08-10 05:34:47 -07:00
Carl Peaslee
c95d0c0354
Remove Loopwork copyright from license (#148) 2025-07-24 13:54:45 -07:00
Mattt
494b5b55d3
Add configuration for maximum receive buffer size to NetworkTransport (#146) 2025-07-08 14:48:29 -07:00
Mattt
36865fb056
Update inputSchema example usage (#136)
* Update Tool inputSchema in README example usage

* Update inputSchema usage in Tool tests
2025-06-12 02:57:04 -07:00
Mattt
7a76001187
Adjust logging level for frequent / low-level events (#130) 2025-06-05 05:36:37 -07:00
Carl Peaslee
609cdc709b
Add Client.listResourceTemplates method (#125)
* adds listResourceTemplates to client for #124

* add pagination to resources/templates/list

from @mattt

Co-authored-by: Mattt <mattt@loopwork.com>

* adds cursor functionality to ListResourceTemplates

* updates the client method to use the updated signature

---------

Co-authored-by: Mattt <mattt@loopwork.com>
2025-05-30 12:35:34 -07:00
Mattt
14fddc44c4
Move Sampling from Server to Client directory (#121) 2025-05-26 06:36:23 -07:00
Mattt Zmuda
9742933d2f
Bump version to 0.9.0 0.9.0 2025-05-26 06:07:28 -07:00
Mattt
a59b50bf5a
Update Client.connect(transport:) to automatically send initialize request (#100)
* Update Client to automatically call initialize in connect

* Make Client.connect(transport:) return value discardable

* Fix example usage in README

* Update example code in transports to remove initialize call

* Deprecate initialize method

* Update tests

* Update README

* Fix sampling tests

* Fix race condition tests
2025-05-26 06:04:38 -07:00
Mattt
3b505ee575
Improve ergonomics of prompt and sampling message initialization (#120)
* Improve ergonomics of prompt and sampling message initialization

* Deprecate previous / existing Message initializers
2025-05-26 05:25:02 -07:00
Mattt
fac4df6b1a
Add support for sampling (#119)
* Add UnitInterval type

* Add test coverage for UnitInterval

* Add support for sampling

* Add integration tests for sampling
2025-05-26 04:57:24 -07:00
Mattt
ddde66dc08
Add test coverage for base64 data helper methods (#114) 2025-05-26 04:36:13 -07:00
Mattt
fec680a243
Prevent double continuation resumption in client (#113)
* Prevent double continuation resumption in client

Consolidate request removal and continuation resumption logic to ensure each request's continuation is resumed exactly once, preventing "SWIFT TASK CONTINUATION MISUSE" errors during network failures.

* Fix race condition test
2025-05-26 04:36:01 -07:00
Mattt
87f33d022a
Improve NetworkTransport and add test coverage (#108)
* Improve NetworkTransport and add test coverage

* Remove the weakTransport check since actors have special memory management rules

* Use Task.sleep(for:) consistently

* Always start connection in connect

* Run NetworkTransportTests serially
2025-05-07 10:36:54 -07:00
Mattt Zmuda
266c02d2d1
Bump version to 0.8.2 0.8.2 2025-05-07 05:59:20 -07:00
Mattt
720a8102e9
Implement client protocol version negotiation in server initialization (#107)
* Implement client version negotiation in server initialization

* Add test coverage for version negotiation

* Make Version.supported and Version.negotiate() APIs internal to not create new surface area
2025-05-07 05:58:11 -07:00
Mattt Zmuda
3690509fa0
Bump version to 0.8.1 0.8.1 2025-05-07 03:26:31 -07:00
Mattt
bc5360ecce
Revert "Remove deprecated MCP.Error typealias (#102)" (#104)
This reverts commit d3f061dacd.
2025-05-07 03:26:07 -07:00
Mattt
800131fb9c
Don't throw error if there's a protocol mismatch between client and server (#103) 2025-05-06 11:53:02 -07:00
Mattt
d3f061dacd
Remove deprecated MCP.Error typealias (#102) 2025-05-06 11:23:04 -07:00
Mattt Zmuda
305cf7e13f
Bump version to 0.8.0 0.8.0 2025-05-06 09:30:43 -07:00
Mattt
23cb19268a
Set latest version to 2025-03-26 (#80)
* Set latest version to 2025-03-26

* Specify support for 2025-03-26 (latest) version
2025-05-06 09:30:21 -07:00
Mattt
32cf6cb7e6
Expand README with more information about client and server usage (#99)
* Expand README with more information about client and server usage

* Add discussion of initialize hook for server

* Add section about request batching

* Trim trailing whitespace

* Rename section to Request Batching
2025-05-06 09:24:20 -07:00
Mattt
daef492821
Improve documentation comments for transport types (#98)
* Add example usage to HTTPClientTransport documentation comments

* Add documentation comments to NetworkTransport

* Improve documentation comments for StdioTransport
2025-05-06 06:56:24 -07:00
Mattt
bdaa2585c5
Delay SSE GET connection until after session ID is established (#97)
* Delay SSE GET connection until after session ID is established

- Add a signaling mechanism to ensure the SSE streaming task waits for the initial session ID to be set before attempting the GET connection.
- Use a TaskGroup to race between session ID signal and a 10-second timeout, logging the outcome.
- Trigger the signal when a session ID is received for the first time from any response.
- Add detailed logging for all code paths to aid debugging and clarify connection timing.
- Clean up signal resources on disconnect to prevent leaks.

This addresses the initialization timing issue where the SSE GET could be attempted before the session was established, as discussed in MCP PR #91.

* Update tests for SSE timing

* Use configurable timeout for acquiring session ID

* Remove Actor protocol conformance for HTTPClientTransport

* Configure shorter session ID timeout for tests

* Add documentation comments to HTTPClientTransport

* Rename sessionIDWaitTimeout to sseInitializationTimeout
2025-05-06 06:49:48 -07:00
Mattt
3ff1085e01
Use EventSource for SSE implementation (#96)
* Add package dependency for github.com/loopwork-ai/EventSource

* Use EventSource for SSE implementation

* Refactor response stream and content type handling

Co-authored-by: Stephen Tallent <stallent@mercury.io>

* Conditionalize use of streaming for supported platforms

* Refactor conditional platform handling

* Conditionalize code and package dependency on Linux

---------

Co-authored-by: Stephen Tallent <stallent@mercury.io>
2025-05-06 05:45:40 -07:00
Mattt
2b67a1233f
Resume with EOF instead of throwing error when no data is received (#94) 2025-05-02 14:24:37 -07:00
Mattt
48c19c282b
Document Client usage with HTTPClientTransport (#77)
* Add test coverage for Client with HTTPClientTransport

* Configure HTTP client transport to stream by default

* Add example usage of streaming HTTP transport to README

* Explicitly set streaming to false in test
2025-04-27 09:29:24 -07:00
Stephen Tallent
ccb070f2f0
support 405 response from servers that don’t support streaming (#90)
* support 405 response from servers that don’t support streaming

* Rephrase comment

---------

Co-authored-by: Stephen Tallent <stallent@mercury.io>
Co-authored-by: Mattt Zmuda <mattt@loopwork.com>
2025-04-27 07:27:14 -07:00