Repository navigation
Show Claude users how to add apps from the chat - #1441
Merged
Merged
Conversation
Rewrite the default /mcp profile's instructions and the list/search tool descriptions so they say up front that apps are added in the chat. A search that matches nothing in the workspace now lists catalog apps that can be added, with the exact call. Record shared tool calls once per workspace, tool and UTC day (shared_tool_called), and add an optional quick-setup app picker to the Cloud post-approve page (post_approve_app_picked). Default example request is now Telegram.
…size Pass an optional, server-set via to the setup service's find and install: post-approve picks log setup_completed via 'post_approve' and fallback catalog lookups log catalog_search via 'mcp_search_fallback', so neither counts as a chat setup or search. setup_find_connectors states the catalog size from the catalog instead of a hard-coded 265. The picker marks chips aria-disabled instead of disabled, so keyboard focus stays on the picked app.
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
Most new Cloud workspaces that connect from the Claude connectors directory never search for an app, in the chat or on the website. After approving, they land back in Claude with an empty workspace. Nothing in the default tool set told Claude that apps can be added from the chat, and nothing named an app. A request like "help me with my Etsy shop" gave Claude no reason to call AnythingMCP. The in-chat setup tools existed but sat several hops deep, and a search for "etsy" in an empty workspace returned nothing. We also had no record of whether new workspaces call the meta tools at all.
This PR changes what the default (Claude) profile says and answers. It does not change which tools it lists, their names or their input schemas. It also measures the calls and adds an optional one-click app picker to the Cloud post-approve page.
Changes
shared_tool_called(packages/backend/src/mcp-server/shared-tool-calls.ts):tool,profile,client(the OAuth client name, when known) andsetupTool(the AnythingMCP Setup tool thatanythingmcp_run_read_tool/anythingmcp_run_write_toolran).post_approve_app_picked.tool,profileandsetupToolare now allowed metadata keys;profileandsetupToolaccept only fixed values.shared-toolset.ts):SHARED_TOOLSET_INSTRUCTIONSnow opens with "Apps can be added right here in the chat". It names Telegram, Shopify, WooCommerce, Odoo, Gmail and Etsy (all in the catalog) and gives the exact run_read_tool / run_write_tool calls forsetup_find_connectors,setup_install_connectorandsetup_get_status. Secrets only go through the link.anythingmcp_get_configuration_urlmoved to the end, as the fallback.anythingmcp_list_connectorsandanythingmcp_search_toolsnow say they also show apps that can still be added, and name a few. The configuration-url description mentions adding from the chat.anythingmcp_search_toolsfinds no workspace tool for a non-empty query, it now does one of two things. Setup tools that only match generic words such as "shop" do not count as a find.notReadyYetwith the finish link.deps.setup), it runs the samesetup_find_connectorssearch with limit 3. It returnscanBeAdded: [{ adapter, name, whatSetupInvolves, howToAdd }]plus a one-line hint. Already installed apps are left out.howToAdd: on the default profile it is{ tool: 'anythingmcp_run_write_tool', arguments: { tool: 'setup_install_connector', arguments: { adapter } } }. On ChatGPT it isanythingmcp_add_connector. For File Search entries it is the wizardsetupUrl.isExcludedAdapterSlug/sharedEndpointAccess) apply unchanged, because this runs the setup service'sfind.run_read_tool/run_write_toolalready accepted the setup tools without a priordescribe_tool; a spec now proves it for all three. Calling a setup tool without permission used to return "No tool named …". It now says that adding apps is open to admins and editors and points to the dashboard.needsSetupwith itsfinishSetupUrl. The hint now tells Claude to give that link first.renderFirstConnectorOffer). Cloud only, same conditions as before: empty workspace, ADMIN or EDITOR, and the client did not ask for one server's URL.POST /auth/first-app. The endpoint checks:first_app_csrf;login_usercookie that the paused authorization already relies on;canSetUpandinstallrun with no secrets, which keeps the role check, plan limit, hourly cap and security event. The endpoint logspost_approve_app_picked(status: added | failed). The page then shows "Telegram added — you'll finish it in Claude" and the example request becomes "Finish setting up my Telegram connector."claude.ai, the same click also openshttps://claude.ai/new?q=<request>in a new tab (window.openin the click handler).docs/integrations/claude.mdgains a paragraph on the post-approve page and on adding apps from the chat.llms-full.txtis regenerated to match.Follow-ups (second and third commits)
ConnectorSetupService.findandinstalltake an optional third argument,{ via }. Only the server sets it; tool arguments never reach it.setup_completedwithvia: 'post_approve', so it does not count as a chat setup (via: 'mcp').catalog_searchwithvia: 'mcp_search_fallback', apart fromsetup_find_connectorssearches (via: 'mcp').connector-setup.service.tsstays insidefind,installand their event logging.setup_find_connectorsdescription used a hard-coded "265 ready connectors"; the catalog has 691. It now reads the count from the catalog when the module loads, rounded down to ten ("690+"). This is the virtual setup tool, so it is the same on both profiles. The ChatGPTanythingmcp_find_connectorsdescription never had a number and is unchanged.aria-disabledinstead ofdisabled, and the "Another app" field becomes read-only. A disabled button had dropped keyboard focus to the page body.Reviewed tool list: intentional change
The default profile still lists the same eight tools, with the same names, input schemas and annotations;
shared-toolset.discoverability.spec.tsnow pins all three explicitly. The instructions and the descriptions ofanythingmcp_list_connectors,anythingmcp_search_toolsandanythingmcp_get_configuration_urlchanged on purpose. The existing guarding specs compare againstSHARED_TOOLSET_INSTRUCTIONSand still pass; the new spec checks the new text.Type
Cloud vs self-hosted
/mcpserves the fixed tool set (sharedEndpointMode()isfixedwhenDEPLOYMENT_MODE=cloud), so the new wording, the search fallback andshared_tool_calledapply. The post-approve page andPOST /auth/first-appexist only on Cloud./mcpservesdirecttools by default (unchanged), so none of the tool-set changes apply unless an operator setsMCP_SHARED_ENDPOINT_TOOLS=fixed. In that case they behave as on Cloud, andshared_tool_calledrows go to the instance's ownproduct_eventstable. The post-approve page is never shown on self-hosted (maybeOfferFirstConnectorreturns early), andPOST /auth/first-appanswers 404 there (spec).Testing
New and updated specs:
shared-toolset.discoverability.spec.tscovers:canBeAdded,howToAddruns as given, the ChatGPT variant, no fallback on a match / an empty query / a connector filter, failure-safe, a caller who may not add apps,notReadyYet;catalog_searchevent withvia: 'mcp_search_fallback';describe_tool;needsSetuphint;shared-tool-calls.spec.tscovers the dedup per day, tool, setup tool and workspace, the database guard, the bounded key set, a call without an OAuth client, and that it never throws.shared-endpoint.tool-calls.spec.tscovers the controller wiring, and that the server-setviareaches the setup service.connector-setup.service.spec.tscoversviadefaulting tomcp, plusmcp_search_fallbackandpost_approve.product-event.spec.tscovers the metadata enums, and that both new events are refused from a page.login.controller.spec.tscovers:data-open-chatonly for claude.ai;via: 'post_approve'; CSRF refusal (missing or wrong token); no login cookie; non-admin refusal; unknown app; install failure; 404 on self-hosted;Commands run in
packages/backend, afternpm ciat the root andnpx prisma generate:npx tsc --noEmit -p tsconfig.jsonnpm run lint--fixrewrote no other filenpx jest --maxWorkers=3 src/mcp-server src/auth src/audit src/adaptersThe full backend
npm testwas not run locally; the CI backend job ran it and passed.Commands run from the repository root:
node scripts/validate-adapters.mjsnode --test scripts/validate-adapters.test.mjs scripts/adapter-new.test.mjs scripts/generate-llms-txt.test.mjsnode --test scripts/satellites/satellites.test.mjsnode scripts/adapter-count.mjs --checknode scripts/generate-llms-txt.mjs --checkllms-full.txt(the CI run before that failed on it)No adapter JSON or counted text changed.
Manual visual check: I rendered the post-approve page with and without the card-trial line and checked it with Playwright in Chromium at 390 and 1280 px.
claude.ai/new?q=…in a new tab.Checklist
Notes and open points
claude.ai/new?q=behaviour is not documented by Anthropic. If it stops pre-filling the request, the new tab opens an empty chat and nothing else breaks.shared_tool_calledis best-effort: two backend processes can both write the first row of a day for the same workspace and tool. That is rare and harmless for a "did it happen" count.post_approve_app_pickedagainstempty_workspace_prompt(how many pick). Readsetup_completedwithvia: 'post_approve'(how many picked apps get installed), andshared_tool_calledwithsetupTool(whether the chat then finishes them).Related Issues
None.