Summary
Implement a remote upstream MCP client for streamable HTTP and bind it to downstream MCP sessions managed by mcp4openapi.
Why
Proxy mode needs a real upstream client/session layer. Local request handling alone is not enough once tool discovery and tool execution come from a remote MCP server.
Deliverables
- Create a per-session upstream connection manager for remote MCP providers.
- Initialize the upstream session during downstream
initialize handling.
- Reuse or adapt the current HTTP transport/session lifecycle so upstream sessions are cleaned up deterministically when downstream sessions end.
- Proxy downstream requests such as
tools/list and tools/call to the upstream provider where appropriate.
- Add bounded timeouts and degraded failure handling for unavailable upstream servers.
Acceptance criteria
- A configured remote upstream MCP server can be initialized through
mcp4openapi.
- Session creation and cleanup are deterministic and covered by tests.
- Tool requests are forwarded upstream with structured error mapping for timeout/auth/unavailable cases.
- The first iteration works without stdio support.
Suggested files
src/mcp/mcp-server.ts
src/transport/http-transport.ts
src/core/errors.ts
- new provider/client modules under
src/
Agent-authored issue.
Summary
Implement a remote upstream MCP client for streamable HTTP and bind it to downstream MCP sessions managed by
mcp4openapi.Why
Proxy mode needs a real upstream client/session layer. Local request handling alone is not enough once tool discovery and tool execution come from a remote MCP server.
Deliverables
initializehandling.tools/listandtools/callto the upstream provider where appropriate.Acceptance criteria
mcp4openapi.Suggested files
src/mcp/mcp-server.tssrc/transport/http-transport.tssrc/core/errors.tssrc/Agent-authored issue.