Skip to content

Commit 8149462

Browse files
Merge remote-tracking branch 'origin/fweinberger/migration-doc-fixes' into fweinberger/v2-bc-d1-base
2 parents 4440d42 + 5dc3338 commit 8149462

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modelcontextprotocol/server': patch
3+
'@modelcontextprotocol/client': patch
4+
---
5+
6+
Export `InMemoryTransport` for in-process testing.

packages/core/src/exports/public/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export { deserializeMessage, ReadBuffer, serializeMessage } from '../../shared/s
7777
export type { FetchLike, Transport, TransportSendOptions } from '../../shared/transport.js';
7878
export { createFetchWithInit } from '../../shared/transport.js';
7979

80+
// In-memory transport (for testing client/server in the same process)
81+
export { InMemoryTransport } from '../../util/inMemory.js';
82+
8083
// URI Template
8184
export type { Variables } from '../../shared/uriTemplate.js';
8285
export { UriTemplate } from '../../shared/uriTemplate.js';

packages/core/src/util/inMemory.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ interface QueuedMessage {
99

1010
/**
1111
* In-memory transport for creating clients and servers that talk to each other within the same process.
12+
*
13+
* Intended for testing and development. For production in-process connections, use
14+
* `StreamableHTTPClientTransport` against a local server URL.
1215
*/
1316
export class InMemoryTransport implements Transport {
1417
private _otherTransport?: InMemoryTransport;

0 commit comments

Comments
 (0)