Skip to content

Non-blocking stdio startup, atomic cache writes, deduplicate AuthTest#259

Open
mark-liu wants to merge 2 commits intokorotovsky:masterfrom
mark-liu:fix/stdio-startup-and-cache-safety
Open

Non-blocking stdio startup, atomic cache writes, deduplicate AuthTest#259
mark-liu wants to merge 2 commits intokorotovsky:masterfrom
mark-liu:fix/stdio-startup-and-cache-safety

Conversation

@mark-liu
Copy link
Copy Markdown

Three related fixes for reliability when running multiple concurrent
MCP server instances (e.g. one per Slack workspace):

  • stdio transport no longer blocks on cache warmup — serves
    immediately while caches build in the background, matching the
    existing SSE/HTTP behaviour. Large workspaces (100K+ users)
    previously timed out before the server started listening.

  • Cache files written atomically via temp-file-and-rename,
    preventing concurrent readers from seeing partial/corrupt JSON.

  • AuthTest response from initial validation passed through to
    NewMCPSlackClient, eliminating a redundant API call on every
    startup. Small random jitter (0-3s) staggers concurrent
    instance auth requests.

Supersedes #249 and #256 (squashed and rebased).

…hTest

Three related fixes for reliability when running multiple concurrent
MCP server instances (e.g. one per Slack workspace):

1. stdio transport no longer blocks on cache warmup — serves
   immediately while caches build in the background, matching the
   existing SSE/HTTP behaviour. Previously, large workspaces (100K+
   users) would time out before the server started listening.

2. Cache files are now written atomically via temp-file-and-rename,
   preventing concurrent readers from seeing partial/corrupt JSON.

3. AuthTest response from initial validation is passed through to
   NewMCPSlackClient, eliminating a redundant API call on every
   startup. A small random jitter (0-3s) staggers concurrent
   instance auth requests.

Signed-off-by: Mark Liu <mark@prove.com.au>
SLACK_MCP_COMPACT_OUTPUT=1 enables a slimmed-down CSV format that drops
fields rarely needed by LLM agents: MsgID, UserID, ThreadTs, FileCount,
AttachmentIDs, HasMedia. Merges UserName/RealName/BotName into a single
User column. Truncates link preview attachments to title-only.

~40% reduction in output size. Controlled by env var, defaults to off.
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.

1 participant