feat(indexing): stream local JSON, CSV, XML and Markdown files - #194
adityamparikh wants to merge 2 commits into
Conversation
Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com> Co-authored-by: Junie <junie@jetbrains.com>
Keep this PR indexing-only; move search usability changes to apache#195. Replace root-restricted JSON file ingestion with local STDIO multi-format ingestion without a file-size cap. Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com> Co-authored-by: Junie <junie@jetbrains.com>
|
Closing this one. The What HTTP parity would need is a way for a client to hand the server a file: either the MCP file-transfer primitive that is still being specified (SEP-2631), or an out-of-band upload endpoint with its own auth and size limits. Both are bigger than this PR and neither belongs in an indexing change, so I am parking the whole feature rather than carrying a STDIO-only version. The branch stays as is. Two transport-neutral pieces could be lifted out later if useful: the |
Summary
Adds one MCP tool,
index-file, for local STDIO deployments. It takes a collection, a file path on the server host and an optional format, and streams that file into Solr so the document bytes never pass through the model's context window.format.stdioprofile is active and no web application is present. HTTP deployments keep the inlineindex-*-documentstools unchanged.Why STDIO only
In STDIO mode the server is a child process on the user's own machine, so a path the client passes refers to a file on the same host and is read with the user's own permissions. MCP tool calls carry JSON arguments only; there is no file-transfer primitive, so when a client "attaches" a file the client reads it into the model's context rather than sending it to the server. Over HTTP the server runs on another host, where a client-side path means nothing and a server-side path would let any authenticated client read the server host's filesystem. Remote upload (multipart endpoint or fetch-from-URL) is deferred to a follow-up.
Limitations
Verification
./gradlew build --console=plainpassed in a clean worktree at 993b7cc (492 tests, zero failures, 7 skipped).Try locally
Run the server in STDIO mode and call
index-filewithcollection=showsand an absolute path to a UTF-8 dataset, for example/data/shows.json. For Docker, mount only the intended data directory read-only and pass its container path.🤖 Generated with Claude Code
https://claude.ai/code/session_019zJ9WA8nNyA5Yxb8ueM7vV