summaryrefslogtreecommitdiff
path: root/src/mcp/README.md
blob: ed008a0abe02fe081669de5b063de3bf5d9d2996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# MCP adapter

`server.c` owns only the mcpc server lifecycle. Tool schemas and callbacks live
under `tools/`, one source file per memory tool. Shared registration, callback
context, and response helpers live under `tools/common/`. mcpc owns stdio
framing, MCP initialization, dispatch, and result envelopes.

The pinned mcpc API supports integer and UTF-8 string properties, but not nested
or optional properties. Consequently every advertised property must be sent.
Use an empty `session_id` where that filter is optional, and pass write metadata
as a JSON object string in `metadata_json` (`{}` when no metadata is needed).

Tool success and application errors are JSON serialized into MCP TextContent;
application errors also set `isError`.