modelcontextprotocol / modelcontextprotocol/typescript-sdk
Add conveniences for MCP proxy pattern
Open
Nobody has claimed this yet.
enhancement
needs decision
P3
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 2.2k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 4
Description
export function mcpProxy({
transportToClient,
transportToServer,
onerror,
}: {
transportToClient: Transport;
transportToServer: Transport;
onerror: (error: Error) => void;
}) {
transportToClient.onmessage = (message) => {
transportToServer.send(message).catch(onerror);
};
transportToServer.onmessage = (message) => {
transportToClient.send(message).catch(onerror);
};
transportToClient.onclose = () => {
transportToServer.close().catch(onerror);
};
transportToServer.onclose = () => {
transportToClient.close().catch(onerror);
};
transportToClient.onerror = onerror;
transportToServer.onerror = onerror;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a TypeScript mcpProxy example but names no file, test, or entry point. First clarify which conveniences are requested for forwarding messages, closing transports, and handling errors, then define acceptance criteria and tests that show the proxy behavior is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100