v0.6.6: MCP performance optimization - #18
Merged
Merged
Conversation
- Reorder detect_mcp_server_command(): local first, python -m second, uvx last. Remove @latest from uvx to avoid PyPI check (~25s penalty). - Merge validate + call into single MCP session via new validate_and_call_tool() method, eliminating double subprocess spawn. - Add persistent HTTP server transport (McpServerManager) that keeps one keboola-mcp-server running with streamable-http transport. Per-request project credentials via X-Storage-Token/X-Storage-API-URL headers allow one server to serve all projects. - KBAGENT_MCP_TRANSPORT env var controls mode: "http" (default) or "stdio". - Update doctor command to show transport mode and server status. - Add test_mcp_transport.py with 20 tests for server manager. - Update existing tests for new detection order and unified call flow. Expected improvement: ~50s -> ~3-6s per tool call (local/cached), ~2-3s for subsequent calls via persistent HTTP server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HTTP transport fails with 34 concurrent MCP sessions. Default to stdio which works reliably and still benefits from Phase 1 optimizations (single-session validate+call, detection reorder: ~11s vs ~65s). HTTP remains available via KBAGENT_MCP_TRANSPORT=http for single-project. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
padak
added a commit
that referenced
this pull request
Mar 24, 2026
Version bump to 0.9.0. Context and plugin updated with all new features: - config list: last_modified, folder fields documented - org setup: token owner identity documented - Tip #18: Claude Code plugin install instructions
padak
added a commit
that referenced
this pull request
Mar 24, 2026
Version bump to 0.9.0. Context and plugin updated with all new features: - config list: last_modified, folder fields documented - org setup: token owner identity documented - Tip #18: Claude Code plugin install instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@latestfrom uvx — eliminates ~20s PyPI check per spawn (25s → 4.5s)mcp_transport.py) — ready for future use, default is stdioPerformance impact
Note on HTTP transport
Persistent HTTP server code is included but defaulted to
stdio— the MCP server can't reliably handle 34 concurrent streamable-HTTP sessions. HTTP works fine for single-project and is available viaKBAGENT_MCP_TRANSPORT=http.Test plan
tool call get_bucketsverified at ~11s