Add MCP HTTP proxy mode - #315
Open
Lauritz-Timm wants to merge 1 commit into
Open
Conversation
Lauritz-Timm
marked this pull request as ready for review
July 2, 2026 13:01
Lauritz-Timm
force-pushed
the
fix/mcp-http-proxy
branch
2 times, most recently
from
July 2, 2026 13:24
17f5d97 to
c7a61da
Compare
pszymkowiak
reviewed
Jul 24, 2026
pszymkowiak
left a comment
Contributor
There was a problem hiding this comment.
I tested this end-to-end (checked the branch out, built with the default http-api feature, and drove the real flow) — the proxy works:
- Started
icm serve --http 127.0.0.1:PORT(daemon) +icm serve --http-proxy http://127.0.0.1:PORT(proxy). - Piped MCP JSON-RPC (
initialize+icm_memory_store+icm_memory_recall) into the proxy → got valid MCP responses back, no proxy stderr. - Confirmed the stored memory actually landed in the daemon's DB (verified with a
recallafter stopping the daemon). So the stdio→HTTP→shared-store round-trip is correct.
Build clean, cargo clippy clean, existing suite green (292 passed). Nice, focused solution to #314 (one warm daemon + lightweight stdio proxies instead of N model loads).
Two things needed before it can merge:
- Rebase onto current
develop— this branch is ~15 commits behind and touchescrates/icm-mcp/src/server.rsandcrates/icm-cli/src/main.rs, both of which changed since (e.g.run_servergained anAutoConsolidateparam in #318/#329;main.rsgot the doctor/repair early-dispatch,hook disable, read-only/maintenance openers). It will conflict as-is. (serverInfo.versionin my run showed0.10.34, confirming the old base.) - Add tests — the PR currently adds none. At minimum:
mcp_proxy_endpointURL building (with/withoutcompact, trailing slash, token), and an integration test that spins up the daemon + proxies onetools/callthrough it. The feature is exactly the kind that regresses silently without a test.
Happy to re-review once it's rebased with tests — the core behavior is verified working.
Lauritz-Timm
force-pushed
the
fix/mcp-http-proxy
branch
from
July 27, 2026 11:37
c7a61da to
689b07b
Compare
Lauritz-Timm
marked this pull request as draft
July 27, 2026 11:40
Lauritz-Timm
force-pushed
the
fix/mcp-http-proxy
branch
2 times, most recently
from
July 27, 2026 11:50
493c8ff to
77bf2d9
Compare
Lauritz-Timm
marked this pull request as ready for review
July 27, 2026 11:58
Lauritz-Timm
force-pushed
the
fix/mcp-http-proxy
branch
from
August 3, 2026 19:59
19f3932 to
cdd010b
Compare
This was referenced Aug 3, 2026
9 tasks
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
Add a lightweight MCP stdio proxy so multiple clients can share one warm ICM HTTP daemon.
Motivation
Each stdio client currently launches a separate
icm serveprocess and may load its own embedding model. Memory use therefore scales with the number of connected clients.Changes
icm serve --http-proxy <URL>POST /mcpon the warm daemonCompatibility and safety
Existing stdio and HTTP modes are unchanged. The proxy is opt-in and does not change the MCP request or response contract.
Validation