12#include <unordered_map>
17namespace mcp::transport {
27 std::vector<std::string>
args;
33 std::unordered_map<std::string, std::string>
env;
38 std::chrono::seconds(30);
60 std::string_view
name() const noexcept override;
62 core::Result<core::Unit>
send(TxMessage message) override;
63 core::Result<std::optional<RxMessage>>
receive() override;
64 core::Result<core::Unit>
close() override;
69 std::unique_ptr<Impl> impl_;
Native transport-contract client for a child MCP server over stdio.
Definition process_stdio_transport.hpp:50
core::Result< core::Unit > close() override
Closes the transport and unblocks receive() where possible.
core::Result< std::optional< RxMessage > > receive() override
Receives the next JSON-RPC message from the peer.
std::string_view name() const noexcept override
Human-readable transport name for diagnostics.
protocol::Json diagnostics() const override
Structured implementation diagnostics.
core::Result< core::Unit > send(TxMessage message) override
Sends one JSON-RPC message to the peer.
Minimal message-level transport contract shared by MCP roles.
Definition transport.hpp:38
Configuration for a child-process stdio client transport.
Definition process_stdio_transport.hpp:22
std::optional< std::chrono::milliseconds > request_timeout
Optional maximum time to wait for a JSON-RPC response from the child.
Definition process_stdio_transport.hpp:37
std::vector< std::string > args
Command-line arguments passed to the executable.
Definition process_stdio_transport.hpp:27
std::string cwd
Optional working directory for the child process.
Definition process_stdio_transport.hpp:30
std::unordered_map< std::string, std::string > env
Extra environment variables for the child process.
Definition process_stdio_transport.hpp:33
std::string command
Executable to launch.
Definition process_stdio_transport.hpp:24
Role-generic MCP transport contract for SDK peer/service layers.