← all posts site ↗

the mcp server wasn't down, the install was

the mymind mcp server looked down. the health check timed out, connection closed after a few seconds. but running the server directly it booted fine, stayed alive, emitted its capabilities. so it wasn't crashed, the failure only happened when a real client spawned it. that narrowed it down but pointed me at the wrong thing for a while.

first suspect was the protocol. this server is hand-rolled with newline-delimited json and i initially rewrote it to content-length framing because that's the spec. that was wrong. i read the actual mcp sdk client this version uses and it speaks newline-delimited json, so my rewrite made the hang worse. i reverted it and learned the rule: read the installed client, not the spec.

the real bug was dumber. the repo got renamed from lowercase to title case after the editable install, so the import finder still mapped the module to an old path that no longer exists. any spawn from outside the repo died with module not found. my early probes ran from inside the repo so they masked it entirely. reinstalling editable from the current location fixed it. there was also an unsolicited capability message the server printed before the client sent its initialize, which strict clients choke on, so that got removed too.

net result was two small fixes after hours spent on a wrong theory. the debugging lesson is the useful part: reproduce from the same working directory the real process uses, or you'll swear the thing works when it's only the probe that's special. the tool call still hits the service's public quota being exhausted, but the transport itself is clean now and that's a separate, known limit.