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.
Adds a Loopback Transport to the Model Context Protocol (MCP), enabling efficient in-memory communication between MCP clients and servers within the same execution context.
Motivation and Context
MCP currently supports communication via SSE and standard IO but lacks an efficient solution for testing or fully client-side, browser-based applications. The Loopback Transport fills this gap by providing a low-overhead, direct in-memory transport method, ideal for:
This feature is primarily motivated by several active enterprise projects involving enterprise search and AI-driven modernization. Modern single-page applications with robust security mechanisms (such as OAuth) often no longer require traditional backend APIs. Deploying MCP fully client-side provides significant benefits in simplicity, operational overhead reduction, and security. The Loopback Transport allows organizing prompts, tools, and resources effectively within MCP—even when running entirely in the browser.
While this transport is primarily aimed at JavaScript/TypeScript environments (due to the ease of running these languages directly in browsers), similar transports can be developed for other languages if there's sufficient demand.
How Has This Been Tested?
Breaking Changes
No breaking changes. This addition is purely optional and introduces a new transport mechanism without affecting existing functionality.
Types of changes
Checklist
Additional context