Skip to content

fix: support concurrent MCP clients during server shutdown - #34

Draft
dapi wants to merge 1 commit into
mainfrom
fix/33-concurrent-mcp-clients
Draft

dapi wants to merge 1 commit into
mainfrom
fix/33-concurrent-mcp-clients

Conversation

@dapi

@dapi dapi commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Verify that independent MCP sessions can make overlapping tool calls through one shared Telegram client and archive service.
  • Let in-flight MCP POST tool calls finish before closing sessions, HTTP connections, the sync service, and the Telegram client.
  • Document the supported single-server, multiple-client model.

Verification

  • TGCLI_TEST_PORT="$(port-selector --name mcp-test)" npm test — 311 tests passed on current main.
  • HTTP integration test: two MCP clients ran overlapping Telegram calls; archive read and sync-job scheduling completed while another call was pending; closing one session left the other usable.
  • Queue concurrency test: overlapping worker starts processed one job once.
  • Live npm start reached Telegram dialog initialization, then Telegram returned FLOOD_WAIT_23. Readiness with the personal session remains unverified. No chat content or credentials were included in test output.

Closes #33.

Verify independent MCP sessions can overlap Telegram and archive calls while sharing one server. Wait for active tool responses before closing transports and shared services; preserve the sequential sync worker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: support concurrent MCP clients on one tgcli server

1 participant