<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayoola Damisile</title>
    <description>The latest articles on DEV Community by Ayoola Damisile (@damisile_ayoola).</description>
    <link>https://dev.to/damisile_ayoola</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3944494%2F2d0a639f-da6e-45ec-be3c-722ccef66412.jpg</url>
      <title>DEV Community: Ayoola Damisile</title>
      <link>https://dev.to/damisile_ayoola</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/damisile_ayoola"/>
    <language>en</language>
    <item>
      <title>How npx @latest Was Silently Killing My MCP Servers (and the Doctor I Built for It)</title>
      <dc:creator>Ayoola Damisile</dc:creator>
      <pubDate>Tue, 25 Aug 2026 15:34:41 +0000</pubDate>
      <link>https://dev.to/damisile_ayoola/how-npx-latest-was-silently-killing-my-mcp-servers-and-the-doctor-i-built-for-it-4knd</link>
      <guid>https://dev.to/damisile_ayoola/how-npx-latest-was-silently-killing-my-mcp-servers-and-the-doctor-i-built-for-it-4knd</guid>
      <description>&lt;h1&gt;
  
  
  How npx @latest Was Silently Killing My MCP Servers (and the Doctor I Built for It)
&lt;/h1&gt;

&lt;p&gt;If you use AI coding agents — Claude Code, Cursor, opencode, VS Code, Codex — you've probably seen this at least once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MCP error -32001: Request timed out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No server name. No cause. Just your tools silently missing, or the whole agent hanging at startup while you stare at a spinner.&lt;/p&gt;

&lt;p&gt;This is the story of how I found out &lt;em&gt;my own config&lt;/em&gt; was the killer, what I learned about how MCP startup actually works, and the open-source CLI I built so nobody else has to lose an afternoon to this again.&lt;/p&gt;

&lt;h2&gt;
  
  
  How MCP startup actually works
&lt;/h2&gt;

&lt;p&gt;Every time your agent boots, for each server in your MCP config it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Spawns the process&lt;/strong&gt; — e.g. &lt;code&gt;npx -y some-package&lt;/code&gt; for stdio servers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Opens the transport&lt;/strong&gt; — stdin/stdout for stdio, HTTP/SSE for remote&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sends a JSON-RPC &lt;code&gt;initialize&lt;/code&gt; request&lt;/strong&gt; and waits for the answer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calls &lt;code&gt;tools/list&lt;/code&gt;&lt;/strong&gt; to discover what the server can do&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If step 3 doesn't complete inside the timeout window (often 30–90s depending on the client), you get &lt;code&gt;-32001: Request timed out&lt;/code&gt;. And here's the annoying part: the error doesn't tell you &lt;em&gt;which&lt;/em&gt; server failed or &lt;em&gt;why&lt;/em&gt;. A config with ten servers gives you one useless line.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap: &lt;code&gt;@latest&lt;/code&gt; is a boot-time lottery
&lt;/h2&gt;

&lt;p&gt;My configs looked perfectly reasonable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"context7"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@upstash/context7-mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the pattern every tutorial copies. But &lt;code&gt;@latest&lt;/code&gt; means npm &lt;strong&gt;hits the registry on every single agent startup&lt;/strong&gt; to resolve the newest version before it can even spawn the server.&lt;/p&gt;

&lt;p&gt;On a fast network, you never notice. On my network — and a lot of networks in this part of the world — that registry round-trip at boot can take longer than the handshake timeout. Result: every server configured this way dies on every boot. Not sometimes. &lt;em&gt;Every time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;@latest&lt;/code&gt; is only one way to get the same useless error. During my audit I found servers whose commands weren't on &lt;code&gt;PATH&lt;/code&gt;, &lt;code&gt;${VAR}&lt;/code&gt; references to env vars I'd never set, an endpoint that had been down for weeks, and the same server name defined in three different agents' configs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diagnosing by hand is miserable
&lt;/h2&gt;

&lt;p&gt;The manual loop looks like this: read the config, guess which entry is suspicious, spawn the command yourself in a terminal, watch it hang, kill it, check &lt;code&gt;npm ls -g&lt;/code&gt;, repeat. An afternoon gone.&lt;/p&gt;

&lt;p&gt;What I actually wanted was a doctor: point it at my machine, have it find every config, and run the &lt;em&gt;same startup conversation my agent runs&lt;/em&gt; — then tell me exactly where it breaks.&lt;/p&gt;

