MCPcopy Index your code
hub / github.com/plotly/dash / _handle_get

Function _handle_get

dash/mcp/_server.py:170–185  ·  view source on GitHub ↗

Accept GET requests for SSE streams with an empty, immediately-completed stream. This used to be a 405 "Method Not Allowed", but that caused the dev server to close the connection, introducing intermittent Claude connectivity timeouts.

()

Source from the content-addressed store, hash-verified

168 return _json_response(response_data)
169
170 def _handle_get():
171 """
172 Accept GET requests for SSE streams with an empty, immediately-completed
173 stream. This used to be a 405 "Method Not Allowed", but that caused the
174 dev server to close the connection, introducing intermittent Claude
175 connectivity timeouts.
176 """
177 resp = app.backend.make_response(
178 ": mcp stream open\n\n",
179 content_type="text/event-stream",
180 status=200,
181 )
182 resp.headers["Cache-Control"] = "no-cache, no-transform"
183 if _session_id is not None:
184 resp.headers["Mcp-Session-Id"] = _session_id
185 return resp
186
187 def _handle_delete():
188 """Return 405 for DELETE; the spec allows refusing session teardown."""

Callers

nothing calls this directly

Calls 1

make_responseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…