From 4bc721c3bf7589b519c5730d093f704ce56e3f09 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Mon, 29 Jun 2026 21:43:54 +0900 Subject: refactor: MCP層をmcpc APIベースに刷新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 独自JSON-RPC処理をmcpcへ置き換え - 各MCPツールを個別ソースへ分離 - 共通コンテキストと登録処理を整理 - mcpc互換修正と統合テストを更新 --- src/mcp/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/mcp/README.md') diff --git a/src/mcp/README.md b/src/mcp/README.md index dc7ac46..ed008a0 100644 --- a/src/mcp/README.md +++ b/src/mcp/README.md @@ -1,14 +1,14 @@ -# MCP compatibility boundary +# MCP adapter -The pinned mcpc revision cannot describe required versus optional properties, -nested objects/arrays, 64-bit values, or application callback context. The -project therefore keeps mcpc immutable and implements the stdio dispatch and -tool schemas in `server.c`, using mcpc's bundled `mjson` parser for raw JSON. +`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. -This boundary supports the MCP 2024-11-05 initialize, tools/list, and tools/call -flow needed by the server. Tool success and application errors are returned as -JSON serialized into TextContent; application errors also set `isError`. +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). -If mcpc is upgraded, this boundary should be removed only after its integration -tests demonstrate equivalent optional/object/array schema and callback-state -behavior. +Tool success and application errors are JSON serialized into MCP TextContent; +application errors also set `isError`. -- cgit v1.2.3