&lt;p&gt;That tool didn't exist, so I built it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter fixmcp
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Ayoola-tech2024/fixmcp" rel="noopener noreferrer"&gt;&lt;code&gt;fixmcp&lt;/code&gt;&lt;/a&gt; is one command, zero install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx fixmcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It discovers configs from &lt;strong&gt;Claude Code&lt;/strong&gt; (&lt;code&gt;~/.claude.json&lt;/code&gt;), &lt;strong&gt;Claude Desktop&lt;/strong&gt;, &lt;strong&gt;Cursor&lt;/strong&gt;, &lt;strong&gt;VS Code&lt;/strong&gt;, &lt;strong&gt;opencode&lt;/strong&gt; (JSONC) and &lt;strong&gt;Codex CLI&lt;/strong&gt; (TOML), then checks every server two ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static checks&lt;/strong&gt; — command resolution (is it even on PATH?), &lt;code&gt;${VAR}&lt;/code&gt; env references, known footguns like &lt;code&gt;npx&lt;/code&gt; without &lt;code&gt;-y&lt;/code&gt; (which can hang forever on an interactive prompt), and duplicate server names across agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real handshakes&lt;/strong&gt; — this is the part that matters. fixmcp doesn't just lint your config. It spawns every stdio server and performs an actual JSON-RPC &lt;code&gt;initialize&lt;/code&gt; + &lt;code&gt;tools/list&lt;/code&gt; conversation. You get per-server latency and discovered tool counts. When a server dies, you get its stderr tail — so instead of a bare timeout you see &lt;code&gt;ECONNREFUSED 127.0.0.1:5432&lt;/code&gt; or whatever the &lt;em&gt;real&lt;/em&gt; cause is.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;postgres-mcp (stdio)
  ✗ [handshake] initialize failed after 5012ms
    stderr: ECONNREFUSED 127.0.0.1:5432
filesystem (stdio)
  ✓ [handshake] initialize OK in 412ms, 11 tool(s).
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The fix: stop gambling on the registry
&lt;/h2&gt;

&lt;p&gt;Once you know the cause, the fix for &lt;code&gt;@latest&lt;/code&gt; is simple: install once, point the config at the installed script.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx fixmcp --fix&lt;/code&gt; automates that. It rewrites fragile &lt;code&gt;npx pkg@latest&lt;/code&gt; entries to cached direct-node paths:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"context7"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Program Files&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;nodejs&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;node.exe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Users&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;you&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;AppData&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Roaming&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;npm&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;node_modules&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;@upstash&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;context7-mcp&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;dist&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;index.js"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero network at startup. Millisecond launches. And it's careful about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;code&gt;&amp;lt;file&amp;gt;.fixmcp.bak&lt;/code&gt; backup is written before any change&lt;/li&gt;
&lt;li&gt;only plain-JSON configs are rewritten&lt;/li&gt;
&lt;li&gt;comment-bearing formats (opencode's JSONC, Codex's TOML) get exact manual instructions instead — a naive rewrite would destroy comments&lt;/li&gt;
&lt;li&gt;updating a server afterwards means one deliberate &lt;code&gt;npm i -g &amp;lt;pkg&amp;gt;&lt;/code&gt;, which beats gambling on the registry every boot anyway&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Windows is first-class (because I live there)
&lt;/h2&gt;

&lt;p&gt;Most MCP tooling quietly assumes macOS/Linux. fixmcp handles the Windows realities: &lt;code&gt;.cmd&lt;/code&gt;/&lt;code&gt;.bat&lt;/code&gt; commands route through &lt;code&gt;cmd.exe&lt;/code&gt; (Node ≥ 20 refuses to spawn them directly), PATH lookup honors &lt;code&gt;PATHEXT&lt;/code&gt;, and child process trees are cleaned up with &lt;code&gt;taskkill /T&lt;/code&gt;. It's tested on Ubuntu, Windows and macOS across Node 20 and 22 in CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built for humans &lt;em&gt;and&lt;/em&gt; agents
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fixmcp --json&lt;/code&gt; outputs machine-readable findings with proper exit codes (&lt;code&gt;0&lt;/code&gt; healthy, &lt;code&gt;1&lt;/code&gt; errors), so your coding agent can run the doctor itself. Drop this in your project's &lt;code&gt;AGENTS.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;When the user reports MCP server errors or timeouts, run:
  npx fixmcp --json
Read findings[].message/detail for exact causes. Apply config fixes with:
  npx fixmcp --fix
Then re-run without flags to verify.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx fixmcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/Ayoola-tech2024/fixmcp" rel="noopener noreferrer"&gt;https://github.com/Ayoola-tech2024/fixmcp&lt;/a&gt; (MIT)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/fixmcp" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/fixmcp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If it finds something broken in your setup — or you hit a failure mode it &lt;em&gt;doesn't&lt;/em&gt; catch — I genuinely want to hear about it in the comments or the issue tracker. The roadmap is being shaped by real-world failure reports.&lt;/p&gt;

&lt;p&gt;And if it saved you a debugging session, a star on the repo helps the next person find it. ⭐&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>typescript</category>
      <category>devtools</category>
      <category>damisile</category>
    </item>
  </channel>
</rss>
