/* The MCP client (mcp.c over mcp_wire.c): servers the person added with pic mcp add, kept as rows * of picu_mcp_server in ~/.pic/pic.sqlite, their header and environment values sealed under the * credential store's key (bound to the server's name and origin) and never kept or shown in * plain text. Each enabled server's tools, as its last tools/list gave them, are registered with * the tool registry as mcp__SERVER__TOOL, so building a request needs no connection; a call * connects, asks tools/call and returns the result, journaled like any tool's. A tool the server * marks readOnlyHint is replay-safe; every other one becomes "outcome unknown" after a crash. * pic does not sign in to servers (OAuth): a token is given as a header. */ #ifndef PIC_MCP_H #define PIC_MCP_H #include "rpc.h" /* Registers the tools of every enabled server from their saved lists, with the tool registry. * The number registered, or -1 when ~/.pic/pic.sqlite cannot be read. */ int pic_mcp_register(void); /* pic mcp add | add-json | list | get | remove | call: the process's exit status. */ int pic_mcp_command(int argc, char **argv); #endif