feat: share runtime with MCP clients - #193
Closed
parvahuja wants to merge 11 commits into
Closed
Conversation
parvahuja
force-pushed
the
parv/httpx-instrumentation-v0.15
branch
from
July 28, 2026 18:26
a59c50b to
89283ac
Compare
parvahuja
force-pushed
the
parv/runtime-mcp-v0.16
branch
from
July 28, 2026 18:28
d26a6d0 to
f6be64c
Compare
This was referenced Jul 28, 2026
parvahuja
force-pushed
the
parv/httpx-instrumentation-v0.15
branch
from
July 28, 2026 23:29
89283ac to
e2ff779
Compare
parvahuja
force-pushed
the
parv/runtime-mcp-v0.16
branch
from
July 28, 2026 23:34
f6be64c to
7ca8634
Compare
parvahuja
force-pushed
the
parv/httpx-instrumentation-v0.15
branch
from
July 29, 2026 00:44
e2ff779 to
d6fe846
Compare
parvahuja
force-pushed
the
parv/runtime-mcp-v0.16
branch
from
July 29, 2026 00:44
7ca8634 to
911d312
Compare
parvahuja
force-pushed
the
parv/httpx-instrumentation-v0.15
branch
from
July 29, 2026 01:02
d6fe846 to
8767e4f
Compare
parvahuja
force-pushed
the
parv/runtime-mcp-v0.16
branch
from
July 29, 2026 01:02
911d312 to
66958a3
Compare
parvahuja
force-pushed
the
parv/httpx-instrumentation-v0.15
branch
from
July 29, 2026 03:33
8767e4f to
bcd4a11
Compare
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
Let explicit MCP clients share a
PaymentRuntime, including origin policy, shared events, committed-retry close protection, repeated-challenge protection, and fail-closed handling for uncertain payment outcomes.MCP session calls stay on the caller loop; credential and event work use the runtime-owned loop. Sync close is guarded inside a running caller event loop, while
await client.aclose()is the safe async lifecycle path.Scope
This is explicit MCP client integration only. It intentionally excludes global MCP instrumentation, speculative successful-response refetch hooks, and receipt extensions.
Validation
Managed as a stacked change with GitHub Stacks.