Commit 2b5663a
authored
fix(local-mcp): answer the relay MCP initialize handshake locally
A relayed server's real connection can be a slow-to-spawn stdio
process on the user's machine. Relaying the MCP `initialize` handshake
made connection establishment wait on a cross-machine round trip plus
that spawn, blowing the client's init timeout so the server was dropped
for the whole run ("no slack tool"). As a pass-through proxy the relay
now answers `initialize` (and the paired `initialized` notification)
locally — advertising tools capability and echoing the client's
protocol version — so the connection is instant; `tools/list` and tool
calls still relay for real with their generous per-request timeouts.
Also log received `mcp_response` commands in the sandbox so the
desktop's response behavior is diagnosable from the readable side, not
just the (often invisible) Electron main-process logs.
Generated-By: PostHog Code
Task-Id: 7c87c3a4-0be6-475e-a8ec-269140ded3011 parent b9d9928 commit 2b5663a
3 files changed
Lines changed: 70 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1219 | 1226 | | |
1220 | 1227 | | |
1221 | 1228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
185 | 204 | | |
186 | 205 | | |
187 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
188 | 217 | | |
189 | 218 | | |
190 | 219 | | |
| |||
216 | 245 | | |
217 | 246 | | |
218 | 247 | | |
219 | | - | |
| 248 | + | |
220 | 249 | | |
221 | 250 | | |
222 | 251 | | |
223 | | - | |
| 252 | + | |
224 | 253 | | |
225 | 254 | | |
226 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
225 | 255 | | |
226 | 256 | | |
227 | 257 | | |
| |||
0 commit comments