Repository navigation
Add a File Search plugin endpoint with folder setup during authorization - #1486
Merged
Merged
Conversation
…ion (#1485) Adds /mcp/file-search, a fixed set of single-operation tools over the workspace's File Search folders for OpenAI's plugin directory, and a guided folder setup after Approve for admins whose workspace has no folder yet. Includes the plugin package in deploy/openai-plugins/file-search.
The portal's metadata check refuses "SFTP & NAS File Search" as too generic and "MCP" in a plugin name; test case 3 now matches the indexed folders (archive folders are excluded by default).
…ist (#1485) In the demo data the 2026 PDF and Excel price lists of Brandt Türen differ for BR-12103; the test case and the first default prompt now name the PDF, so the expected answer is unambiguous.
helpcodeai
enabled auto-merge (squash)
November 3, 2026 15:16
ChatGPT does not show image content from a tool result inline, so the view_document_page case would not produce the expected result in review; get_file_link was checked end to end on ChatGPT web.
Leads with the protocol words people search for; the brand at the end satisfies the portal's check against generic names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A second plugin for OpenAI's plugin directory, for File Search only. The database plugin on
/mcp/chatgpt-appis in review and stays untouched. The earlier submissions were rejected as a relay of third-party integrations; File Search has nothing third-party behind it, and the folder setup runs while ChatGPT is being connected, so the reviewer sees a complete workflow.Changes
POST /mcp/file-search: 8 fixed tools (list_file_sources,search_documents,find_files,list_folder,read_document,find_exact_text,view_document_page,get_file_link), each mapped to one FILE_SEARCH built-in by its endpoint method and run throughdeps.execute(scope, role, folder rules, audit). Only File Search sources; no catalog connectors, databases, File Share orshare_file. All hints explicit; onlyget_file_linkis not read-only (it stores a members-only link). Searches run over every folder when nosourceis given.ResourceIndicatorMiddlewaresets a signedmcp_appcookie whenresourceis/mcp/file-search(the server-id cookie is unchanged). After Approve, an ADMIN of a workspace without an active File Search folder gets "Connect a folder for " with the protocols and NAS presets; otherwise the flow goes straight back. The first-connector page is unchanged for every other client.POST /auth/file-search/session: dashboard session on the granted workspace plus the wizard path for a fixed option. Needs the page's CSRF token and cookie, the dashboard header, the pending login cookie, an authorization that asked for/mcp/file-search, the recent sign-in of the same user, and ADMIN.GET /auth/file-search/continuefinishes the paused authorization, or says how to go on when it expired./setup/file-search; the wizard'sreturn=authorizemode (banner with Skip, granted servers preselected, back to the authorization after Activate). Without the parameter the wizard is unchanged. NewfileSearch.authorizestrings in EN/DE/IT.file_search_authorize_offered(server-only); wizard entry pointauthorize.deploy/openai-plugins/file-search/(manifest with listing, keywords, 5+3 test cases on the demo bucket, onboarding skill, icon). No "MCP" in the plugin name.docs/integrations/chatgpt.mdsection; llms-full.txt regenerated.Cloud and self-hosted behave the same; on a self-hosted Community edition the wizard shows its File Search trial/licence state. The network-folder option is offered on self-hosted only. No schema change.
Type
Testing
Commands and results:
packages/backend:npx prisma generate,npx tsc --noEmit -p tsconfig.jsonpassed;npx eslinton the changed files: no findings;npx jest --maxWorkers=4: 996 suites passed (6 skipped), 30,473 tests passed.file-search-app-toolset.spec.ts(11),file-search-app.controller.spec.ts(7),login.controller.file-search.spec.ts(16), additions toresource-indicator.middleware.spec.ts. Existing login, server picker and social login specs unchanged and passing.packages/frontend:npx tsc --noEmit -p tsconfig.jsonpassed;npx eslinton the changed files: no errors, 3 warnings that exist on main.node scripts/generate-llms-txt.mjs --check: fresh.Manual, local backend built from this branch (port 4400, own database) and
next devon 3400:resource_metadatafor/mcp/file-search; DCR client;/authorizewithresource=…/mcp/file-searchsetsmcp_app; Approve shows the setup page with every protocol; hand-off refused without header, with a wrong CSRF token, with an unknown option; accepted for Nextcloud with the granted server; the session works on/api/file-search/capabilities; continue →/callback→ code → token;tools/listreturns the 8 tools;list_file_sourceswithout a folder returns the wizard link;/mcp/chatgpt-appstill lists its 8 tools; the database plugin's authorization goes straight to/callback.return=authorize&servers=…kept in the URL.Checklist
npm test)Related Issues
Fixes #1485