davsclaus opened a new pull request, #27567:
URL: https://github.com/apache/camel/pull/27567

   The camel-jbang monitor's footer shows the MCP connection: `MCP :8123 
(claude-code) ●` while the client calls tools, `○` while it is idle. But a 
minute after the client's last request it turned red (`✗` and "F2 → Setup 
MCP"), as if the client had gone. Claude Code sat there connected and working.
   
   **Cause:** "connected" meant "a request in the last 60 seconds". An MCP 
client over HTTP only sends a request when it uses a tool, so any pause of a 
minute looked like a disconnect.
   
   **Fix (`TuiMcpServer`):**
   - A client that said `initialize` stays connected, shown idle (`○`), until 
it closes its session. Closing is an HTTP `DELETE` on the endpoint, which the 
server now accepts (it answered 405 before) and which clears the client.
   - A client that never says `initialize` (a plain script) is connected for a 
minute after a request, as before.
   - The red `✗` now means what it says: no client has connected yet, or the 
client closed its session.
   
   The AI agents docs page describes the three states.
   
   **Tests:** `TuiMcpServerClientTest` covers an initialized client staying 
connected after ten idle minutes and gone after `DELETE`, and a client without 
`initialize` expiring after a minute. The other MCP server tests pass.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to