Repository navigation
Conversation
The pinned swift-sdk revision (106167b) had a bug in NetworkTransport.connect() where a resettable instance-level boolean guarded continuation resume. Concurrent state transitions could double-resume or leak continuations, crashing the app on connect. The upstream swift-sdk (973b46b, V0.11.x) rewrote connect() to use AsyncStream, eliminating the continuation entirely. This bumps the pin and updates ServerController.swift for the new Tool.Content API (text/image/audio label changes, inputSchema JSONSchema -> Value). Also disables reconnection and heartbeats in MCPConnectionManager since iMCP accepts fresh connections per client rather than maintaining long-lived ones. Fixes mattt#136 Co-Authored-By: Claude Opus 4.6 <[email protected]>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
modelcontextprotocol/swift-sdkfrom106167bto973b46b(V0.11.x), which rewritesNetworkTransport.connect()to useAsyncStreaminstead ofwithCheckedThrowingContinuationwith a resettable boolean guardServerController.swiftfor the newTool.ContentAPI (label changes totext/image/audioenum cases,inputSchematype change fromJSONSchematoValue)MCPConnectionManagersince iMCP accepts fresh per-client connectionsProblem
The pinned swift-sdk revision had a bug where
connectionContinuationResumed(an instance-level boolean) was reset tofalseon eachconnect()call. If NWConnection state transitions fired concurrently, old Tasks from previous state handlers could double-resume stale continuations, causingSWIFT TASK CONTINUATION MISUSEcrashes. This made iMCP crash immediately on client connection (macOS Sequoia 15.7.3 and Tahoe).Relates to #136.
Test plan
xcodebuild -scheme iMCP -configuration Debug buildswift format lint --strict --recursive .🤖 Generated with Claude Code