<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Swift on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/swift/</link>
    <description>Recent content in Swift on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Sat, 23 May 2026 06:10:00 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/swift/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Your MCP Config Was Fine. The Server Died Before the Handshake.</title>
      <link>https://blog.margrop.net/en/post/codex-mcp-startup-swift-runtime-troubleshooting/</link>
      <pubDate>Sat, 23 May 2026 06:10:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/codex-mcp-startup-swift-runtime-troubleshooting/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The misleading part of this incident was the surface error. Codex reported that an MCP client could not initialize and that the MCP server handshake failed. That naturally pushes you toward MCP configuration, JSON-RPC initialization, plugin settings, authentication, network transport, or stale tool caches. But the root cause was lower than the MCP protocol: one local MCP server binary was killed by the macOS dynamic linker before it could answer the &lt;code&gt;initialize&lt;/code&gt; request. The client only saw a closed connection. The useful evidence was in the server stderr: &lt;code&gt;dyld: Symbol not found&lt;/code&gt;, pointing at a missing Swift Concurrency runtime symbol.&lt;/p&gt;&#xA;&lt;p&gt;In other words, MCP did not really get a chance to fail. The server process died first.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This article walks through a real troubleshooting pattern around Codex, MCP clients, and MCP servers. The failure looked like a protocol startup problem, but the root cause lived in a native macOS binary and its Swift runtime compatibility.&lt;/p&gt;&#xA;&lt;p&gt;All private details have been removed. This article does not include real internal addresses, usernames, session IDs, full local paths, tokens, private repository names, or business system names. Paths use placeholders such as &lt;code&gt;~&lt;/code&gt;, &lt;code&gt;&amp;lt;USER_HOME&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;PLUGIN_DIR&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;PROJECT&amp;gt;&lt;/code&gt;. Log snippets keep only the technical fields needed to explain the diagnosis.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
