Convenience header providing one-call entry points for ServerPeer::Builder::run() and ClientPeer::Builder::run().
More...
Convenience header providing one-call entry points for ServerPeer::Builder::run() and ClientPeer::Builder::run().
Server - build, serve, and block until shutdown:
int main() {
.name("my-server")
.stdio()
.tool<Json, Json>("echo", [](const Json& in) { return in; })
.run();
}
static Builder builder()
Starts a fluent builder for common server peer construction.
Definition peer.hpp:4872
Convenience header providing one-call entry points for ServerPeer::Builder::run() and ClientPeer::Bui...
Client - build, serve, run a callback, then stop:
int main() {
.streamable_http("http://127.0.0.1:3000/mcp")
.run([](auto& svc) {
svc.peer().initialize();
svc.peer().call_tool("echo", Json{{"value", "hello"}});
});
}
static Builder builder()
Starts a fluent builder for common client peer construction.
Definition peer.hpp:2989