diff --git a/doc/connections/CONNECTOR-PLAYBOOK.md b/doc/connections/CONNECTOR-PLAYBOOK.md index 6c5f7913b2f..c04bed4648c 100644 --- a/doc/connections/CONNECTOR-PLAYBOOK.md +++ b/doc/connections/CONNECTOR-PLAYBOOK.md @@ -317,6 +317,15 @@ only `customer` must not silently fall through to generic DCR. A method containing `dcr` permits the automatic CIMD/DCR tiers. Deployment-preconfigured credentials still take precedence when present. +A reviewed remote OAuth method may set `oauthClientRegistration: "dcr"` when +live provider evidence shows that its advertised CIMD route fails while DCR +works. Airtable uses this compatibility option. It requires `dcr` in +`ownershipModes`; a deployment-preconfigured client still wins, and a missing +registration endpoint fails with `oauth_dcr_not_supported`. Existing CIMD +bindings are re-registered through DCR when the method changes. Other methods +keep the normal resolution order. This option does not relax issuer, resource, +redirect URI, PKCE, or registration-response validation. + ### Credential source is not OAuth client ownership `ownershipModes` says who owns the OAuth client registration. It does not say @@ -353,6 +362,16 @@ connection, grant, catalog, profile, policy, and run state; resolves the needed secret version; projects only the reviewed headers/arguments; calls the provider; and writes redacted audit evidence. +For a reviewed remote MCP method that accepts discovery before initialization +but requires an initialized session for calls, set +`defaults.mcpSessionRequired: true`. Tavily uses this compatibility preference. +Setup persists it for new connections; discovery and execution also resolve the +curated method default for retained connections without the config flag. The +existing session cache stays scoped to the connection, grant, actor, endpoint, +and effective credential headers. Other methods retain their existing discovery fallback +and direct-call behavior. Initialize before dispatch; never retry `tools/call` +automatically after a provider error, since the first call may have mutated data. + ## Secret Storage And Lifecycle Connection credentials use the same secrets architecture as agent, project, @@ -770,7 +789,10 @@ remove it there, and increment its version when changing the default. There is no central instruction-template registry. See [Connection instructions](./CONNECTION-INSTRUCTIONS.md) for the runtime contract. -1. Add or update the provider in `scripts/ingest-app-definitions.mjs`. +1. Add or update the provider in `scripts/ingest-app-definitions.mjs` or its + reviewed source inputs at `scripts/app-definition-overrides/.json`. + Overrides use the complete AppDefinition shape and pass through the same + branding, permission-review, instruction-template, and validation pipeline. 2. Update `packages/shared/src/self-serve-mcp-research.json` when it belongs to that program. 3. Add branding provenance and assets first; generation fails closed when @@ -1719,10 +1741,16 @@ supports public clients (`token_endpoint_auth_method: "none"` plus PKCE S256) need **no pre-provisioned OAuth app at all**. At first connect the broker registers a client on the fly and stores it on the connection: -- Registration request: `client_name` `Paperclip ()`, +- Registration request: `client_name` `Paperclip `, `redirect_uris` = the instance's own callback, `grant_types` `["authorization_code", "refresh_token"]`, `response_types` `["code"]`, `token_endpoint_auth_method` `"none"`. +- Authorization servers may validate `client_name` more narrowly than the + human-readable RFC field suggests. Paperclip replaces punctuation in the + callback host with hyphens (for example, `localhost:3105` becomes + `localhost-3105`), preserving a recognizable instance label while meeting + Calendly's documented rule that names contain only alphanumeric characters, + hyphens, and spaces ([Calendly MCP DCR requirements](https://developer.calendly.com/docs/mcp/calendly-mcp-server)). - The issued `client_id` is persisted in the connection's OAuth config and any issued `client_secret` becomes a `company_secrets` ref. The registered client is **reused** for every later authorize/refresh on that connection — diff --git a/doc/connections/tool-method-permission-reviews.json b/doc/connections/tool-method-permission-reviews.json index a3618c46d06..88e88ec310e 100644 --- a/doc/connections/tool-method-permission-reviews.json +++ b/doc/connections/tool-method-permission-reviews.json @@ -23,8 +23,9 @@ "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server", "https://mcp.airtable.com/.well-known/oauth-protected-resource" ], - "reviewedAt": "2026-09-30", - "liveProof": "not-run" + "reviewedAt": "2026-10-08", + "liveProof": "DCR/HTTPS OAuth completed for one selected base only with read/write records, comments and base structure. Bounded base-name search passed in 0.6s. 46 actions (24 Read/22 Write); all 22 Write Off persisted after reload. No record data read or writes.", + "evidenceLimit": "An initial consent-flow review issue was disclosed before the completed grant; qualification stayed limited to bounded reads. No provider writes or actual agents ran. Token-refresh and actual runtime behavior remain unqualified." }, { "app": "api-key-generic", @@ -39,7 +40,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Actions depend on the operator-supplied API and key; grant read/write on the required resources at the provider. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions.", + "keyPermissions": "Actions depend on the operator-supplied API and key; grant read/write on the required resources at the provider. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions.", "evidenceLimit": "Provider documentation was unavailable or not readable during this review; metadata/registered source only. Account-bound proof remains outstanding." }, { @@ -140,7 +141,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Create/manage links in authorized groups. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Create/manage links in authorized groups. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "box", @@ -208,7 +209,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Create/stop browser sessions and run browser tasks under the API key. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Create/stop browser sessions and run browser tasks under the API key. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "candid", @@ -282,7 +283,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Cloudflare API actions selected at provider consent or on the API token. Identity scopes alone do not grant account writes. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Cloudflare API actions selected at provider consent or on the API token. Identity scopes alone do not grant account writes. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "cloudinary", @@ -338,7 +339,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Modify documents/tables permitted by the account. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Modify documents/tables permitted by the account. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "cognee", @@ -353,7 +354,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Add/process knowledge and manage authorized datasets. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Add/process knowledge and manage authorized datasets. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "composio", @@ -505,7 +506,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Use an API key for an account with write access to the meetings your agents need to share, rename, move or turn into soundbites. Paperclip cannot increase the key\u2019s permissions." + "keyPermissions": "Use an API key for an account with write access to the meetings your agents need to share, rename, move or turn into soundbites. Paperclip cannot increase the key’s permissions." }, { "app": "gauge", @@ -570,7 +571,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Repository contents, issues, pull requests and other granted toolsets; selected repos and installation/PAT permissions apply. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions.", + "keyPermissions": "Repository contents, issues, pull requests and other granted toolsets; selected repos and installation/PAT permissions apply. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions.", "evidenceLimit": "Provider documentation was unavailable or not readable during this review; metadata/registered source only. Account-bound proof remains outstanding." }, { @@ -1266,7 +1267,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Launch/manage browsers, profiles, apps and browser automation. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Launch/manage browsers, profiles, apps and browser automation. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "linear", @@ -1282,9 +1283,9 @@ "evidence": [ "https://mcp.linear.app/.well-known/oauth-protected-resource" ], - "reviewedAt": "2026-09-30", - "liveProof": "not-run", - "evidenceLimit": "Provider documentation was unavailable or not readable during this review; metadata/registered source only. Account-bound proof remains outstanding." + "reviewedAt": "2026-10-08", + "liveProof": "User-approved read/write; selected workspace returned one team in 0.3s. IDs omitted. Catalog refresh and reload retained 68 actions; all 30 write actions Off. No provider writes or actual agent runs.", + "evidenceLimit": "Browser tester account read only; provider writes, refresh-token expiry, and actual agent-adapter execution remain unqualified. Any agent company installation; UI did not allow narrowing. No actual agent ran." }, { "app": "local-falcon", @@ -1318,7 +1319,7 @@ "https://www.make.com/.well-known/oauth-authorization-server/mcp" ], "reviewedAt": "2026-09-30", - "liveProof": "not-run", + "liveProof": "2026-10-08: real Paperclip browser Test dialog environment_get returned authenticated organization/team context. Refresh/reload retained 133 actions; all 59 writes set Off and retained after reload. Company-wide installation in isolated test company, no provider write or actual adapter run. Account values excluded.", "providerDefaultReason": "Make documents selecting scopes and scenarios during its hosted connection flow. Management tools require a paid plan. Do not replace that resource selection with invented MCP client scopes." }, { @@ -1355,7 +1356,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Add/update/delete memories under the API key account. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Add/update/delete memories under the API key account. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "miro", @@ -1470,7 +1471,7 @@ ], "reviewedAt": "2026-10-02", "liveProof": "not-run", - "keyPermissions": "Project, branch, compute, snapshot, SQL and schema changes within the key\u2019s reach. A project-scoped key limits access to one project with Editor rights; personal and organization keys reach every project they can access. Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Project, branch, compute, snapshot, SQL and schema changes within the key’s reach. A project-scoped key limits access to one project with Editor rights; personal and organization keys reach every project they can access. Paperclip cannot increase an existing key’s permissions." }, { "app": "notion", @@ -1552,7 +1553,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Incident and on-call changes require a full-access API key and role access. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Incident and on-call changes require a full-access API key and role access. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "pagerduty", @@ -1567,7 +1568,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Incident and on-call changes require a full-access API key and role access. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Incident and on-call changes require a full-access API key and role access. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "planetscale", @@ -1619,9 +1620,10 @@ "https://posthog.com/docs/model-context-protocol", "https://mcp.posthog.com/.well-known/oauth-protected-resource" ], - "reviewedAt": "2026-09-30", - "liveProof": "not-run", - "providerDefaultReason": "PostHog documents the no-scope MCP setup as read/write, with optional readonly and feature filters. The authorization server advertises account administration unrelated to many tools; retain its MCP consent defaults and the existing explicit filters." + "reviewedAt": "2026-10-08", + "liveProof": "Provider read-only preset; active Paperclip project only. Authenticated profile returned in 0.7s; identity values omitted. Catalog refresh and reload retained 380 actions; all 7 write actions Off. No provider writes or actual agent runs.", + "providerDefaultReason": "PostHog documents the no-scope MCP setup as read/write, with optional readonly and feature filters. The authorization server advertises account administration unrelated to many tools; retain its MCP consent defaults and the existing explicit filters.", + "evidenceLimit": "Browser tester account read only; provider writes, refresh-token expiry, and actual agent-adapter execution remain unqualified. Any agent company installation; UI did not allow narrowing. No actual agent ran." }, { "app": "posthog", @@ -1637,7 +1639,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Analytics objects, feature flags, experiments, error triage and other enabled product actions. readonly/feature/tool filters remain enforced. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Analytics objects, feature flags, experiments, error triage and other enabled product actions. readonly/feature/tool filters remain enforced. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "postman", @@ -1705,7 +1707,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "postman", @@ -1722,7 +1724,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "postman", @@ -1739,7 +1741,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Collection/workspace/API actions supported by the selected minimal/code/full endpoint and account role. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "railway", @@ -1793,7 +1795,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Provider-authorized payment/account tools; financial policy gates remain. Live verification outstanding. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions.", + "keyPermissions": "Provider-authorized payment/account tools; financial policy gates remain. Live verification outstanding. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions.", "evidenceLimit": "Provider documentation was unavailable or not readable during this review; metadata/registered source only. Account-bound proof remains outstanding." }, { @@ -1845,7 +1847,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Edit content permitted by project role; global is MCP authorization, not a bypass of project ACLs. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Edit content permitted by project role; global is MCP authorization, not a bypass of project ACLs. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "sentry", @@ -1992,7 +1994,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Account- and sandbox-specific writes selected during Stripe consent; financial approvals and restricted-key permissions remain. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Account- and sandbox-specific writes selected during Stripe consent; financial approvals and restricted-key permissions remain. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "supabase", @@ -2037,7 +2039,7 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run", - "keyPermissions": "Project/database/environment/storage changes and Edge Function deployment. Project selection and optional read-only configuration remain authoritative. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions." + "keyPermissions": "Project/database/environment/storage changes and Edge Function deployment. Project selection and optional read-only configuration remain authoritative. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key’s permissions." }, { "app": "superagent", @@ -2297,6 +2299,251 @@ ], "reviewedAt": "2026-09-30", "liveProof": "not-run" + }, + { + "app": "tavily", + "method": "mcp-oauth", + "auth": "oauth", + "policy": "explicit", + "requestedScopes": [ + "openid", + "offline_access" + ], + "capability": "read", + "supportedActions": "Run public web search and extract content from public pages using the account’s Tavily API key and credit allowance. These are read/search operations; no provider business-record write action is exposed.", + "evidence": [ + "https://docs.tavily.com/documentation/mcp", + "https://mcp.tavily.com/.well-known/oauth-protected-resource/mcp", + "https://mcp.tavily.com/.well-known/oauth-authorization-server" + ], + "reviewedAt": "2026-10-08", + "liveProof": "2026-10-08: HTTPS OAuth connected. After the initialized-session fix, query-only public search returned five results in 1.7s. Refresh/reload retained five Read/zero Write actions. No grant expansion or writes.", + "evidenceLimit": "Two earlier searches returned HTTP 400; successful call after proactive initialization supports but does not prove cause. Provider writes, refresh-token expiry and actual agent runs unqualified. Any agent company installation in isolated test company; no actual agents ran." + }, + { + "app": "calendly", + "method": "mcp-oauth", + "auth": "oauth", + "policy": "explicit", + "requestedScopes": [ + "mcp:scheduling:read", + "mcp:scheduling:write" + ], + "capability": "write", + "supportedActions": "Read event types and scheduling availability and call supported scheduling write tools under the authorized account; the official MCP documents the same scheduling read/write scope family as the public API.", + "evidence": [ + "https://developer.calendly.com/docs/mcp/calendly-mcp-server", + "https://mcp.calendly.com/.well-known/oauth-protected-resource", + "https://calendly.com/.well-known/oauth-authorization-server" + ], + "reviewedAt": "2026-10-08", + "liveProof": "HTTPS DCR/S256 scheduling read/write grant succeeded on retry; provider profile verified the connected account. lookup_current_user passed in 2.5s. 36 actions (25 Read/11 Write); all 11 writes Off persisted after reload.", + "evidenceLimit": "Account read only; scheduling/provider writes, expiry refresh, and actual agent runtime unqualified. Any agent installation in isolated test company; no agents ran." + }, + { + "app": "exa", + "method": "public-search", + "auth": "none", + "policy": "endpoint", + "requestedScopes": [], + "capability": "read", + "supportedActions": "Public web search and webpage retrieval. Public MCP initialize and tools/list observed only web_search_exa and web_fetch_exa, both marked readOnly/idempotent; account-gated agent/advanced tools are excluded.", + "evidence": [ + "https://exa.ai/docs/get-started/exa-mcp", + "https://exa.ai/mcp", + "https://mcp.exa.ai/mcp" + ], + "reviewedAt": "2026-10-08", + "liveProof": "2026-10-08: Paperclip browser Test dialog web_search_exa returned a public repository matching the query in 2.0s; connection persisted after reload and action refresh passed. Public read only; no writes or agent-adapter run." + }, + { + "app": "firecrawl", + "method": "mcp-oauth", + "auth": "oauth", + "policy": "explicit", + "requestedScopes": [ + "firecrawl:global", + "offline_access" + ], + "capability": "write", + "supportedActions": "Full account-authorized Firecrawl MCP surface; web reads plus provider jobs such as crawl/research, which may consume team credits.", + "evidence": [ + "https://docs.firecrawl.dev/mcp-server", + "https://www.firecrawl.dev/.well-known/oauth-authorization-server", + "https://mcp.firecrawl.dev/.well-known/oauth-protected-resource/v2/mcp-oauth" + ], + "reviewedAt": "2026-10-08", + "liveProof": "not-run" + }, + { + "app": "firecrawl", + "method": "mcp-api-key", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Bearer API key may expose full Firecrawl tool surface, including crawl/research jobs billed to the selected team.", + "evidence": [ + "https://docs.firecrawl.dev/mcp-server" + ], + "reviewedAt": "2026-10-08", + "liveProof": "not-run", + "keyPermissions": "Create an API key for the intended Firecrawl team with access to the search, scrape, parse, and any job tools you intend to use. Jobs can consume credits; Paperclip cannot increase an existing key’s permissions." + }, + { + "app": "firecrawl", + "method": "keyless", + "auth": "none", + "policy": "endpoint", + "requestedScopes": [], + "capability": "read", + "supportedActions": "Keyless Firecrawl exposes firecrawl_search, firecrawl_scrape, and firecrawl_parse; public catalog initialization confirmed those three. These retrieve/search content and process supplied files; keyless usage is limited.", + "evidence": [ + "https://docs.firecrawl.dev/mcp-server", + "https://mcp.firecrawl.dev/v2/mcp" + ], + "reviewedAt": "2026-10-08", + "liveProof": "2026-10-08: Paperclip browser Test dialog firecrawl_scrape returned public page metadata and HTTP 200 (0.6s); connection persisted after reload; action refresh passed. Public read only, no writes or agent-adapter run." + }, + { + "app": "parallel-search", + "method": "public-search", + "auth": "none", + "policy": "endpoint", + "requestedScopes": [], + "capability": "read", + "supportedActions": "Public Parallel Search MCP initialize and tools/list observed only web_search and web_fetch; both tool annotations marked read-only/idempotent. Task MCP is a separate endpoint/product.", + "evidence": [ + "https://docs.parallel.ai/integrations/mcp/search-mcp", + "https://parallel.ai/articles/add-free-web-search-to-coding-agent", + "https://search.parallel.ai/mcp" + ], + "reviewedAt": "2026-10-08", + "liveProof": "2026-10-08: Paperclip browser Test dialog web_search returned 10 public results in 0.8s; connection persisted after reload and action refresh passed. Public read only; no writes or agent-adapter run." + }, + { + "app": "windsor-ai", + "method": "mcp-oauth", + "auth": "oauth", + "policy": "explicit", + "requestedScopes": [ + "create", + "delete", + "offline_access" + ], + "capability": "write", + "supportedActions": "The MCP resource explicitly challenges for create and delete even to initialize/list tools. Read tools query selected connected sources; provider-level delete can expose destructive actions on supported sources. Keep write/destructive actions Off for read qualification. Search Console source authorization is separately read-only.", + "evidence": [ + "https://mcp.windsor.ai/", + "https://mcp.windsor.ai/.well-known/oauth-protected-resource", + "https://mcp.windsor.ai/.well-known/oauth-authorization-server" + ], + "reviewedAt": "2026-10-08", + "liveProof": "User-approved create/delete/offline_access MCP scopes; separately approved read-only Search Console source, the selected Search Console property only. 54 field definitions; bounded last_7d request returned 5 daily rows dated 2026-10-01 through 2026-10-05 in 1.5s; metric values omitted. Catalog refresh and reload retained 19 actions; all 5 write actions Off. No provider writes or actual agent runs.", + "evidenceLimit": "Browser tester account read only; provider writes, refresh-token expiry, and actual agent-adapter execution remain unqualified. Just agents I pick; no agents selected." + }, + { + "app": "windsor-ai", + "method": "mcp-api-key", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Bearer key accesses Windsor MCP; actions depend on source connector/account and may include advertising or commerce changes.", + "evidence": [ + "https://mcp.windsor.ai/" + ], + "reviewedAt": "2026-10-08", + "liveProof": "not-run", + "keyPermissions": "Use an account key for the intended Windsor.ai organization and connect only source accounts needed for the task. Review write tools and source-specific effects; Paperclip cannot increase key permissions." + }, + { + "app": "gsc-wizard", + "method": "mcp-oauth", + "auth": "oauth", + "policy": "explicit", + "requestedScopes": [ + "mcp:read", + "mcp:write" + ], + "capability": "write", + "supportedActions": "Read GSC/Bing Webmaster/GA4 and related property data, plus provider-advertised tools for URL submission and other write actions; exact property/action needs catalog review.", + "evidence": [ + "https://www.gscwizard.com/claude-search-console-mcp.html", + "https://mcp.gscwizard.com/.well-known/oauth-protected-resource", + "https://tool.gscwizard.com/.well-known/oauth-authorization-server" + ], + "reviewedAt": "2026-10-08", + "liveProof": "HTTPS MCP connection with 112 actions. Account metadata, property list and seven-day performance read for the selected Search Console property passed; all 32 writes Off persisted after reload.", + "evidenceLimit": "Google identity screen showed name/profile/email only. Worker resumed to already Connected; Google completion and underlying GSC API scopes not independently verified. Paid/trial metadata provenance unknown; no payment action. No writes or agents ran." + }, + { + "app": "gsc-wizard", + "method": "mcp-api-key", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Bearer key may be read-only or read/write depending on key creation; docs cite read analytics, URL inspection, and URL submission tools.", + "evidence": [ + "https://www.gscwizard.com/claude-search-console-mcp.html", + "https://mcp.gscwizard.com/" + ], + "reviewedAt": "2026-10-08", + "liveProof": "not-run", + "keyPermissions": "At key creation, choose read-only or read/write according to the approved task. Read/write keys can reach URL-submission and related provider actions; Paperclip cannot increase an existing key’s permissions." + }, + { + "app": "airtable", + "method": "mcp-pat", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Read/update records; creation and editing in allowed bases; token scopes, base resources, roles, and organization allowlisting apply.", + "evidence": [ + "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server", + "https://support.airtable.com/articles/9934989703-creating-personal-access-tokens" + ], + "keyPermissions": "Choose provider scopes and resource bases for intended actions; token and user/base role permissions both restrict access.", + "providerDefaultReason": "The exact required scope set depends on tools and selected base resources; do not infer a broader fixed scope list.", + "reviewedAt": "2026-10-08", + "evidenceLevel": "provider-documentation-reviewed", + "liveProof": "not-run" + }, + { + "app": "linear", + "method": "mcp-api-key", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Create/update issues, projects, comments and other authorized workspace objects; key can be restricted to Read, Write, Admin, Create issues, Create comments and teams.", + "evidence": [ + "https://linear.app/docs/mcp", + "https://linear.app/docs/api-and-webhooks" + ], + "keyPermissions": "Choose intended permissions and teams when creating the personal API key. Read-only is supported with Read permission only.", + "reviewedAt": "2026-10-08", + "evidenceLevel": "provider-documentation-reviewed", + "liveProof": "not-run" + }, + { + "app": "make", + "method": "mcp-api-token", + "auth": "api_key", + "policy": "provider-key", + "requestedScopes": [], + "capability": "write", + "supportedActions": "Run selected scenarios as MCP tools; token scope and scenario access control determine availability.", + "evidence": [ + "https://developers.make.com/mcp-server/connect-using-mcp-token", + "https://developers.make.com/mcp-server/connect-using-mcp-token/usage-with-cursor" + ], + "keyPermissions": "Provider-issued Make token. Include documented mcp:use and only additional scopes required by selected scenarios; exact scopes are user selected.", + "reviewedAt": "2026-10-08", + "evidenceLevel": "provider-documentation-reviewed", + "liveProof": "not-run" } ] } diff --git a/doc/connections/verified-mcp-brand-provenance-2026-10-08.json b/doc/connections/verified-mcp-brand-provenance-2026-10-08.json new file mode 100644 index 00000000000..6e3e157298a --- /dev/null +++ b/doc/connections/verified-mcp-brand-provenance-2026-10-08.json @@ -0,0 +1,73 @@ +{ + "retrievedAt": "2026-10-08", + "providers": [ + { + "slug": "tavily", + "provider": "Tavily", + "file": "ui/public/brands/apps/tavily.png", + "sourceUrl": "https://www.tavily.com/apple-icon.png?apple-icon.2rsjznomrsf77.png", + "linkedFrom": "https://www.tavily.com/", + "retrievedAt": "2026-10-08", + "sha256": "7f8dd7b74386f30b061ddfe57e58217d6d32f9318e3f95fdf4130db6a22e60dc", + "note": "Official Tavily touch icon; retained without modification." + }, + { + "slug": "calendly", + "provider": "Calendly", + "file": "ui/public/brands/apps/calendly.png", + "sourceUrl": "https://calendly.com/media/favicon/apple-touch-icon.png", + "linkedFrom": "https://calendly.com/", + "retrievedAt": "2026-10-08", + "sha256": "96a66579d19466967a6326c6d5bab7195fd8f48dace937e84753674282e75246", + "note": "Official Calendly touch icon; retained without modification." + }, + { + "slug": "exa", + "provider": "Exa", + "catalogVisible": true, + "localAsset": "/brands/apps/exa.svg", + "sourceUrl": "https://exa.ai/assets/Exa%20Brand%20Assets.zip", + "sourceContext": "Exa Brand Assets/Logo/Icons/Icon Square.svg", + "sha256": "1bd417f607768b78e848fd49459a028b1e01e45dd26a455d3292dba4f684a290" + }, + { + "slug": "firecrawl", + "provider": "Firecrawl", + "catalogVisible": true, + "localAsset": "/brands/apps/firecrawl.svg", + "sourceUrl": "https://www.firecrawl.dev/brand/firecrawl-wordmark.svg", + "sourceContext": "https://www.firecrawl.dev/press-brand", + "sha256": "7edcff63dfe51f3129d039110786da574a8610ee0ed5998666f4663f3d744ae9" + }, + { + "slug": "parallel-search", + "provider": "Parallel Search", + "catalogVisible": true, + "localAsset": "/brands/apps/parallel.svg", + "sourceUrl": "https://assets.parallel.ai/dark-parallel-avatar-270.svg", + "sourceContext": "https://search.parallel.ai/mcp (MCP initialize icons)", + "sha256": "b02498a0d8a1047d95affc7c09e92d54e560469a45610fa4514f17e460cf695a", + "darkAsset": "/brands/apps/parallel-dark.svg", + "darkSourceUrl": "https://assets.parallel.ai/white-parallel-avatar-270.svg", + "darkSha256": "fc7f2c8b12bad544e8428ebd14d64792a6c03444533255983668af3109e676d1" + }, + { + "slug": "windsor-ai", + "provider": "Windsor.ai", + "catalogVisible": true, + "localAsset": "/brands/apps/windsor-ai.png", + "sourceUrl": "https://windsor.ai/wp-content/uploads/2020/02/favicon-310-300x300.png", + "sourceContext": "https://windsor.ai/", + "sha256": "0fd54d0fe1df834bbf86e1f738d7bdf1a26a89da9fc4e7d3b7c61e2ab2d81c57" + }, + { + "slug": "gsc-wizard", + "provider": "GSC Wizard", + "catalogVisible": true, + "localAsset": "/brands/apps/gsc-wizard.png", + "sourceUrl": "https://www.gscwizard.com/wizard-logo-icon-256_circle.png", + "sourceContext": "https://www.gscwizard.com/", + "sha256": "001469a9236ced832f82bcea0b72a9a9a7ff26cab3f58473431b9b2be66c5a19" + } + ] +} diff --git a/doc/connections/verified-mcp-qualification-2026-10-08.json b/doc/connections/verified-mcp-qualification-2026-10-08.json new file mode 100644 index 00000000000..424169d61b9 --- /dev/null +++ b/doc/connections/verified-mcp-qualification-2026-10-08.json @@ -0,0 +1,373 @@ +{ + "as_of": "2026-10-08", + "scope": "Eleven providers with successful bounded Paperclip browser action tests; seven new catalog definitions and four existing providers.", + "live_read_passes": 11, + "provider_write_calls": 0, + "actual_agent_runs": 0, + "providers": [ + { + "provider": "Airtable", + "slug": "airtable", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.airtable.com/mcp" + }, + { + "key": "mcp-pat", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.airtable.com/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "grant": "the selected test base only (one base/one workspace); records including delete, comments, fields/tables read/write.", + "tool": "Search for an Airtable base", + "result": "Bounded query the selected test base returned that base in 0.6s; ID omitted, no record data read.", + "catalog_actions": 46, + "read_actions": 24, + "write_actions": 22, + "write_policy": "All 22 write actions Off; persisted after reload", + "human_audience": "Just me", + "agent_installation_audience": "Any agent company installation; UI did not allow narrowing.", + "actual_adapter_run": false + } + }, + { + "provider": "Linear", + "slug": "linear", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.linear.app/mcp" + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.linear.app/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "tool": "List teams", + "result": "One workspace team returned in 0.3s; IDs omitted.", + "catalog_actions": 68, + "read_actions": 38, + "write_actions": 30, + "grant": "User-approved read/write; selected workspace selected.", + "agent_installation_audience": "Any agent company installation; UI did not allow narrowing. No actual agent ran.", + "human_audience": "Just me", + "write_policy": "All write actions Off; persisted after reload", + "reload": "persisted", + "actions_refresh": "passed", + "actual_adapter_run": false + } + }, + { + "provider": "Make", + "slug": "make", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.make.com" + }, + { + "key": "mcp-api-token", + "transport": "mcp_remote", + "auth": "api_key", + "server_url_template": "https://{zone}/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "actor_label": "Connector Tester", + "tool": "environment_get", + "result": "Organization/team context returned; account values omitted.", + "reload": "persisted", + "actions_refresh": "passed", + "catalog_actions": 133, + "write_actions": 59, + "write_policy": "Off; retained after reload", + "agent_installation_audience": "Company-wide in isolated test company; UI does not permit narrowing while globally installed.", + "actual_adapter_run": false + } + }, + { + "provider": "Exa", + "slug": "exa", + "live_read": "passed-public-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "public-search", + "transport": "mcp_remote", + "auth": "none", + "server_url": "https://mcp.exa.ai/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "actor_label": "Connector Tester", + "query": "Official Paperclip public project repository", + "expected_url": "https://github.com/paperclipai/paperclip", + "reload": "persisted", + "actions_refresh": "passed", + "latency_seconds": 2.0, + "tool": "web_search_exa" + } + }, + { + "provider": "Firecrawl", + "slug": "firecrawl", + "live_read": "passed-public-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.firecrawl.dev/v2/mcp-oauth" + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.firecrawl.dev/v2/mcp" + }, + { + "key": "keyless", + "transport": "mcp_remote", + "auth": "none", + "server_url": "https://mcp.firecrawl.dev/v2/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "actor_label": "Connector Tester", + "tool": "firecrawl_scrape", + "url": "https://paperclip.ing", + "expected": "Paperclip public site markdown; title and sourceURL; HTTP 200", + "latency_seconds": 0.6, + "reload": "persisted", + "actions_refresh": "passed" + } + }, + { + "provider": "PostHog", + "slug": "posthog", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.posthog.com/mcp" + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.posthog.com/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "tool": "Get user (@me)", + "result": "Authenticated profile returned in 0.7s; identity values omitted.", + "catalog_actions": 380, + "read_actions": 373, + "write_actions": 7, + "grant": "Provider read-only preset; active Paperclip project only.", + "agent_installation_audience": "Any agent company installation; UI did not allow narrowing. No actual agent ran.", + "human_audience": "Just me", + "write_policy": "All write actions Off; persisted after reload", + "reload": "persisted", + "actions_refresh": "passed", + "actual_adapter_run": false + } + }, + { + "provider": "Tavily", + "slug": "tavily", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.tavily.com/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "account_identity": "the verified user verified on provider Settings", + "catalog_actions": 5, + "read_actions": 5, + "write_actions": 0, + "actions_refresh": "passed", + "reload": "persisted", + "actual_adapter_run": false, + "read_failures": 2, + "http_status": 400, + "tool": "Search", + "result": "Query-only public web search returned five rows in 1.7s, including official paperclipai/paperclip GitHub result after proactive MCP initialization.", + "human_audience": "Just me", + "agent_installation_audience": "Any agent company installation; UI did not allow narrowing. No actual agent ran.", + "session_initialization": "Curated true default; refreshed actions before one new call.", + "diagnostic_limit": "Earlier two calls returned HTTP 400; later pass supports but does not prove the missing-session hypothesis." + } + }, + { + "provider": "Parallel Search", + "slug": "parallel-search", + "live_read": "passed-public-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "public-search", + "transport": "mcp_remote", + "auth": "none", + "server_url": "https://search.parallel.ai/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "actor_label": "Connector Tester", + "query": "Official Paperclip public project repository", + "expected_url": "https://github.com/paperclipai/paperclip", + "reload": "persisted", + "actions_refresh": "passed", + "latency_seconds": 0.8, + "tool": "web_search" + } + }, + { + "provider": "Calendly", + "slug": "calendly", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.calendly.com" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "grant": "Same HTTPS Paperclip client, Calendly MCP resource, mcp:scheduling:read and mcp:scheduling:write", + "tool": "lookup_current_user", + "result": "Succeeded in 2.5s; profile details omitted", + "catalog_actions": 36, + "read_actions": 25, + "write_actions": 11, + "write_policy": "All 11 write/destructive actions Off; persisted after reload", + "human_audience": "Just me", + "agent_installation_audience": "Any agent; narrowing disabled for installation", + "authorization_retry": "Initial generic failure; same grant succeeded on retry", + "actual_adapter_run": false + } + }, + { + "provider": "Windsor.ai", + "slug": "windsor-ai", + "live_read": "passed-account-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.windsor.ai/" + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.windsor.ai/" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "tool": "Get Fields (searchconsole), Get Data", + "result": "54 field definitions; bounded last_7d request returned 5 daily rows dated 2026-10-01 through 2026-10-05 in 1.5s; metric values omitted.", + "catalog_actions": 19, + "read_actions": 14, + "write_actions": 5, + "grant": "User-approved create/delete/offline_access MCP scopes; separately approved read-only Search Console source, the selected Search Console property only.", + "agent_installation_audience": "Just agents I pick; no agents selected.", + "human_audience": "Just me", + "write_policy": "All write actions Off; persisted after reload", + "reload": "persisted", + "actions_refresh": "passed", + "actual_adapter_run": false + } + }, + { + "provider": "GSC Wizard", + "slug": "gsc-wizard", + "live_read": "passed-source-tool-test", + "live_write": "not-run", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "server_url": "https://mcp.gscwizard.com/mcp" + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "server_url": "https://mcp.gscwizard.com/mcp" + } + ], + "proof": { + "surface": "Paperclip browser action Test dialog", + "mcp_scopes": [ + "mcp:read", + "mcp:write" + ], + "google_identity_scopes_observed": "Name/profile picture/email only", + "google_data_scopes": "Not independently verified; MCP scopes are not Google scopes", + "tools": [ + "Get account info", + "List Search Console properties", + "Get site performance summary" + ], + "result": "Account read succeeded in 0.6s; property list returned only the selected Search Console property, readable/activated/siteOwner; bounded seven-day performance summary succeeded in 1.1s through settled 2026-10-06. Metrics omitted.", + "catalog_actions": 112, + "write_actions": 32, + "write_policy": "All 32 write/destructive actions Off; persisted after reload", + "human_audience": "Just me", + "agent_installation_audience": "Any agent; narrowing disabled for installation", + "provider_access_metadata": "level paid with trial end 7 days after connectedAt; provisioning provenance unknown; no payment action", + "actual_adapter_run": false + } + } + ], + "limits": [ + "Live proof covers the recorded auth method only. Other documented methods are not independently live-qualified.", + "Provider writes, expiry refresh, and real agent-adapter sessions are unqualified.", + "GSC Wizard underlying Google data scopes and identity-flow completion provenance were not independently verified; no purchase was performed.", + "Tests ran against isolated qualification state; credentials, codes, provider response data, and private account identifiers are omitted." + ], + "repository_checks": "Full repository typecheck and build passed locally. Focused catalog, generator, OAuth/session/callback, and UI checks were run; latest CI results and any local-suite limitations are recorded in https://github.com/paperclipai/paperclip/pull/15621." +} diff --git a/doc/connections/verified-mcp-qualification-2026-10-08.md b/doc/connections/verified-mcp-qualification-2026-10-08.md new file mode 100644 index 00000000000..48119d73bf0 --- /dev/null +++ b/doc/connections/verified-mcp-qualification-2026-10-08.md @@ -0,0 +1,64 @@ +# Verified MCP connectors — 2026-10-08 + +This change includes eleven providers with successful bounded reads through +Paperclip's real browser action tester. Seven are new catalog entries: Calendly, +Exa, Firecrawl, GSC Wizard, Parallel Search, Tavily, and Windsor.ai. Airtable, +Linear, Make, and PostHog already have catalog entries. AgentMail uses the +existing full integration; this change adds no AgentMail method or channel. + +| Provider | Live read | Catalog and reload proof | Write policy during qualification | +|---|---|---|---| +| Airtable | Bounded base-name search, 0.6s | 46 actions; persisted after reload | All 22 writes Off; grant limited to one test base | +| Calendly | Current user, 2.5s | 36 actions; persisted after reload | All 11 writes Off | +| Exa | Public search found the official repository | Reload and refresh passed | No write call | +| Firecrawl | Public site scrape, HTTP 200, 0.6s | Connected with three actions; reload/refresh passed | No write call | +| GSC Wizard | Account, property list, seven-day performance summary, 1.1s | 112 actions; persisted after reload | All 32 writes Off; one selected property read | +| Linear | List teams, 0.3s | 68 actions; persisted after reload | All 30 writes Off | +| Make | Organization/team metadata | 133 actions; persisted after reload | All 59 writes Off | +| Parallel Search | Public search found the official repository | Reload and refresh passed | No write call | +| PostHog | Current user, 0.7s | 380 actions; persisted after reload | All seven writes Off; provider read-only preset | +| Tavily | Public search returned five results, 1.7s | Five read actions; persisted after reload | No write actions discovered | +| Windsor.ai | Source fields and bounded five-day Search Console data, 1.5s | 19 actions; persisted after reload | All five writes Off; Google source read-only | + +The catalog keeps documented read/write capabilities. The test policy above +records the qualification settings; it does not change normal catalog defaults +or prove provider write behavior. Alternative documented auth methods were not +independently live-tested. No provider writes or actual agent sessions ran. +Several test-company installations report Any agent because scoped-agent +selection is unavailable; no agent runtime was started. Windsor used no agents. + +Airtable requires reviewed DCR registration because its advertised CIMD flow +failed live. Calendly requires a compatible client name. Tavily's search passed +after proactive MCP initialization; two earlier HTTP 400 failures remain +undiagnosed. Calls are never automatically replayed. Firecrawl exposed an +optional nested-object form validation issue, which is fixed in the shared form. +The setup UI now displays the callback supplied by the server for HTTPS hosts. + +GSC Wizard's resumed tab was already Connected before the worker continued. +The Google identity screen showed name/profile/email only; underlying Google +Search Console scopes were not independently verified. Provider metadata reports +paid/trial access of unknown provisioning provenance; no payment was made. +Airtable's worker submitted an expanded grant before revised action-time review. +The exact access and error were disclosed, and the user directed continuation +with the requested one-base grant. This procedural error is retained in the +qualification record; no subsequent grant expansion or provider write occurred. + +[Machine-readable proof](verified-mcp-qualification-2026-10-08.json) and +[brand provenance](verified-mcp-brand-provenance-2026-10-08.json) record the scope. +Private account identifiers, credentials, OAuth state/codes, and returned metrics +are omitted. The original research and unfinished providers are preserved on a +separate local checkpoint branch and are outside this PR. + +Repository validation is recorded in the PR description after checks complete. +Browser proof establishes these reads, not expiry refresh, provider writes, or +execution through an actual agent adapter. + +## PR UI retest + +The PR checkout UI was previewed on a separate loopback port against the existing, authorized local qualification server. This retest covers frontend behavior; it is not a new live proof of the revised server OAuth recovery path. Calendly appeared connected in the catalog and its setup screen displayed before authorization. The Firecrawl scrape tester succeeded after expanding More options, entering only the public `https://paperclip.ing` URL, and leaving nested optional inputs untouched. No new provider authorization or agent heartbeat was started. + +- [Calendly catalog](verified-mcp-qualification-2026-10-08/calendly-catalog.jpg) +- [Calendly setup before authorization](verified-mcp-qualification-2026-10-08/calendly-setup.jpg) +- [Firecrawl successful read](verified-mcp-qualification-2026-10-08/firecrawl-read.jpg) + +OAuth recovery now refreshes credentials after an upstream 401 and returns `oauth_refreshed_retry_required` without replaying the tool call. The caller must retry explicitly; that invocation creates a session with refreshed credentials when required. The regression test verifies single dispatch on each invocation and fresh session/protocol headers on explicit retry. This behavior also applies to the existing managed and Vercel OAuth gateway paths. diff --git a/doc/connections/verified-mcp-qualification-2026-10-08/calendly-catalog.jpg b/doc/connections/verified-mcp-qualification-2026-10-08/calendly-catalog.jpg new file mode 100644 index 00000000000..878e3b5d3ee Binary files /dev/null and b/doc/connections/verified-mcp-qualification-2026-10-08/calendly-catalog.jpg differ diff --git a/doc/connections/verified-mcp-qualification-2026-10-08/calendly-setup.jpg b/doc/connections/verified-mcp-qualification-2026-10-08/calendly-setup.jpg new file mode 100644 index 00000000000..8a7e71e736f Binary files /dev/null and b/doc/connections/verified-mcp-qualification-2026-10-08/calendly-setup.jpg differ diff --git a/doc/connections/verified-mcp-qualification-2026-10-08/firecrawl-read.jpg b/doc/connections/verified-mcp-qualification-2026-10-08/firecrawl-read.jpg new file mode 100644 index 00000000000..a36dd7f758e Binary files /dev/null and b/doc/connections/verified-mcp-qualification-2026-10-08/firecrawl-read.jpg differ diff --git a/packages/shared/src/app-definitions.generated.ts b/packages/shared/src/app-definitions.generated.ts index a3d7fa86773..62047f770f7 100644 --- a/packages/shared/src/app-definitions.generated.ts +++ b/packages/shared/src/app-definitions.generated.ts @@ -72,23 +72,30 @@ import a70 from "./app-definitions/neon.json" with { type: "json" }; import a71 from "./app-definitions/superagent.json" with { type: "json" }; import a72 from "./app-definitions/telem.json" with { type: "json" }; import a73 from "./app-definitions/gauge.json" with { type: "json" }; -import a74 from "./app-definitions/gmail.json" with { type: "json" }; -import a75 from "./app-definitions/google-drive.json" with { type: "json" }; -import a76 from "./app-definitions/google-docs.json" with { type: "json" }; -import a77 from "./app-definitions/google-sheets.json" with { type: "json" }; -import a78 from "./app-definitions/google-slides.json" with { type: "json" }; -import a79 from "./app-definitions/google-calendar.json" with { type: "json" }; -import a80 from "./app-definitions/google-chat.json" with { type: "json" }; -import a81 from "./app-definitions/google-people.json" with { type: "json" }; -import a82 from "./app-definitions/google-workspace-search.json" with { type: "json" }; -import a83 from "./app-definitions/openai.json" with { type: "json" }; -import a84 from "./app-definitions/openrouter.json" with { type: "json" }; -import a85 from "./app-definitions/xai.json" with { type: "json" }; -import a86 from "./app-definitions/google.json" with { type: "json" }; -import a87 from "./app-definitions/bedrock.json" with { type: "json" }; -import a88 from "./app-definitions/responses-api.json" with { type: "json" }; -import a89 from "./app-definitions/messages-api.json" with { type: "json" }; -import a90 from "./app-definitions/chat-completions-api.json" with { type: "json" }; -import a91 from "./app-definitions/local.json" with { type: "json" }; +import a74 from "./app-definitions/tavily.json" with { type: "json" }; +import a75 from "./app-definitions/calendly.json" with { type: "json" }; +import a76 from "./app-definitions/exa.json" with { type: "json" }; +import a77 from "./app-definitions/firecrawl.json" with { type: "json" }; +import a78 from "./app-definitions/parallel-search.json" with { type: "json" }; +import a79 from "./app-definitions/windsor-ai.json" with { type: "json" }; +import a80 from "./app-definitions/gsc-wizard.json" with { type: "json" }; +import a81 from "./app-definitions/gmail.json" with { type: "json" }; +import a82 from "./app-definitions/google-drive.json" with { type: "json" }; +import a83 from "./app-definitions/google-docs.json" with { type: "json" }; +import a84 from "./app-definitions/google-sheets.json" with { type: "json" }; +import a85 from "./app-definitions/google-slides.json" with { type: "json" }; +import a86 from "./app-definitions/google-calendar.json" with { type: "json" }; +import a87 from "./app-definitions/google-chat.json" with { type: "json" }; +import a88 from "./app-definitions/google-people.json" with { type: "json" }; +import a89 from "./app-definitions/google-workspace-search.json" with { type: "json" }; +import a90 from "./app-definitions/openai.json" with { type: "json" }; +import a91 from "./app-definitions/openrouter.json" with { type: "json" }; +import a92 from "./app-definitions/xai.json" with { type: "json" }; +import a93 from "./app-definitions/google.json" with { type: "json" }; +import a94 from "./app-definitions/bedrock.json" with { type: "json" }; +import a95 from "./app-definitions/responses-api.json" with { type: "json" }; +import a96 from "./app-definitions/messages-api.json" with { type: "json" }; +import a97 from "./app-definitions/chat-completions-api.json" with { type: "json" }; +import a98 from "./app-definitions/local.json" with { type: "json" }; import type { AppDefinition } from "./types/app-definition.js"; -export const APP_DEFINITIONS=[a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42,a43,a44,a45,a46,a47,a48,a49,a50,a51,a52,a53,a54,a55,a56,a57,a58,a59,a60,a61,a62,a63,a64,a65,a66,a67,a68,a69,a70,a71,a72,a73,a74,a75,a76,a77,a78,a79,a80,a81,a82,a83,a84,a85,a86,a87,a88,a89,a90,a91] as AppDefinition[]; +export const APP_DEFINITIONS=[a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42,a43,a44,a45,a46,a47,a48,a49,a50,a51,a52,a53,a54,a55,a56,a57,a58,a59,a60,a61,a62,a63,a64,a65,a66,a67,a68,a69,a70,a71,a72,a73,a74,a75,a76,a77,a78,a79,a80,a81,a82,a83,a84,a85,a86,a87,a88,a89,a90,a91,a92,a93,a94,a95,a96,a97,a98] as AppDefinition[]; diff --git a/packages/shared/src/app-definitions.test.ts b/packages/shared/src/app-definitions.test.ts index 3687d047dea..6297d586bff 100644 --- a/packages/shared/src/app-definitions.test.ts +++ b/packages/shared/src/app-definitions.test.ts @@ -273,7 +273,7 @@ describe("AppDefinition catalog", () => { "google-workspace-search", ]), ); - expect(SELF_SERVE_MCP_CANDIDATES).toHaveLength(53); + expect(SELF_SERVE_MCP_CANDIDATES).toHaveLength(60); expect(BLOCKED_MCP_PROVIDERS.map((entry) => entry.slug)).toEqual([ "g2", "vercel", @@ -437,15 +437,15 @@ describe("AppDefinition catalog", () => { expect(channel("slack")?.guidanceMd).toContain("reactions"); expect(channel("slack")?.guidanceMd).toContain("direct messages"); }); - it("keeps a complete, unique, dated evidence ledger for all 56 researched MCP providers", () => { + it("keeps a complete, unique, dated evidence ledger for all 63 researched MCP providers", () => { // Ledger-wide date reflects the last full re-verification (2026-08-26); // later provider additions carry their own research evidence, but // bumping the shared date would overstate freshness for the other providers. expect(SELF_SERVE_MCP_RESEARCH.verifiedAt).toBe("2026-08-26"); - expect(SELF_SERVE_MCP_RESEARCH.entries).toHaveLength(56); + expect(SELF_SERVE_MCP_RESEARCH.entries).toHaveLength(63); expect( new Set(SELF_SERVE_MCP_RESEARCH.entries.map((entry) => entry.slug)), - ).toHaveProperty("size", 56); + ).toHaveProperty("size", 63); for (const entry of SELF_SERVE_MCP_RESEARCH.entries) { expect(new URL(entry.docsUrl).protocol).toBe("https:"); expect(new URL(entry.serverUrl).protocol).toBe("https:"); @@ -539,6 +539,30 @@ describe("AppDefinition catalog", () => { expect(credentialField).not.toHaveProperty("defaultValue"); }); + it("exposes Make with its reviewed browser OAuth and MCP token alternatives", () => { + const app = APP_STORE_DEFINITIONS.find((entry) => entry.slug === "make"); + expect(app).toBeTruthy(); + expect(APP_STORE_HIDDEN_SLUGS.has("make")).toBe(false); + expect(CONNECTABLE_APP_DEFINITIONS.some((entry) => entry.slug === "make")).toBe(true); + expect(getAvailableConnectionMethods(app!).map((method) => method.key)).toEqual([ + "mcp-oauth", + "mcp-api-token", + ]); + expect(app!.methods[0]).toMatchObject({ + transport: "mcp_remote", + auth: "oauth", + ownershipModes: ["dcr"], + defaults: { serverUrl: "https://mcp.make.com" }, + }); + expect(app!.methods[1]).toMatchObject({ + transport: "mcp_remote", + auth: "api_key", + ownershipModes: ["customer"], + defaults: { serverUrlTemplate: "https://{zone}/mcp" }, + keyPlacement: { location: "header", name: "Authorization", prefix: "Bearer " }, + }); + }); + it("uses the reviewed current endpoints and configuration modes", () => { const method = (slug: string, key?: string) => APP_DEFINITIONS.find((app) => app.slug === slug)?.methods.find( @@ -834,7 +858,6 @@ describe("AppDefinition catalog", () => { "embat", "kernel", "local-falcon", - "make", "manufact", "oreilly", "planetscale", @@ -845,7 +868,7 @@ describe("AppDefinition catalog", () => { "ticktick", "xero", ]); - expect(APP_STORE_DEFINITIONS).toHaveLength(69); + expect(APP_STORE_DEFINITIONS).toHaveLength(77); const connectableSlugs = new Set( CONNECTABLE_APP_DEFINITIONS.map((entry) => entry.slug), ); @@ -1244,6 +1267,7 @@ describe("AppDefinition catalog", () => { expect(required).toEqual([ "clickhouse:mcp-oauth:serviceId", "honcho:mcp-api-key:workspaceId", + "make:mcp-api-token:zone", "shopify:storefront-mcp:storeDomain", "shopify:ucp-commerce:storeDomain", "supabase:mcp-api-key:projectRef", @@ -1366,3 +1390,21 @@ it("validates native pool catalog entries without inventing an authentication me expect(appDefinitionSchema.safeParse({ ...entry, methods: APP_STORE_DEFINITIONS[0]!.methods }).success).toBe(false); expect(appDefinitionSchema.safeParse({ ...entry, categories: ["developer"] }).success).toBe(false); }); + +it("limits explicit DCR registration preference to remote MCP OAuth methods with DCR ownership", () => { + const entry = structuredClone(APP_DEFINITIONS.find((app) => app.slug === "airtable")!); + entry.methods[0]!.oauthClientRegistration = "dcr"; + expect(appDefinitionSchema.parse(entry).methods[0]!.oauthClientRegistration).toBe("dcr"); + + const customerOwned = structuredClone(entry); + customerOwned.methods[0]!.ownershipModes = ["customer"]; + expect(appDefinitionSchema.safeParse(customerOwned).success).toBe(false); + + const apiKey = structuredClone(entry); + apiKey.methods[0]!.auth = "api_key"; + expect(appDefinitionSchema.safeParse(apiKey).success).toBe(false); + + const nonMcp = structuredClone(entry); + nonMcp.methods[0]!.transport = "rest_api"; + expect(appDefinitionSchema.safeParse(nonMcp).success).toBe(false); +}); diff --git a/packages/shared/src/app-definitions.ts b/packages/shared/src/app-definitions.ts index 4f0a1e6c894..2e1409f9f6e 100644 --- a/packages/shared/src/app-definitions.ts +++ b/packages/shared/src/app-definitions.ts @@ -60,7 +60,6 @@ export const APP_STORE_HIDDEN_SLUGS = new Set([ "embat", "kernel", "local-falcon", - "make", "manufact", "oreilly", "planetscale", diff --git a/packages/shared/src/app-definitions/airtable.json b/packages/shared/src/app-definitions/airtable.json index ad8efa1c687..c9b216a2bbe 100644 --- a/packages/shared/src/app-definitions/airtable.json +++ b/packages/shared/src/app-definitions/airtable.json @@ -20,6 +20,7 @@ "key": "mcp-oauth", "transport": "mcp_remote", "auth": "oauth", + "oauthClientRegistration": "dcr", "ownershipModes": [ "dcr" ], @@ -45,6 +46,44 @@ "warnings": [ "An Airtable account; enterprise administrators may need to allowlist the client." ] + }, + { + "key": "mcp-pat", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a personal access token when browser sign-in is not suitable.", + "defaults": { + "serverUrl": "https://mcp.airtable.com/mcp" + }, + "guidanceMd": "Create an Airtable personal access token with the scopes and base resources required for the actions you intend to allow. MCP calls inherit your Airtable role and base permissions; organization allowlisting may still apply.", + "riskTier": "S3", + "label": "Use a personal access token", + "credentialFields": [ + { + "key": "authorization", + "label": "Airtable personal access token", + "type": "password", + "required": true, + "placeholder": "pat...", + "secret": true, + "helperMd": "Choose provider scopes and resource bases for intended actions; token and user/base role permissions both restrict access." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server", + "keys": "https://airtable.com/create/tokens" + }, + "warnings": [ + "Use a disposable or development base for initial write qualification. Enterprise admins may need to allowlist MCP access." + ] } ] } diff --git a/packages/shared/src/app-definitions/calendly.json b/packages/shared/src/app-definitions/calendly.json new file mode 100644 index 00000000000..cdedf7bed69 --- /dev/null +++ b/packages/shared/src/app-definitions/calendly.json @@ -0,0 +1,46 @@ +{ + "schemaVersion": 1, + "slug": "calendly", + "name": "Calendly", + "description": "Review Calendly event types and availability, and use supported scheduling actions.", + "categories": [ + "productivity" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/calendly.png" + }, + "urlPatterns": [ + "https://mcp.calendly.com/*" + ], + "docsUrl": "https://developer.calendly.com/docs/mcp/calendly-mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Calendly", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Connect the provider-hosted Calendly MCP server with browser sign-in.", + "defaults": { + "serverUrl": "https://mcp.calendly.com", + "scopesHint": [ + "mcp:scheduling:read", + "mcp:scheduling:write" + ] + }, + "guidanceMd": "Check the connected account, event type, timezone, availability, and attendee details before using a scheduling write. Use a test scheduling artifact only when the discovered tool explicitly supports it.", + "warnings": [ + "Calendly MCP requires DCR and OAuth 2.1 authorization-code with PKCE S256. It does not support personal access tokens or manually provisioned static OAuth clients.", + "The provider advertises both scheduling read and write scopes for full access; verify the live tool catalog before enabling booking or link creation." + ], + "consoleLinks": { + "docs": "https://developer.calendly.com/docs/mcp/calendly-mcp-server" + }, + "riskTier": "S3" + } + ] +} diff --git a/packages/shared/src/app-definitions/exa.json b/packages/shared/src/app-definitions/exa.json new file mode 100644 index 00000000000..f5e9a384c03 --- /dev/null +++ b/packages/shared/src/app-definitions/exa.json @@ -0,0 +1,34 @@ +{ + "schemaVersion": 1, + "slug": "exa", + "name": "Exa", + "description": "Search the public web and read source pages with Exa.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/exa.svg" + }, + "urlPatterns": [ + "https://mcp.exa.ai/*" + ], + "docsUrl": "https://exa.ai/docs/get-started/exa-mcp", + "methods": [ + { + "key": "public-search", + "label": "Use public Exa search", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use Exa’s public, keyless search MCP.", + "defaults": { + "serverUrl": "https://mcp.exa.ai/mcp" + }, + "guidanceMd": "The public MCP route provides web search and page fetching. Keep citations with results. Account-authenticated Agent and advanced tools are not included in this method.", + "riskTier": "S2" + } + ] +} diff --git a/packages/shared/src/app-definitions/firecrawl.json b/packages/shared/src/app-definitions/firecrawl.json new file mode 100644 index 00000000000..09f884d3dee --- /dev/null +++ b/packages/shared/src/app-definitions/firecrawl.json @@ -0,0 +1,93 @@ +{ + "schemaVersion": 1, + "slug": "firecrawl", + "name": "Firecrawl", + "description": "Search, scrape, and parse public web pages with Firecrawl.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/firecrawl.svg" + }, + "urlPatterns": [ + "https://mcp.firecrawl.dev/*" + ], + "docsUrl": "https://docs.firecrawl.dev/mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Firecrawl", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use interactive Firecrawl account authorization for the full hosted MCP tool surface.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp-oauth", + "scopesHint": [ + "firecrawl:global", + "offline_access" + ] + }, + "guidanceMd": "Sign in and choose the Firecrawl team whose usage should apply. This route exposes the account-authorized tool surface; review paid jobs and action policies before execution.", + "riskTier": "S4", + "warnings": [ + "Account authorization exposes Firecrawl’s broader hosted MCP surface, including job-based research tools that may use account credits.", + "Crawls and research jobs can use provider credits; review their tool actions and limits before execution." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a Firecrawl API key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created Firecrawl API key in a Bearer header for unattended or higher-limit access.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp" + }, + "guidanceMd": "Create a Firecrawl API key for the intended team, then connect it with a Bearer header. The authenticated server may expose additional job tools and spend team credits.", + "riskTier": "S4", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a Firecrawl API key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true, + "helperMd": "Create an API key for the intended Firecrawl team with access to the search, scrape, parse, and any job tools you intend to use. Jobs can consume credits; Paperclip cannot increase an existing key’s permissions." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://docs.firecrawl.dev/mcp-server", + "docs": "https://docs.firecrawl.dev/mcp-server" + } + }, + { + "key": "keyless", + "label": "Try keyless access", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use the rate-limited keyless public web-search route without a Firecrawl credential.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp" + }, + "guidanceMd": "The keyless route currently exposes Search, Scrape, and Parse. Keep requests bounded; these calls can consume the provider’s keyless allowance.", + "riskTier": "S2" + } + ] +} diff --git a/packages/shared/src/app-definitions/gsc-wizard.json b/packages/shared/src/app-definitions/gsc-wizard.json new file mode 100644 index 00000000000..a4ba6f183d5 --- /dev/null +++ b/packages/shared/src/app-definitions/gsc-wizard.json @@ -0,0 +1,78 @@ +{ + "schemaVersion": 1, + "slug": "gsc-wizard", + "name": "GSC Wizard", + "description": "Read Google Search Console, Bing Webmaster, and analytics data for connected properties.", + "categories": [ + "analytics" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/gsc-wizard.png" + }, + "urlPatterns": [ + "https://mcp.gscwizard.com/*" + ], + "docsUrl": "https://www.gscwizard.com/claude-search-console-mcp.html", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with GSC Wizard", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use remote OAuth authorization for the GSC Wizard MCP.", + "defaults": { + "serverUrl": "https://mcp.gscwizard.com/mcp", + "scopesHint": [ + "mcp:read", + "mcp:write" + ] + }, + "guidanceMd": "Connect the GSC Wizard account and its authorized properties. Check site identity and date bounds before querying; review any URL submission or property-changing action separately.", + "riskTier": "S3", + "warnings": [ + "Some tools may submit URLs or otherwise change external indexing state; review action details before use.", + "GSC Wizard connects multiple search and analytics providers; confirm the authorized property and action policy for each tool." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a GSC Wizard MCP key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created GSC Wizard MCP key in a Bearer header.", + "defaults": { + "serverUrl": "https://mcp.gscwizard.com/mcp" + }, + "guidanceMd": "Create a key for the intended account and select the appropriate read or write permission during key creation. Verify each connected property before querying; review URL submission actions separately.", + "riskTier": "S3", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a GSC Wizard MCP key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true, + "helperMd": "At key creation, choose read-only or read/write according to the approved task. Read/write keys can reach URL-submission and related provider actions; Paperclip cannot increase an existing key’s permissions." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://www.gscwizard.com/claude-search-console-mcp.html", + "docs": "https://www.gscwizard.com/claude-search-console-mcp.html" + } + } + ] +} diff --git a/packages/shared/src/app-definitions/linear.json b/packages/shared/src/app-definitions/linear.json index 9dc209229f6..552c1ea4ef8 100644 --- a/packages/shared/src/app-definitions/linear.json +++ b/packages/shared/src/app-definitions/linear.json @@ -33,7 +33,7 @@ "write" ] }, - "guidanceMd": "Connect Linear for issues and projects. Paperclip registers its own OAuth client with Linear's MCP server, so no developer-console setup is needed.", + "guidanceMd": "Connect Linear for issues and projects. Paperclip registers its own OAuth client with Linear MCP; no developer-console setup is needed.", "riskTier": "S2", "requiredResourceFilters": [ "workspace", @@ -57,7 +57,50 @@ "prefix": "Bearer " } } + }, + "label": "Sign in with Linear", + "consoleLinks": { + "docs": "https://linear.app/docs/mcp" } + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a Linear API key when browser sign-in is not suitable.", + "defaults": { + "serverUrl": "https://mcp.linear.app/mcp" + }, + "guidanceMd": "Create a Linear API key with the permissions needed for the actions you intend to allow. A key restricted to Read is supported for read-only use; workspace and role access still apply.", + "riskTier": "S2", + "label": "Use an API key", + "credentialFields": [ + { + "key": "authorization", + "label": "Linear API key", + "type": "password", + "required": true, + "secret": true, + "helperMd": "Choose intended permissions and teams when creating the personal API key. Read-only is supported with Read permission only.", + "placeholder": "Paste your Linear API key" + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://linear.app/docs/api-and-webhooks" + }, + "warnings": [ + "Linear’s standard MCP endpoint exposes read and write tools; review the discovered catalog and Paperclip action policies." + ] } - ] + ], + "docsUrl": "https://linear.app/docs/mcp", + "redirectConstraints": "https-or-loopback-http" } diff --git a/packages/shared/src/app-definitions/make.json b/packages/shared/src/app-definitions/make.json index 8b5584c1dbf..a8cd0bce733 100644 --- a/packages/shared/src/app-definitions/make.json +++ b/packages/shared/src/app-definitions/make.json @@ -12,7 +12,8 @@ "darkLogoUrl": "/brands/apps/make-dark.svg" }, "urlPatterns": [ - "https://mcp.make.com/*" + "https://mcp.make.com/*", + "https://*.make.com/mcp" ], "docsUrl": "https://developers.make.com/mcp-server", "redirectConstraints": "https-or-loopback-http", @@ -37,6 +38,57 @@ "warnings": [ "A Make account and access to the scenarios exposed to MCP." ] + }, + { + "key": "mcp-api-token", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a Make MCP token when browser sign-in is not suitable.", + "defaults": { + "serverUrlTemplate": "https://{zone}/mcp" + }, + "guidanceMd": "Create a Make API token with the mcp:use scope and any additional scopes required by the selected scenarios. Enter the zone host from your Make organization. The token is sent as a Bearer header and remains a secret.", + "riskTier": "S3", + "label": "Use an MCP token", + "tenantFields": [ + { + "key": "zone", + "label": "Make zone host", + "type": "text", + "required": true, + "placeholder": "eu2.make.com", + "helperMd": "Enter the zone host for your Make organization exactly as shown in the Make MCP client setup instructions. The server URL is https:///mcp.", + "validation": { + "pattern": "^[A-Za-z0-9-]+\\.make\\.com$", + "maxLength": 253 + } + } + ], + "credentialFields": [ + { + "key": "authorization", + "label": "Make MCP token", + "type": "password", + "required": true, + "placeholder": "Paste your MCP token", + "secret": true, + "helperMd": "Provider-issued Make token. Include documented mcp:use and only additional scopes required by selected scenarios; exact scopes are user selected." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://developers.make.com/mcp-server/connect-using-mcp-token" + }, + "warnings": [ + "A token is a secret; do not place it in the server URL. Scenario availability depends on token scopes and scenario access controls." + ] } ] } diff --git a/packages/shared/src/app-definitions/parallel-search.json b/packages/shared/src/app-definitions/parallel-search.json new file mode 100644 index 00000000000..cbc9843fb96 --- /dev/null +++ b/packages/shared/src/app-definitions/parallel-search.json @@ -0,0 +1,35 @@ +{ + "schemaVersion": 1, + "slug": "parallel-search", + "name": "Parallel Search", + "description": "Search the public web and extract source pages with Parallel.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/parallel.svg", + "darkLogoUrl": "/brands/apps/parallel-dark.svg" + }, + "urlPatterns": [ + "https://search.parallel.ai/*" + ], + "docsUrl": "https://docs.parallel.ai/integrations/mcp/search-mcp", + "methods": [ + { + "key": "public-search", + "label": "Use public Parallel Search", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use Parallel Search’s public, keyless MCP route.", + "defaults": { + "serverUrl": "https://search.parallel.ai/mcp" + }, + "guidanceMd": "The public route exposes web_search and web_fetch. Keep source URLs, excerpts, and retrieval context in the result; this is separate from Parallel Task MCP.", + "riskTier": "S2" + } + ] +} diff --git a/packages/shared/src/app-definitions/tavily.json b/packages/shared/src/app-definitions/tavily.json new file mode 100644 index 00000000000..3cbc727ad0e --- /dev/null +++ b/packages/shared/src/app-definitions/tavily.json @@ -0,0 +1,47 @@ +{ + "schemaVersion": 1, + "slug": "tavily", + "name": "Tavily", + "description": "Search the public web and extract page content with Tavily’s hosted MCP server.", + "categories": [ + "analytics" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/tavily.png" + }, + "urlPatterns": [ + "https://mcp.tavily.com/*" + ], + "docsUrl": "https://docs.tavily.com/documentation/mcp", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Tavily", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Connect the provider-hosted Tavily MCP server with browser sign-in.", + "defaults": { + "serverUrl": "https://mcp.tavily.com/mcp", + "scopesHint": [ + "openid", + "offline_access" + ], + "mcpSessionRequired": true + }, + "guidanceMd": "Browser sign-in requires a public HTTPS Paperclip callback; local HTTP callbacks are rejected by Tavily. Use Tavily for bounded public research. Set focused queries and relevant domains, cite the source URLs, and distinguish retrieved facts from inference. Research does not authorize contacting a company or submitting forms.", + "warnings": [ + "Tavily OAuth selects the account’s `mcp_auth_default` key when configured; otherwise it may use the personal default or first available key. Review the chosen account and usage allowance.", + "Do not use the documented API-key-in-query alternative; OAuth keeps the key out of the server URL." + ], + "consoleLinks": { + "docs": "https://docs.tavily.com/documentation/mcp" + }, + "riskTier": "S2" + } + ] +} diff --git a/packages/shared/src/app-definitions/windsor-ai.json b/packages/shared/src/app-definitions/windsor-ai.json new file mode 100644 index 00000000000..89ba85b5dc1 --- /dev/null +++ b/packages/shared/src/app-definitions/windsor-ai.json @@ -0,0 +1,80 @@ +{ + "schemaVersion": 1, + "slug": "windsor-ai", + "name": "Windsor.ai", + "description": "Query connected marketing, analytics, CRM, and warehouse data through Windsor.ai.", + "categories": [ + "analytics" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/windsor-ai.png" + }, + "urlPatterns": [ + "https://mcp.windsor.ai/*" + ], + "docsUrl": "https://mcp.windsor.ai/", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Windsor.ai", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use browser OAuth for Windsor.ai’s hosted data MCP.", + "defaults": { + "serverUrl": "https://mcp.windsor.ai/", + "scopesHint": [ + "create", + "delete", + "offline_access" + ] + }, + "guidanceMd": "Browser sign-in requires a public HTTPS Paperclip callback; local HTTP callbacks are rejected by Windsor.ai. Connect Windsor.ai, then verify which advertising, analytics, CRM, or warehouse sources are linked. Keep source account and metric definitions with results. Review any action that changes campaigns, budgets, posts, or listings.", + "riskTier": "S4", + "warnings": [ + "Windsor.ai requires the provider-level delete scope to establish the MCP session, including for read-only use. This scope may expose destructive actions; do not approve it unless those provider permissions are acceptable.", + "The server includes actions across connected marketing platforms. A source connection does not imply authorization to modify budgets or publish content.", + "The server exposes write actions across some connected ad and commerce platforms." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a Windsor.ai API key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created Windsor.ai API key as a Bearer credential.", + "defaults": { + "serverUrl": "https://mcp.windsor.ai/" + }, + "guidanceMd": "Create a Windsor.ai key for the intended account. Verify connected source accounts and action availability before use; broad tool exposure may include advertising changes.", + "riskTier": "S4", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a Windsor.ai API key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true, + "helperMd": "Use an account key for the intended Windsor.ai organization and connect only source accounts needed for the task. Review write tools and source-specific effects; Paperclip cannot increase key permissions." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://mcp.windsor.ai/", + "docs": "https://mcp.windsor.ai/" + } + } + ] +} diff --git a/packages/shared/src/connection-instructions.test.ts b/packages/shared/src/connection-instructions.test.ts index e8e415f8f3d..5095a9eeaa3 100644 --- a/packages/shared/src/connection-instructions.test.ts +++ b/packages/shared/src/connection-instructions.test.ts @@ -52,6 +52,7 @@ describe("generic connection instructions", () => { "packages/shared/src/self-serve-mcp-research.json", "doc/connections/tool-method-permission-reviews.json", "packages/shared/src/app-definitions", + "scripts/app-definition-overrides", ]) { mkdirSync(dirname(join(fixture, source)), { recursive: true }); cpSync(join(root, source), join(fixture, source), { recursive: true }); diff --git a/packages/shared/src/easy-mcp-connectors.test.ts b/packages/shared/src/easy-mcp-connectors.test.ts new file mode 100644 index 00000000000..31d14b574c4 --- /dev/null +++ b/packages/shared/src/easy-mcp-connectors.test.ts @@ -0,0 +1,70 @@ +import { describe, expect, it } from "vitest"; +import fs from "node:fs"; +import { APP_DEFINITIONS } from "./app-definitions.generated.js"; +import { appDefinitionSchema } from "./validators/app-definition.js"; + +const appBySlug = (slug: string) => { + const app = APP_DEFINITIONS.find((candidate) => candidate.slug === slug); + expect(app, "expected app definition for " + slug).toBeDefined(); + return app!; +}; + +const methodFor = (slug: string, key: string) => { + const method = appBySlug(slug).methods.find((candidate) => candidate.key === key); + expect(method, "expected method " + slug + "/" + key).toBeDefined(); + return method!; +}; + +const verifiedProviders = [ + "airtable", "calendly", "exa", "firecrawl", "gsc-wizard", "linear", + "make", "parallel-search", "posthog", "tavily", "windsor-ai", +]; +const newProviders = ["calendly", "exa", "firecrawl", "gsc-wizard", "parallel-search", "tavily", "windsor-ai"]; + +describe("verified MCP connector definitions", () => { + it("keeps the 11 qualified providers on remote MCP methods", () => { + expect(new Set(verifiedProviders).size).toBe(11); + for (const slug of verifiedProviders) { + expect(appBySlug(slug).methods.some((method) => method.transport === "mcp_remote"), slug).toBe(true); + expect(appBySlug(slug).availability?.available, slug).not.toBe(false); + } + }); + + it("parses the seven newly added definitions against the shared schema", () => { + for (const slug of newProviders) { + const definition = appBySlug(slug); + expect(appDefinitionSchema.parse(definition)).toEqual(definition); + } + }); + + it("uses reviewed DCR registration for Airtable and retains the manual key method", () => { + expect(methodFor("airtable", "mcp-oauth")).toMatchObject({ + transport: "mcp_remote", auth: "oauth", ownershipModes: ["dcr"], oauthClientRegistration: "dcr", + defaults: { serverUrl: "https://mcp.airtable.com/mcp" }, + }); + expect(methodFor("airtable", "mcp-pat")).toMatchObject({ + transport: "mcp_remote", auth: "api_key", keyPlacement: { location: "header", name: "Authorization", prefix: "Bearer " }, + }); + }); + + it("keeps keyless search endpoints credential-free", () => { + for (const [slug, key, endpoint] of [ + ["exa", "public-search", "https://mcp.exa.ai/mcp"], + ["parallel-search", "public-search", "https://search.parallel.ai/mcp"], + ]) { + const method = methodFor(slug!, key!); + expect(method).toMatchObject({ transport: "mcp_remote", auth: "none", defaults: { serverUrl: endpoint } }); + expect(method.credentialFields).toBeUndefined(); + expect(method.keyPlacement).toBeUndefined(); + } + }); + + it("retains Tavily's reviewed MCP session initialization preference", () => { + const overridePath = new URL("../../../scripts/app-definition-overrides/tavily.json", import.meta.url); + const parsed = appDefinitionSchema.parse(JSON.parse(fs.readFileSync(overridePath, "utf8"))); + expect(parsed.methods[0]?.defaults?.mcpSessionRequired).toBe(true); + const invalidTransport = structuredClone(parsed); + invalidTransport.methods[0]!.transport = "rest_api"; + expect(appDefinitionSchema.safeParse(invalidTransport).success).toBe(false); + }); +}); diff --git a/packages/shared/src/self-serve-mcp-research.json b/packages/shared/src/self-serve-mcp-research.json index c721d572f36..c743f3bb29b 100644 --- a/packages/shared/src/self-serve-mcp-research.json +++ b/packages/shared/src/self-serve-mcp-research.json @@ -27,7 +27,6 @@ { "slug": "todoist", "name": "Todoist", "wave": 1, "status": "self_serve", "docsUrl": "https://developer.todoist.com/", "serverUrl": "https://ai.todoist.net/mcp", "authMode": "dcr", "prerequisite": "A Todoist account.", "riskTier": "S3" }, { "slug": "webflow", "name": "Webflow", "wave": 1, "status": "self_serve", "docsUrl": "https://developers.webflow.com/mcp/reference/getting-started", "serverUrl": "https://mcp.webflow.com/mcp", "authMode": "dcr", "prerequisite": "A Webflow account; workspace and site roles constrain accessible sites.", "riskTier": "S3" }, { "slug": "wix", "name": "Wix", "wave": 1, "status": "self_serve", "docsUrl": "https://www.wix.com/studio/developers/mcp-server", "serverUrl": "https://mcp.wix.com/mcp", "authMode": "dcr", "prerequisite": "A Wix account with access to the relevant sites.", "riskTier": "S3" }, - { "slug": "brex", "name": "Brex", "wave": 2, "status": "self_serve", "docsUrl": "https://www.brex.com/support/using-brex-in-ai-apps", "serverUrl": "https://api.brex.com/mcp", "authMode": "dcr", "prerequisite": "Brex early access and an administrator enabling the integration; financial actions require explicit approval.", "riskTier": "S4" }, { "slug": "clickhouse", "name": "ClickHouse", "wave": 2, "status": "self_serve", "docsUrl": "https://clickhouse.com/blog/announcing-managed-clickstack-mcp-server", "serverUrl": "https://mcp.clickhouse.cloud/clickstack", "authMode": "dcr", "prerequisite": "A ClickHouse Cloud ClickStack service and its service ID.", "riskTier": "S4" }, { "slug": "egnyte", "name": "Egnyte", "wave": 2, "status": "self_serve", "docsUrl": "https://developers.egnyte.com/docs/Remote_MCP_Server", "serverUrl": "https://mcp-server.egnyte.com/mcp", "authMode": "dcr", "prerequisite": "An eligible Egnyte plan and administrator approval for external LLM access.", "riskTier": "S3" }, @@ -39,7 +38,6 @@ { "slug": "stripe", "name": "Stripe", "wave": 2, "status": "self_serve", "docsUrl": "https://docs.stripe.com/mcp", "serverUrl": "https://mcp.stripe.com", "authMode": "dcr_or_api_key", "prerequisite": "A Stripe account; the server is public preview and payment actions require explicit approval.", "riskTier": "S4" }, { "slug": "supabase", "name": "Supabase", "wave": 2, "status": "self_serve", "docsUrl": "https://supabase.com/docs/guides/ai-tools/mcp", "serverUrl": "https://mcp.supabase.com/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Supabase account; use a development project and review write actions before connecting production data.", "riskTier": "S4" }, { "slug": "ticket-tailor", "name": "Ticket Tailor", "wave": 2, "status": "self_serve", "docsUrl": "https://developers.tickettailor.com/docs/mcp/authentication/", "serverUrl": "https://mcp.tickettailor.ai/mcp", "authMode": "dcr", "prerequisite": "A Ticket Tailor account; the provider may request an API key during its hosted authorization prompt.", "riskTier": "S3" }, - { "slug": "asana", "name": "Asana", "wave": 3, "status": "self_serve", "docsUrl": "https://developers.asana.com/docs/integrating-with-asanas-mcp-server", "serverUrl": "https://mcp.asana.com/v2/mcp", "authMode": "dcr", "prerequisite": "An active Asana account. Re-verified 2026-09-28: mcp.asana.com advertises a registration endpoint and issues clients for http://localhost callbacks, so a local Paperclip registers its own OAuth client. Asana refuses non-localhost redirect URIs, so a hosted deployment still registers an app in Asana's developer console.", "riskTier": "S3" }, { "slug": "linear", "name": "Linear", "wave": 3, "status": "self_serve", "docsUrl": "https://linear.app/docs/mcp", "serverUrl": "https://mcp.linear.app/mcp", "authMode": "dcr_cimd", "prerequisite": "An active Linear workspace. Verified 2026-09-28: mcp.linear.app advertises a registration endpoint and client-ID metadata documents, so Paperclip registers its own OAuth client.", "riskTier": "S2" }, { "slug": "box", "name": "Box", "wave": 3, "status": "self_serve", "docsUrl": "https://support.box.com/hc/en-us/articles/43847256139923-Managing-Box-MCP-Servers", "serverUrl": "https://mcp.box.com", "authMode": "customer_oauth", "prerequisite": "A Box administrator creates the OAuth integration and enables AI access.", "riskTier": "S3" }, @@ -48,19 +46,24 @@ { "slug": "similarweb", "name": "Similarweb", "wave": 3, "status": "self_serve", "docsUrl": "https://developers.similarweb.com/docs/similarweb-mcp", "serverUrl": "https://mcp.similarweb.com", "authMode": "api_key", "prerequisite": "A Similarweb subscription with API access and an API key.", "riskTier": "S2" }, { "slug": "xero", "name": "Xero", "wave": 3, "status": "self_serve", "docsUrl": "https://developer.xero.com/ai", "serverUrl": "https://mcp.xero.com/mcp", "authMode": "customer_oauth", "prerequisite": "Create a Xero OAuth app and confirm the applicable AI and data-use terms before connecting.", "riskTier": "S4" }, { "slug": "zapier", "name": "Zapier", "wave": 3, "status": "self_serve", "docsUrl": "https://docs.zapier.com/mcp/quickstart", "serverUrl": "https://mcp.zapier.com/", "authMode": "generated_url", "prerequisite": "Create a Zapier MCP server, choose the actions it exposes, and paste its generated connection URL.", "riskTier": "S3" }, - { "slug": "youcom", "name": "You.com", "wave": 4, "status": "self_serve", "docsUrl": "https://you.com/docs/build-with-agents/mcp-server", "serverUrl": "https://api.you.com/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A You.com account for browser sign-in, or a You.com API key from you.com/platform for higher rate limits; a keyless free profile is also available.", "riskTier": "S2" }, - - {"slug": "fireflies", "name": "Fireflies", "wave": 4, "status": "self_serve", "docsUrl": "https://docs.fireflies.ai/getting-started/mcp-configuration", "serverUrl": "https://api.fireflies.ai/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Fireflies account with access to the meetings you want to use. API keys are available in Settings → Developer Settings.", "riskTier": "S3"}, + { "slug": "fireflies", "name": "Fireflies", "wave": 4, "status": "self_serve", "docsUrl": "https://docs.fireflies.ai/getting-started/mcp-configuration", "serverUrl": "https://api.fireflies.ai/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Fireflies account with access to the meetings you want to use. API keys are available in Settings → Developer Settings.", "riskTier": "S3" }, { "slug": "g2", "name": "G2", "wave": "blocked", "status": "blocked", "docsUrl": "https://documentation.g2.com/docs/g2-mcp-server", "serverUrl": "https://mcp.g2.com/mcp", "authMode": "provider_approval", "prerequisite": "G2 must enable cross-application token introspection before an independently registered client can work.", "riskTier": "S3" }, { "slug": "vercel", "name": "Vercel", "wave": "blocked", "status": "blocked", "docsUrl": "https://vercel.com/docs/agent-resources/vercel-mcp", "serverUrl": "https://mcp.vercel.com", "authMode": "provider_approval", "prerequisite": "Vercel currently reviews and approves MCP clients.", "riskTier": "S3" }, { "slug": "zomato", "name": "Zomato", "wave": "blocked", "status": "blocked", "docsUrl": "https://github.com/Zomato/mcp-server-manifest", "serverUrl": "https://mcp-server.zomato.com/mcp", "authMode": "provider_approval", "prerequisite": "Zomato currently limits third-party clients and requires redirect-URI allowlisting.", "riskTier": "S3" }, - {"slug": "zep", "name": "Zep", "wave": 3, "status": "self_serve", "docsUrl": "https://help.getzep.com/memory-mcp-server", "serverUrl": "https://api.getzep.com/mcp", "authMode": "dcr_cimd", "prerequisite": "A Zep project with Memory MCP enabled, available MCP seats, and Google Workspace or enterprise OIDC configured by its administrator. Project API keys do not authenticate Memory MCP.", "riskTier": "S3"}, - {"slug": "supermemory", "name": "Supermemory", "wave": 3, "status": "self_serve", "docsUrl": "https://supermemory.ai/docs/supermemory-mcp/mcp", "serverUrl": "https://mcp.supermemory.ai/mcp", "authMode": "dcr", "prerequisite": "Sign in to Supermemory and select the spaces this connection may access. The hosted MCP uses OAuth, not a developer API key.", "riskTier": "S3"}, - {"slug": "honcho", "name": "Honcho", "wave": 3, "status": "self_serve", "docsUrl": "https://honcho.dev/docs/v3/guides/integrations/mcp", "serverUrl": "https://mcp.honcho.dev", "authMode": "api_key", "prerequisite": "An API key from the Honcho dashboard. Memory is stored in your Honcho account; select workspace and peer identifiers when calling tools.", "riskTier": "S3"}, + { "slug": "zep", "name": "Zep", "wave": 3, "status": "self_serve", "docsUrl": "https://help.getzep.com/memory-mcp-server", "serverUrl": "https://api.getzep.com/mcp", "authMode": "dcr_cimd", "prerequisite": "A Zep project with Memory MCP enabled, available MCP seats, and Google Workspace or enterprise OIDC configured by its administrator. Project API keys do not authenticate Memory MCP.", "riskTier": "S3" }, + { "slug": "supermemory", "name": "Supermemory", "wave": 3, "status": "self_serve", "docsUrl": "https://supermemory.ai/docs/supermemory-mcp/mcp", "serverUrl": "https://mcp.supermemory.ai/mcp", "authMode": "dcr", "prerequisite": "Sign in to Supermemory and select the spaces this connection may access. The hosted MCP uses OAuth, not a developer API key.", "riskTier": "S3" }, + { "slug": "honcho", "name": "Honcho", "wave": 3, "status": "self_serve", "docsUrl": "https://honcho.dev/docs/v3/guides/integrations/mcp", "serverUrl": "https://mcp.honcho.dev", "authMode": "api_key", "prerequisite": "An API key from the Honcho dashboard. Memory is stored in your Honcho account; select workspace and peer identifiers when calling tools.", "riskTier": "S3" }, { "slug": "neon", "name": "Neon", "wave": 4, "status": "self_serve", "docsUrl": "https://neon.com/docs/ai/neon-mcp-server", "serverUrl": "https://mcp.neon.tech/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Neon account. The hosted server grants broad project and database management, so use a development project and review write actions before connecting production data.", "riskTier": "S4" }, { "slug": "superagent", "name": "Superagent", "wave": 4, "status": "self_serve", "docsUrl": "https://www.superagent.sh/docs/mcp", "serverUrl": "https://www.superagent.sh/mcp", "authMode": "api_key", "prerequisite": "Superagent report and triage tools consume organization credits, and deleting a finding is permanent. Set those actions to Ask first before agents run unattended.", "riskTier": "S4" }, { "slug": "telem", "name": "Telem.AI", "wave": 4, "status": "self_serve", "docsUrl": "https://docs.telem.ai", "serverUrl": "https://mcp.telem.ai/mcp", "authMode": "api_key", "prerequisite": "A Telem API key. Create one in the Telem console at app.telem.ai.", "riskTier": "S2" }, - { "slug": "gauge", "name": "Gauge", "wave": 4, "status": "self_serve", "docsUrl": "https://docs.withgauge.com/help/mcp", "serverUrl": "https://app.withgauge.com/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Gauge account. Each connection reaches one Gauge organization: sign-in uses the organization chosen during consent, and an API key uses the organization that created it.", "riskTier": "S3" } + { "slug": "gauge", "name": "Gauge", "wave": 4, "status": "self_serve", "docsUrl": "https://docs.withgauge.com/help/mcp", "serverUrl": "https://app.withgauge.com/mcp", "authMode": "dcr_or_api_key", "prerequisite": "A Gauge account. Each connection reaches one Gauge organization: sign-in uses the organization chosen during consent, and an API key uses the organization that created it.", "riskTier": "S3" }, + { "slug": "tavily", "name": "Tavily", "wave": 2, "status": "self_serve", "docsUrl": "https://docs.tavily.com/documentation/mcp", "serverUrl": "https://mcp.tavily.com/mcp", "authMode": "dcr", "prerequisite": "OAuth uses the Tavily API key selected by account settings. Name a key `mcp_auth_default` to select it explicitly; otherwise Tavily uses the personal default key or first available key.", "riskTier": "S2", "verifiedAt": "2026-10-08" }, + { "slug": "calendly", "name": "Calendly", "wave": 2, "status": "self_serve", "docsUrl": "https://developer.calendly.com/docs/mcp/calendly-mcp-server", "serverUrl": "https://mcp.calendly.com", "authMode": "dcr", "prerequisite": "Connect with a Calendly account that has the desired scheduling permissions.", "riskTier": "S3", "verifiedAt": "2026-10-08" }, + { "slug": "exa", "name": "Exa", "wave": 3, "status": "self_serve", "docsUrl": "https://exa.ai/docs/get-started/exa-mcp", "serverUrl": "https://mcp.exa.ai/mcp", "authMode": "public", "prerequisite": "The public MCP route provides web search and page fetching. Keep citations with results. Account-authenticated Agent and advanced tools are not included in this method.", "riskTier": "S3", "verifiedAt": "2026-10-08" }, + { "slug": "firecrawl", "name": "Firecrawl", "wave": 3, "status": "self_serve", "docsUrl": "https://docs.firecrawl.dev/mcp-server", "serverUrl": "https://mcp.firecrawl.dev/v2/mcp-oauth", "authMode": "dcr_or_api_key", "prerequisite": "Sign in and choose the Firecrawl team whose usage should apply. This route exposes the account-authorized tool surface; review paid jobs and action policies before execution.", "riskTier": "S4", "verifiedAt": "2026-10-08" }, + { "slug": "parallel-search", "name": "Parallel Search", "wave": 3, "status": "self_serve", "docsUrl": "https://docs.parallel.ai/integrations/mcp/search-mcp", "serverUrl": "https://search.parallel.ai/mcp", "authMode": "public", "prerequisite": "The public route exposes web_search and web_fetch. Keep source URLs, excerpts, and retrieval context in the result; this is separate from Parallel Task MCP.", "riskTier": "S3", "verifiedAt": "2026-10-08" }, + { "slug": "windsor-ai", "name": "Windsor.ai", "wave": 3, "status": "self_serve", "docsUrl": "https://mcp.windsor.ai/", "serverUrl": "https://mcp.windsor.ai/", "authMode": "dcr_or_api_key", "prerequisite": "Connect Windsor.ai, then verify which advertising, analytics, CRM, or warehouse sources are linked. Keep source account and metric definitions with results. Review any action that changes campaigns, budgets, posts, or listings.", "riskTier": "S4", "verifiedAt": "2026-10-08" }, + { "slug": "gsc-wizard", "name": "GSC Wizard", "wave": 3, "status": "self_serve", "docsUrl": "https://www.gscwizard.com/claude-search-console-mcp.html", "serverUrl": "https://mcp.gscwizard.com/mcp", "authMode": "dcr_or_api_key", "prerequisite": "Connect the GSC Wizard account and its authorized properties. Check site identity and date bounds before querying; review any URL submission or property-changing action separately.", "riskTier": "S3", "verifiedAt": "2026-10-08" } ] } diff --git a/packages/shared/src/types/app-definition.ts b/packages/shared/src/types/app-definition.ts index e00b97f4f77..72d742c8975 100644 --- a/packages/shared/src/types/app-definition.ts +++ b/packages/shared/src/types/app-definition.ts @@ -2,7 +2,7 @@ import type { ConnectionGrantKind, ToolConnectionOwnership, ToolConnectionPurpos export type AppCategory = "ai"|"analytics"|"commerce"|"communication"|"content"|"data"|"developer"|"productivity"|"other"; export type OAuthRedirectConstraints = "https-or-loopback-http"; export interface FieldDef { key:string; label:string; type:"text"|"password"|"textarea"|"datetime"|"select"|"checkbox"; required?:boolean; advanced?:boolean; hidden?:boolean; placeholder?:string; helperMd?:string; secret?:boolean; prefix?:string; defaultValue?:string|boolean; validation?:{pattern?:string;maxLength?:number}; options?:Array<{value:string;label:string}>; transport?:{location:"query"|"header";name:string;format?:"string"|"csv"|"boolean";omitFalse?:boolean} } -export interface ConnectionMethodDef { ai?: import("../ai-connections.js").AiConnectionMetadata; key:string; label?:string; purpose?:ToolConnectionPurpose; provider?:"slack"|"github"|"discord"|"microsoft-teams"|"telegram"|"agentmail"|"imessage-photon"; transport:ToolConnectionTransport; auth:"oauth"|"api_key"|"none"; oauthStrategy?:"paperclip_cloud_connector"|"paperclip_id_connector"; connectorProfile?:string; oauthClientSecretRequired?:boolean; capabilityProfile?:{key:string;label:string;description?:string}; grantKinds?:ConnectionGrantKind[]; ownershipModes:ToolConnectionOwnership[]; whenToUse:string; defaults?:{serverUrl?:string;serverUrlTemplate?:string;discoveryUrl?:string|null;serviceHost?:string;templateKey?:string;authorizationEndpoint?:string;tokenEndpoint?:string;metadataUrl?:string;scopesHint?:string[];oauthAuthorizationParams?:{access_type?:"offline";prompt?:"consent"};toolArgumentDefaults?:Record}; tenantFields?:FieldDef[]; extensionFields?:FieldDef[]; configRequirements?:{atLeastOneOf?:string[]}; credentialFields?:FieldDef[]; keyPlacement?:{location:"header"|"query"|"body_json"|"env";name:string;prefix?:string|null}; credentialSources?:{vercelConnect?:{services:string[];principalModes:VercelConnectPrincipalMode[];scopes:string[];header:{name:string;prefix?:string|null}}}; guidanceMd:string; consoleLinks?:{register?:string;keys?:string;settings?:string;docs?:string}; warnings?:string[]; variants?:Array<{key:string;label:string;whenToUse:string;tenantFields?:FieldDef[]}>; riskTier:"S1"|"S2"|"S3"|"S4"; requiredResourceFilters?:string[] } +export interface ConnectionMethodDef { ai?: import("../ai-connections.js").AiConnectionMetadata; key:string; label?:string; purpose?:ToolConnectionPurpose; provider?:"slack"|"github"|"discord"|"microsoft-teams"|"telegram"|"agentmail"|"imessage-photon"; transport:ToolConnectionTransport; auth:"oauth"|"api_key"|"none"; oauthStrategy?:"paperclip_cloud_connector"|"paperclip_id_connector"; connectorProfile?:string; oauthClientSecretRequired?:boolean; oauthClientRegistration?:"dcr"; capabilityProfile?:{key:string;label:string;description?:string}; grantKinds?:ConnectionGrantKind[]; ownershipModes:ToolConnectionOwnership[]; whenToUse:string; defaults?:{serverUrl?:string;serverUrlTemplate?:string;discoveryUrl?:string|null;serviceHost?:string;templateKey?:string;authorizationEndpoint?:string;tokenEndpoint?:string;metadataUrl?:string;scopesHint?:string[];oauthAuthorizationParams?:{access_type?:"offline";prompt?:"consent"};toolArgumentDefaults?:Record;mcpSessionRequired?:boolean}; tenantFields?:FieldDef[]; extensionFields?:FieldDef[]; configRequirements?:{atLeastOneOf?:string[]}; credentialFields?:FieldDef[]; keyPlacement?:{location:"header"|"query"|"body_json"|"env";name:string;prefix?:string|null}; credentialSources?:{vercelConnect?:{services:string[];principalModes:VercelConnectPrincipalMode[];scopes:string[];header:{name:string;prefix?:string|null}}}; guidanceMd:string; consoleLinks?:{register?:string;keys?:string;settings?:string;docs?:string}; warnings?:string[]; variants?:Array<{key:string;label:string;whenToUse:string;tenantFields?:FieldDef[]}>; riskTier:"S1"|"S2"|"S3"|"S4"; requiredResourceFilters?:string[] } export interface AppDefinition { aiConnectionRouter?: { pluginKey: string }; agentInstructions?: import("../connection-instructions.js").ConnectionInstructionTemplate; schemaVersion:1; slug:string; name:string; description:string; categories:AppCategory[]; tags?:string[]; featured?:boolean; branding:{logoUrl:string;darkLogoUrl?:string;backgroundColor?:string;accentColor?:string}; urlPatterns:string[]; docsUrl?:string; setupPrerequisite?:{title:string;description:string;steps?:string[];actionLabel:string;actionUrl:string}; redirectConstraints?:OAuthRedirectConstraints; methods:ConnectionMethodDef[]; suggestable?:boolean; availability?:{available:boolean;reason?:string;robotEmail?:string}; ownershipAvailability?:Partial> } export type SelfServeMcpAuthMode = @@ -12,6 +12,7 @@ export type SelfServeMcpAuthMode = | "customer_oauth" | "api_key" | "generated_url" + | "public" | "provider_approval"; export interface SelfServeMcpResearchEntry { @@ -24,6 +25,7 @@ export interface SelfServeMcpResearchEntry { authMode: SelfServeMcpAuthMode; prerequisite: string; riskTier: "S1" | "S2" | "S3" | "S4"; + verifiedAt?: string; } export interface SelfServeMcpResearchManifest { diff --git a/packages/shared/src/validators/app-definition.ts b/packages/shared/src/validators/app-definition.ts index d220a2d8897..9ee39a68b57 100644 --- a/packages/shared/src/validators/app-definition.ts +++ b/packages/shared/src/validators/app-definition.ts @@ -7,7 +7,7 @@ const appBrandAssetUrlSchema=z.string().refine((value)=>{ try{return new URL(value).protocol==="https:";}catch{return false;} },{message:"Brand assets must be HTTPS URLs or local /brands/apps SVG/PNG paths"}); const field=z.object({key:z.string().min(1),label:z.string().min(1),type:z.enum(["text","password","textarea","datetime","select","checkbox"]),required:z.boolean().optional(),advanced:z.boolean().optional(),hidden:z.boolean().optional(),placeholder:z.string().optional(),helperMd:z.string().optional(),secret:z.boolean().optional(),prefix:z.string().optional(),defaultValue:z.union([z.string(),z.boolean()]).optional(),validation:z.object({pattern:z.string().optional(),maxLength:z.number().int().positive().optional()}).optional(),options:z.array(z.object({value:z.string(),label:z.string()})).optional(),transport:z.object({location:z.enum(["query","header"]),name:z.string().min(1),format:z.enum(["string","csv","boolean"]).optional(),omitFalse:z.boolean().optional()}).optional()}).superRefine((v,c)=>{if(v.required&&v.type!=="checkbox"&&!v.placeholder)c.addIssue({code:"custom",message:"Required fields need placeholders",path:["placeholder"]});if(v.type==="select"&&(!v.options||v.options.length===0))c.addIssue({code:"custom",message:"Select fields need options",path:["options"]});if(v.hidden&&v.defaultValue===undefined)c.addIssue({code:"custom",message:"Hidden fields need defaults",path:["defaultValue"]})}); -export const connectionMethodDefSchema=z.object({key:z.string().min(1),label:z.string().min(1).optional(),purpose:z.union([toolConnectionPurposeSchema,z.literal("ai")]).optional(),provider:z.enum(["slack","github","discord","microsoft-teams","telegram","agentmail","imessage-photon"]).optional(),transport:z.union([toolConnectionTransportSchema,z.literal("runtime_auth")]),ai:aiConnectionMetadataSchema.optional(),auth:z.enum(["oauth","api_key","none"]),oauthStrategy:z.enum(["paperclip_cloud_connector","paperclip_id_connector"]).optional(),connectorProfile:z.string().regex(/^[a-z0-9]+(?:[.-][a-z0-9]+)*$/).optional(),oauthClientSecretRequired:z.boolean().optional(),capabilityProfile:z.object({key:z.string().min(1),label:z.string().min(1),description:z.string().min(1).optional()}).optional(),grantKinds:z.array(connectionGrantKindSchema).min(1).optional(),ownershipModes:z.array(toolConnectionOwnershipSchema).min(1),whenToUse:z.string().min(1),defaults:z.object({serverUrl:z.string().url().optional(),serverUrlTemplate:z.string().regex(/^https:\/\//).optional(),discoveryUrl:z.string().url().nullable().optional(),serviceHost:z.string().optional(),templateKey:z.string().optional(),authorizationEndpoint:z.string().url().optional(),tokenEndpoint:z.string().url().optional(),metadataUrl:z.string().url().optional(),scopesHint:z.array(z.string()).optional(),oauthAuthorizationParams:z.object({access_type:z.literal("offline").optional(),prompt:z.literal("consent").optional()}).optional(),toolArgumentDefaults:z.record(z.string(),z.unknown()).optional()}).optional(),tenantFields:z.array(field).optional(),extensionFields:z.array(field).optional(),configRequirements:z.object({atLeastOneOf:z.array(z.string().min(1)).min(1).optional()}).optional(),credentialFields:z.array(field).optional(),keyPlacement:z.object({location:z.enum(["header","query","body_json","env"]),name:z.string().min(1),prefix:z.string().nullable().optional()}).optional(),credentialSources:z.object({vercelConnect:z.object({services:z.array(z.string().min(1)).min(1),principalModes:z.array(z.enum(["app","user"])).min(1),scopes:z.array(z.string().min(1)).min(1),header:z.object({name:z.string().min(1),prefix:z.string().nullable().optional()})}).optional()}).optional(),guidanceMd:z.string().min(1),consoleLinks:z.object({register:z.string().url().optional(),keys:z.string().url().optional(),settings:z.string().url().optional(),docs:z.string().url().optional()}).optional(),warnings:z.array(z.string()).optional(),variants:z.array(z.object({key:z.string(),label:z.string(),whenToUse:z.string(),tenantFields:z.array(field).optional()})).optional(),riskTier:z.enum(["S1","S2","S3","S4"]),requiredResourceFilters:z.array(z.string()).optional()}).superRefine((v,c)=>{if((v.transport==="runtime_auth")!==Boolean(v.ai))c.addIssue({code:"custom",message:"Runtime authentication requires AI metadata and AI metadata requires runtime_auth",path:["ai"]});if(v.ai&&!AI_CONNECTION_CAPABILITIES[v.ai.provider].methods[v.ai.method])c.addIssue({code:"custom",message:"Unsupported AI sign-in method",path:["ai","method"]});if(v.ai&&v.auth!==(v.ai.method==="subscription"?"oauth":"api_key"))c.addIssue({code:"custom",message:"AI sign-in method must match authentication",path:["auth"]});const purpose=v.purpose??"tool";if((purpose==="ai")!==(v.transport==="runtime_auth"))c.addIssue({code:"custom",message:"AI methods require runtime_auth and runtime_auth requires AI purpose",path:["purpose"]});if(v.transport==="chat_sdk"&&purpose!=="channel")c.addIssue({code:"custom",message:"Chat SDK methods must be channel connections",path:["purpose"]});if(purpose==="channel"&&v.transport!=="chat_sdk"&&!(v.provider==="agentmail"&&v.transport==="rest_api"))c.addIssue({code:"custom",message:"Channel connections must use the Chat SDK transport",path:["transport"]});if(purpose==="channel"&&!v.provider)c.addIssue({code:"custom",message:"Channel connections require a chat provider",path:["provider"]});if(v.auth==="api_key"&&!v.keyPlacement&&purpose!=="channel")c.addIssue({code:"custom",message:"API-key tool methods require keyPlacement",path:["keyPlacement"]});if(v.oauthStrategy&&v.auth!=="oauth")c.addIssue({code:"custom",message:"OAuth strategies require OAuth auth",path:["oauthStrategy"]});if(v.oauthStrategy&&!v.connectorProfile)c.addIssue({code:"custom",message:"Paperclip Cloud connector methods require connectorProfile",path:["connectorProfile"]});if(v.connectorProfile&&!v.oauthStrategy)c.addIssue({code:"custom",message:"connectorProfile requires a Paperclip Cloud OAuth strategy",path:["connectorProfile"]});if(v.credentialSources?.vercelConnect&&(v.transport!=="mcp_remote"||v.auth==="none"))c.addIssue({code:"custom",message:"Vercel Connect requires an authenticated remote MCP method",path:["credentialSources","vercelConnect"]});const keys=new Set([...(v.tenantFields??[]),...(v.extensionFields??[])].map((entry)=>entry.key));for(const key of v.configRequirements?.atLeastOneOf??[])if(!keys.has(key))c.addIssue({code:"custom",message:"Config requirement references an unknown field",path:["configRequirements","atLeastOneOf"]});if(v.defaults?.serverUrl&&v.defaults.serverUrlTemplate)c.addIssue({code:"custom",message:"Use either serverUrl or serverUrlTemplate",path:["defaults"]});for(const placeholder of v.defaults?.serverUrlTemplate?.matchAll(/\{([a-zA-Z0-9_-]+)\}/g)??[])if(!keys.has(placeholder[1]))c.addIssue({code:"custom",message:"Server URL template references an unknown field",path:["defaults","serverUrlTemplate"]})}); +export const connectionMethodDefSchema=z.object({key:z.string().min(1),label:z.string().min(1).optional(),purpose:z.union([toolConnectionPurposeSchema,z.literal("ai")]).optional(),provider:z.enum(["slack","github","discord","microsoft-teams","telegram","agentmail","imessage-photon"]).optional(),transport:z.union([toolConnectionTransportSchema,z.literal("runtime_auth")]),ai:aiConnectionMetadataSchema.optional(),auth:z.enum(["oauth","api_key","none"]),oauthStrategy:z.enum(["paperclip_cloud_connector","paperclip_id_connector"]).optional(),connectorProfile:z.string().regex(/^[a-z0-9]+(?:[.-][a-z0-9]+)*$/).optional(),oauthClientSecretRequired:z.boolean().optional(),oauthClientRegistration:z.literal("dcr").optional(),capabilityProfile:z.object({key:z.string().min(1),label:z.string().min(1),description:z.string().min(1).optional()}).optional(),grantKinds:z.array(connectionGrantKindSchema).min(1).optional(),ownershipModes:z.array(toolConnectionOwnershipSchema).min(1),whenToUse:z.string().min(1),defaults:z.object({serverUrl:z.string().url().optional(),serverUrlTemplate:z.string().regex(/^https:\/\//).optional(),discoveryUrl:z.string().url().nullable().optional(),serviceHost:z.string().optional(),templateKey:z.string().optional(),authorizationEndpoint:z.string().url().optional(),tokenEndpoint:z.string().url().optional(),metadataUrl:z.string().url().optional(),scopesHint:z.array(z.string()).optional(),oauthAuthorizationParams:z.object({access_type:z.literal("offline").optional(),prompt:z.literal("consent").optional()}).optional(),toolArgumentDefaults:z.record(z.string(),z.unknown()).optional(),mcpSessionRequired:z.boolean().optional()}).optional(),tenantFields:z.array(field).optional(),extensionFields:z.array(field).optional(),configRequirements:z.object({atLeastOneOf:z.array(z.string().min(1)).min(1).optional()}).optional(),credentialFields:z.array(field).optional(),keyPlacement:z.object({location:z.enum(["header","query","body_json","env"]),name:z.string().min(1),prefix:z.string().nullable().optional()}).optional(),credentialSources:z.object({vercelConnect:z.object({services:z.array(z.string().min(1)).min(1),principalModes:z.array(z.enum(["app","user"])).min(1),scopes:z.array(z.string().min(1)).min(1),header:z.object({name:z.string().min(1),prefix:z.string().nullable().optional()})}).optional()}).optional(),guidanceMd:z.string().min(1),consoleLinks:z.object({register:z.string().url().optional(),keys:z.string().url().optional(),settings:z.string().url().optional(),docs:z.string().url().optional()}).optional(),warnings:z.array(z.string()).optional(),variants:z.array(z.object({key:z.string(),label:z.string(),whenToUse:z.string(),tenantFields:z.array(field).optional()})).optional(),riskTier:z.enum(["S1","S2","S3","S4"]),requiredResourceFilters:z.array(z.string()).optional()}).superRefine((v,c)=>{if((v.transport==="runtime_auth")!==Boolean(v.ai))c.addIssue({code:"custom",message:"Runtime authentication requires AI metadata and AI metadata requires runtime_auth",path:["ai"]});if(v.ai&&!AI_CONNECTION_CAPABILITIES[v.ai.provider].methods[v.ai.method])c.addIssue({code:"custom",message:"Unsupported AI sign-in method",path:["ai","method"]});if(v.ai&&v.auth!==(v.ai.method==="subscription"?"oauth":"api_key"))c.addIssue({code:"custom",message:"AI sign-in method must match authentication",path:["auth"]});if(v.oauthClientRegistration&&(v.auth!=="oauth"||v.transport!=="mcp_remote"||!v.ownershipModes.includes("dcr")))c.addIssue({code:"custom",message:"DCR client registration requires a remote MCP OAuth method with DCR ownership",path:["oauthClientRegistration"]});if(v.defaults?.mcpSessionRequired&&v.transport!=="mcp_remote")c.addIssue({code:"custom",message:"MCP session initialization preferences require remote MCP transport",path:["defaults","mcpSessionRequired"]});const purpose=v.purpose??"tool";if((purpose==="ai")!==(v.transport==="runtime_auth"))c.addIssue({code:"custom",message:"AI methods require runtime_auth and runtime_auth requires AI purpose",path:["purpose"]});if(v.transport==="chat_sdk"&&purpose!=="channel")c.addIssue({code:"custom",message:"Chat SDK methods must be channel connections",path:["purpose"]});if(purpose==="channel"&&v.transport!=="chat_sdk"&&!(v.provider==="agentmail"&&v.transport==="rest_api"))c.addIssue({code:"custom",message:"Channel connections must use the Chat SDK transport",path:["transport"]});if(purpose==="channel"&&!v.provider)c.addIssue({code:"custom",message:"Channel connections require a chat provider",path:["provider"]});if(v.auth==="api_key"&&!v.keyPlacement&&purpose!=="channel")c.addIssue({code:"custom",message:"API-key tool methods require keyPlacement",path:["keyPlacement"]});if(v.oauthStrategy&&v.auth!=="oauth")c.addIssue({code:"custom",message:"OAuth strategies require OAuth auth",path:["oauthStrategy"]});if(v.oauthStrategy&&!v.connectorProfile)c.addIssue({code:"custom",message:"Paperclip Cloud connector methods require connectorProfile",path:["connectorProfile"]});if(v.connectorProfile&&!v.oauthStrategy)c.addIssue({code:"custom",message:"connectorProfile requires a Paperclip Cloud OAuth strategy",path:["connectorProfile"]});if(v.credentialSources?.vercelConnect&&(v.transport!=="mcp_remote"||v.auth==="none"))c.addIssue({code:"custom",message:"Vercel Connect requires an authenticated remote MCP method",path:["credentialSources","vercelConnect"]});const keys=new Set([...(v.tenantFields??[]),...(v.extensionFields??[])].map((entry)=>entry.key));for(const key of v.configRequirements?.atLeastOneOf??[])if(!keys.has(key))c.addIssue({code:"custom",message:"Config requirement references an unknown field",path:["configRequirements","atLeastOneOf"]});if(v.defaults?.serverUrl&&v.defaults.serverUrlTemplate)c.addIssue({code:"custom",message:"Use either serverUrl or serverUrlTemplate",path:["defaults"]});for(const placeholder of v.defaults?.serverUrlTemplate?.matchAll(/\{([a-zA-Z0-9_-]+)\}/g)??[])if(!keys.has(placeholder[1]))c.addIssue({code:"custom",message:"Server URL template references an unknown field",path:["defaults","serverUrlTemplate"]})}); export const appDefinitionSchema=z.object({agentInstructions:connectionInstructionTemplateSchema.optional(),aiConnectionRouter:z.object({pluginKey:z.string().min(1)}).optional(),schemaVersion:z.literal(1),slug:z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),name:z.string().min(1),description:z.string().min(1),categories:z.array(z.enum(["ai","analytics","commerce","communication","content","data","developer","productivity","other"])).min(1),tags:z.array(z.string().min(1)).optional(),featured:z.boolean().optional(),branding:z.object({logoUrl:appBrandAssetUrlSchema,darkLogoUrl:appBrandAssetUrlSchema.optional(),backgroundColor:z.string().optional(),accentColor:z.string().optional()}),urlPatterns:z.array(z.string()),docsUrl:z.string().url().optional(),setupPrerequisite:z.object({title:z.string().min(1),description:z.string().min(1),steps:z.array(z.string().min(1)).min(1).optional(),actionLabel:z.string().min(1),actionUrl:z.string().url()} ).optional(),redirectConstraints:z.enum(["https-or-loopback-http"]).optional(),methods:z.array(connectionMethodDefSchema),suggestable:z.boolean().optional(),availability:z.object({available:z.boolean(),reason:z.string().optional(),robotEmail:z.string().optional()}).optional(),ownershipAvailability:z.object({platform_shared:z.boolean().optional(),platform_provisioned:z.boolean().optional(),customer:z.boolean().optional(),dcr:z.boolean().optional()}).optional()}).superRefine((value, ctx) => { if (value.aiConnectionRouter) { if (value.methods.length !== 0) ctx.addIssue({ code: "custom", message: "Pooled connectors use existing connections, not authentication methods", path: ["methods"] }); diff --git a/scripts/app-definition-overrides.test.mjs b/scripts/app-definition-overrides.test.mjs new file mode 100644 index 00000000000..cd24500d579 --- /dev/null +++ b/scripts/app-definition-overrides.test.mjs @@ -0,0 +1,98 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { spawnSync } from "node:child_process"; +import test from "node:test"; +import { fileURLToPath } from "node:url"; + +const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); + +const makeFixture = () => { + const root = fs.mkdtempSync(path.join(os.tmpdir(), "paperclip-app-overrides-")); + for (const relative of [ + "scripts/ingest-app-definitions.mjs", + "scripts/app-definition-overrides", + "packages/shared/src/app-definitions", + "packages/shared/src/self-serve-mcp-research.json", + "doc/connections/tool-method-permission-reviews.json", + "ui/public/brands/apps/manifest.json", + ]) { + const source = path.join(repoRoot, relative); + const target = path.join(root, relative); + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.cpSync(source, target, { recursive: true }); + } + return root; +}; + +const runIngestion = (root) => + spawnSync(process.execPath, ["scripts/ingest-app-definitions.mjs", "--definitions-only"], { + cwd: root, + encoding: "utf8", + }); + +test("provider overrides keep manifest branding and pass normal review validation", (t) => { + const root = makeFixture(); + t.after(() => fs.rmSync(root, { recursive: true, force: true })); + + const definitionPath = path.join(root, "packages/shared/src/app-definitions/github.json"); + const definition = JSON.parse(fs.readFileSync(definitionPath, "utf8")); + definition.name = "GitHub override fixture"; + definition.branding = { logoUrl: "https://untrusted.invalid/logo.svg" }; + fs.writeFileSync( + path.join(root, "scripts/app-definition-overrides/github.json"), + JSON.stringify(definition), + ); + + const result = runIngestion(root); + assert.equal(result.status, 0, result.stderr || result.stdout); + const emitted = JSON.parse(fs.readFileSync(definitionPath, "utf8")); + assert.equal(emitted.name, "GitHub override fixture"); + assert.deepEqual(emitted.branding, { + logoUrl: "/brands/apps/github.svg", + darkLogoUrl: "/brands/apps/github-dark.svg", + }); +}); + +test("provider overrides cannot add an unreviewed tool method", (t) => { + const root = makeFixture(); + t.after(() => fs.rmSync(root, { recursive: true, force: true })); + + const definitionPath = path.join(root, "packages/shared/src/app-definitions/github.json"); + const definition = JSON.parse(fs.readFileSync(definitionPath, "utf8")); + definition.methods.push({ + key: "mcp-unreviewed-fixture", + transport: "mcp_remote", + auth: "api_key", + ownershipModes: ["customer"], + defaults: { serverUrl: "https://mcp.github.com" }, + credentialFields: [ + { key: "authorization", label: "Token", type: "password", required: true, placeholder: "token", secret: true }, + ], + keyPlacement: { location: "header", name: "Authorization", prefix: "Bearer " }, + }); + fs.writeFileSync( + path.join(root, "scripts/app-definition-overrides/github.json"), + JSON.stringify(definition), + ); + + const result = runIngestion(root); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /github\/mcp-unreviewed-fixture: permission review required/); +}); + +test("Tavily curated MCP methods opt into initialized sessions", (t) => { + const root = makeFixture(); + t.after(() => fs.rmSync(root, { recursive: true, force: true })); + + const overridePath = path.join(root, "scripts/app-definition-overrides/tavily.json"); + const override = JSON.parse(fs.readFileSync(overridePath, "utf8")); + assert.equal(override.methods[0].defaults.mcpSessionRequired, true); + + const result = runIngestion(root); + assert.equal(result.status, 0, result.stderr || result.stdout); + const emittedPath = path.join(root, "packages/shared/src/app-definitions/tavily.json"); + const emitted = JSON.parse(fs.readFileSync(emittedPath, "utf8")); + assert.equal(emitted.methods[0].defaults.mcpSessionRequired, true); +}); diff --git a/scripts/app-definition-overrides/airtable.json b/scripts/app-definition-overrides/airtable.json new file mode 100644 index 00000000000..447d049fb0b --- /dev/null +++ b/scripts/app-definition-overrides/airtable.json @@ -0,0 +1,89 @@ +{ + "schemaVersion": 1, + "slug": "airtable", + "name": "Airtable", + "description": "Connect Airtable's provider-hosted MCP server.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/airtable.svg" + }, + "urlPatterns": [ + "https://mcp.airtable.com/*" + ], + "docsUrl": "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "oauthClientRegistration": "dcr", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use browser sign-in for the provider-hosted MCP server.", + "defaults": { + "serverUrl": "https://mcp.airtable.com/mcp", + "scopesHint": [ + "data.records:read", + "data.records:write", + "schema.bases:read", + "schema.bases:write", + "data.recordComments:read", + "data.recordComments:write", + "workspacesAndBases:read" + ] + }, + "guidanceMd": "Connect Airtable in the browser. An Airtable account; enterprise administrators may need to allowlist the client.", + "riskTier": "S3", + "label": "Sign in with Airtable", + "consoleLinks": { + "docs": "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server" + }, + "warnings": [ + "An Airtable account; enterprise administrators may need to allowlist the client." + ] + }, + { + "key": "mcp-pat", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a personal access token when browser sign-in is not suitable.", + "defaults": { + "serverUrl": "https://mcp.airtable.com/mcp" + }, + "guidanceMd": "Create an Airtable personal access token with the scopes and base resources required for the actions you intend to allow. MCP calls inherit your Airtable role and base permissions; organization allowlisting may still apply.", + "riskTier": "S3", + "label": "Use a personal access token", + "credentialFields": [ + { + "key": "authorization", + "label": "Airtable personal access token", + "type": "password", + "required": true, + "placeholder": "pat...", + "secret": true, + "helperMd": "Choose the scopes and base resources required for your supported read and write actions. Airtable permissions and selected base resources still apply; Paperclip cannot increase an issued token’s access." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://support.airtable.com/articles/9897799762-using-the-airtable-mcp-server", + "keys": "https://airtable.com/create/tokens" + }, + "warnings": [ + "Use a disposable or development base for initial write qualification. Enterprise admins may need to allowlist MCP access." + ] + } + ] +} diff --git a/scripts/app-definition-overrides/calendly.json b/scripts/app-definition-overrides/calendly.json new file mode 100644 index 00000000000..29fb57ee124 --- /dev/null +++ b/scripts/app-definition-overrides/calendly.json @@ -0,0 +1,45 @@ +{ + "schemaVersion": 1, + "slug": "calendly", + "name": "Calendly", + "description": "Review Calendly event types and availability, and use supported scheduling actions.", + "categories": [ + "productivity" + ], + "branding": { + "logoUrl": "/brands/apps/calendly.png" + }, + "urlPatterns": [ + "https://mcp.calendly.com/*" + ], + "docsUrl": "https://developer.calendly.com/docs/mcp/calendly-mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Calendly", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Connect the provider-hosted Calendly MCP server with browser sign-in.", + "defaults": { + "serverUrl": "https://mcp.calendly.com", + "scopesHint": [ + "mcp:scheduling:read", + "mcp:scheduling:write" + ] + }, + "guidanceMd": "Check the connected account, event type, timezone, availability, and attendee details before using a scheduling write. Use a test scheduling artifact only when the discovered tool explicitly supports it.", + "warnings": [ + "Calendly MCP requires DCR and OAuth 2.1 authorization-code with PKCE S256. It does not support personal access tokens or manually provisioned static OAuth clients.", + "The provider advertises both scheduling read and write scopes for full access; verify the live tool catalog before enabling booking or link creation." + ], + "consoleLinks": { + "docs": "https://developer.calendly.com/docs/mcp/calendly-mcp-server" + }, + "riskTier": "S3" + } + ] +} diff --git a/scripts/app-definition-overrides/exa.json b/scripts/app-definition-overrides/exa.json new file mode 100644 index 00000000000..f5e9a384c03 --- /dev/null +++ b/scripts/app-definition-overrides/exa.json @@ -0,0 +1,34 @@ +{ + "schemaVersion": 1, + "slug": "exa", + "name": "Exa", + "description": "Search the public web and read source pages with Exa.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/exa.svg" + }, + "urlPatterns": [ + "https://mcp.exa.ai/*" + ], + "docsUrl": "https://exa.ai/docs/get-started/exa-mcp", + "methods": [ + { + "key": "public-search", + "label": "Use public Exa search", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use Exa’s public, keyless search MCP.", + "defaults": { + "serverUrl": "https://mcp.exa.ai/mcp" + }, + "guidanceMd": "The public MCP route provides web search and page fetching. Keep citations with results. Account-authenticated Agent and advanced tools are not included in this method.", + "riskTier": "S2" + } + ] +} diff --git a/scripts/app-definition-overrides/firecrawl.json b/scripts/app-definition-overrides/firecrawl.json new file mode 100644 index 00000000000..936f04c0c11 --- /dev/null +++ b/scripts/app-definition-overrides/firecrawl.json @@ -0,0 +1,92 @@ +{ + "schemaVersion": 1, + "slug": "firecrawl", + "name": "Firecrawl", + "description": "Search, scrape, and parse public web pages with Firecrawl.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/firecrawl.svg" + }, + "urlPatterns": [ + "https://mcp.firecrawl.dev/*" + ], + "docsUrl": "https://docs.firecrawl.dev/mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Firecrawl", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use interactive Firecrawl account authorization for the full hosted MCP tool surface.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp-oauth", + "scopesHint": [ + "firecrawl:global", + "offline_access" + ] + }, + "guidanceMd": "Sign in and choose the Firecrawl team whose usage should apply. This route exposes the account-authorized tool surface; review paid jobs and action policies before execution.", + "riskTier": "S4", + "warnings": [ + "Account authorization exposes Firecrawl’s broader hosted MCP surface, including job-based research tools that may use account credits.", + "Crawls and research jobs can use provider credits; review their tool actions and limits before execution." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a Firecrawl API key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created Firecrawl API key in a Bearer header for unattended or higher-limit access.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp" + }, + "guidanceMd": "Create a Firecrawl API key for the intended team, then connect it with a Bearer header. The authenticated server may expose additional job tools and spend team credits.", + "riskTier": "S4", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a Firecrawl API key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://docs.firecrawl.dev/mcp-server", + "docs": "https://docs.firecrawl.dev/mcp-server" + } + }, + { + "key": "keyless", + "label": "Try keyless access", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use the rate-limited keyless public web-search route without a Firecrawl credential.", + "defaults": { + "serverUrl": "https://mcp.firecrawl.dev/v2/mcp" + }, + "guidanceMd": "The keyless route currently exposes Search, Scrape, and Parse. Keep requests bounded; these calls can consume the provider’s keyless allowance.", + "riskTier": "S2" + } + ] +} diff --git a/scripts/app-definition-overrides/gsc-wizard.json b/scripts/app-definition-overrides/gsc-wizard.json new file mode 100644 index 00000000000..dde624161c8 --- /dev/null +++ b/scripts/app-definition-overrides/gsc-wizard.json @@ -0,0 +1,77 @@ +{ + "schemaVersion": 1, + "slug": "gsc-wizard", + "name": "GSC Wizard", + "description": "Read Google Search Console, Bing Webmaster, and analytics data for connected properties.", + "categories": [ + "analytics" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/gsc-wizard.png" + }, + "urlPatterns": [ + "https://mcp.gscwizard.com/*" + ], + "docsUrl": "https://www.gscwizard.com/claude-search-console-mcp.html", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with GSC Wizard", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use remote OAuth authorization for the GSC Wizard MCP.", + "defaults": { + "serverUrl": "https://mcp.gscwizard.com/mcp", + "scopesHint": [ + "mcp:read", + "mcp:write" + ] + }, + "guidanceMd": "Connect the GSC Wizard account and its authorized properties. Check site identity and date bounds before querying; review any URL submission or property-changing action separately.", + "riskTier": "S3", + "warnings": [ + "Some tools may submit URLs or otherwise change external indexing state; review action details before use.", + "GSC Wizard connects multiple search and analytics providers; confirm the authorized property and action policy for each tool." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a GSC Wizard MCP key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created GSC Wizard MCP key in a Bearer header.", + "defaults": { + "serverUrl": "https://mcp.gscwizard.com/mcp" + }, + "guidanceMd": "Create a key for the intended account and select the appropriate read or write permission during key creation. Verify each connected property before querying; review URL submission actions separately.", + "riskTier": "S3", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a GSC Wizard MCP key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://www.gscwizard.com/claude-search-console-mcp.html", + "docs": "https://www.gscwizard.com/claude-search-console-mcp.html" + } + } + ] +} diff --git a/scripts/app-definition-overrides/linear.json b/scripts/app-definition-overrides/linear.json new file mode 100644 index 00000000000..5f11a63742c --- /dev/null +++ b/scripts/app-definition-overrides/linear.json @@ -0,0 +1,104 @@ +{ + "schemaVersion": 1, + "slug": "linear", + "name": "Linear", + "description": "Create, update, and read Linear issues.", + "categories": [ + "productivity" + ], + "featured": true, + "branding": { + "logoUrl": "/brands/apps/linear.svg", + "darkLogoUrl": "/brands/apps/linear-dark.svg" + }, + "urlPatterns": [ + "https://mcp.linear.app/*" + ], + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr", + "customer" + ], + "whenToUse": "Use the provider-hosted connection for the quickest setup.", + "defaults": { + "serverUrl": "https://mcp.linear.app/mcp", + "authorizationEndpoint": "https://linear.app/oauth/authorize", + "tokenEndpoint": "https://api.linear.app/oauth/token", + "scopesHint": [ + "read", + "write" + ] + }, + "guidanceMd": "Connect Linear for issues and projects. Paperclip registers its own OAuth client with Linear MCP; no developer-console setup is needed.", + "riskTier": "S2", + "requiredResourceFilters": [ + "workspace", + "team", + "project" + ], + "credentialSources": { + "vercelConnect": { + "services": [ + "linear" + ], + "principalModes": [ + "user" + ], + "scopes": [ + "read", + "write" + ], + "header": { + "name": "Authorization", + "prefix": "Bearer " + } + } + }, + "label": "Sign in with Linear", + "consoleLinks": { + "docs": "https://linear.app/docs/mcp" + } + }, + { + "key": "mcp-api-key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a Linear API key when browser sign-in is not suitable.", + "defaults": { + "serverUrl": "https://mcp.linear.app/mcp" + }, + "guidanceMd": "Create a Linear API key with the permissions needed for the actions you intend to allow. A key restricted to Read is supported for read-only use; workspace and role access still apply.", + "riskTier": "S2", + "label": "Use an API key", + "credentialFields": [ + { + "key": "authorization", + "label": "Linear API key", + "type": "password", + "required": true, + "secret": true, + "helperMd": "Grant Read and Write only when those actions are intended. A Read-only key is supported; the key cannot exceed the owning user\u2019s workspace access.", + "placeholder": "Paste your Linear API key" + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://linear.app/docs/api-and-webhooks" + }, + "warnings": [ + "Linear\u2019s standard MCP endpoint exposes read and write tools; review the discovered catalog and Paperclip action policies." + ] + } + ] +} diff --git a/scripts/app-definition-overrides/make.json b/scripts/app-definition-overrides/make.json new file mode 100644 index 00000000000..dff8f823a67 --- /dev/null +++ b/scripts/app-definition-overrides/make.json @@ -0,0 +1,94 @@ +{ + "schemaVersion": 1, + "slug": "make", + "name": "Make", + "description": "Connect Make's provider-hosted MCP server.", + "categories": [ + "productivity" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/make.svg", + "darkLogoUrl": "/brands/apps/make-dark.svg" + }, + "urlPatterns": [ + "https://mcp.make.com/*", + "https://*.make.com/mcp" + ], + "docsUrl": "https://developers.make.com/mcp-server", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use browser sign-in for the provider-hosted MCP server.", + "defaults": { + "serverUrl": "https://mcp.make.com" + }, + "guidanceMd": "Connect Make in the browser. A Make account and access to the scenarios exposed to MCP.", + "riskTier": "S3", + "label": "Sign in with Make", + "consoleLinks": { + "docs": "https://developers.make.com/mcp-server" + }, + "warnings": [ + "A Make account and access to the scenarios exposed to MCP." + ] + }, + { + "key": "mcp-api-token", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a Make MCP token when browser sign-in is not suitable.", + "defaults": { + "serverUrlTemplate": "https://{zone}/mcp" + }, + "guidanceMd": "Create a Make API token with the mcp:use scope and any additional scopes required by the selected scenarios. Enter the zone host from your Make organization. The token is sent as a Bearer header and remains a secret.", + "riskTier": "S3", + "label": "Use an MCP token", + "tenantFields": [ + { + "key": "zone", + "label": "Make zone host", + "type": "text", + "required": true, + "placeholder": "eu2.make.com", + "helperMd": "Enter the zone host for your Make organization exactly as shown in the Make MCP client setup instructions. The server URL is https:///mcp.", + "validation": { + "pattern": "^[A-Za-z0-9-]+\\.make\\.com$", + "maxLength": 253 + } + } + ], + "credentialFields": [ + { + "key": "authorization", + "label": "Make MCP token", + "type": "password", + "required": true, + "placeholder": "Paste your MCP token", + "secret": true, + "helperMd": "Create a Make API token that includes the provider-documented mcp:use scope and only other scopes needed by the scenario tools you intend to use." + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "docs": "https://developers.make.com/mcp-server/connect-using-mcp-token" + }, + "warnings": [ + "A token is a secret; do not place it in the server URL. Scenario availability depends on token scopes and scenario access controls." + ] + } + ] +} diff --git a/scripts/app-definition-overrides/parallel-search.json b/scripts/app-definition-overrides/parallel-search.json new file mode 100644 index 00000000000..cbc9843fb96 --- /dev/null +++ b/scripts/app-definition-overrides/parallel-search.json @@ -0,0 +1,35 @@ +{ + "schemaVersion": 1, + "slug": "parallel-search", + "name": "Parallel Search", + "description": "Search the public web and extract source pages with Parallel.", + "categories": [ + "data" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/parallel.svg", + "darkLogoUrl": "/brands/apps/parallel-dark.svg" + }, + "urlPatterns": [ + "https://search.parallel.ai/*" + ], + "docsUrl": "https://docs.parallel.ai/integrations/mcp/search-mcp", + "methods": [ + { + "key": "public-search", + "label": "Use public Parallel Search", + "transport": "mcp_remote", + "auth": "none", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use Parallel Search’s public, keyless MCP route.", + "defaults": { + "serverUrl": "https://search.parallel.ai/mcp" + }, + "guidanceMd": "The public route exposes web_search and web_fetch. Keep source URLs, excerpts, and retrieval context in the result; this is separate from Parallel Task MCP.", + "riskTier": "S2" + } + ] +} diff --git a/scripts/app-definition-overrides/tavily.json b/scripts/app-definition-overrides/tavily.json new file mode 100644 index 00000000000..97dc1d5d6b3 --- /dev/null +++ b/scripts/app-definition-overrides/tavily.json @@ -0,0 +1,46 @@ +{ + "schemaVersion": 1, + "slug": "tavily", + "name": "Tavily", + "description": "Search the public web and extract page content with Tavily\u2019s hosted MCP server.", + "categories": [ + "analytics" + ], + "branding": { + "logoUrl": "/brands/apps/tavily.png" + }, + "urlPatterns": [ + "https://mcp.tavily.com/*" + ], + "docsUrl": "https://docs.tavily.com/documentation/mcp", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Tavily", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Connect the provider-hosted Tavily MCP server with browser sign-in.", + "defaults": { + "serverUrl": "https://mcp.tavily.com/mcp", + "scopesHint": [ + "openid", + "offline_access" + ], + "mcpSessionRequired": true + }, + "guidanceMd": "Browser sign-in requires a public HTTPS Paperclip callback; local HTTP callbacks are rejected by Tavily. Use Tavily for bounded public research. Set focused queries and relevant domains, cite the source URLs, and distinguish retrieved facts from inference. Research does not authorize contacting a company or submitting forms.", + "warnings": [ + "Tavily OAuth selects the account\u2019s `mcp_auth_default` key when configured; otherwise it may use the personal default or first available key. Review the chosen account and usage allowance.", + "Do not use the documented API-key-in-query alternative; OAuth keeps the key out of the server URL." + ], + "consoleLinks": { + "docs": "https://docs.tavily.com/documentation/mcp" + }, + "riskTier": "S2" + } + ] +} diff --git a/scripts/app-definition-overrides/windsor-ai.json b/scripts/app-definition-overrides/windsor-ai.json new file mode 100644 index 00000000000..70c6dde556c --- /dev/null +++ b/scripts/app-definition-overrides/windsor-ai.json @@ -0,0 +1,79 @@ +{ + "schemaVersion": 1, + "slug": "windsor-ai", + "name": "Windsor.ai", + "description": "Query connected marketing, analytics, CRM, and warehouse data through Windsor.ai.", + "categories": [ + "analytics" + ], + "featured": false, + "branding": { + "logoUrl": "/brands/apps/windsor-ai.png" + }, + "urlPatterns": [ + "https://mcp.windsor.ai/*" + ], + "docsUrl": "https://mcp.windsor.ai/", + "redirectConstraints": "https-or-loopback-http", + "methods": [ + { + "key": "mcp-oauth", + "label": "Sign in with Windsor.ai", + "transport": "mcp_remote", + "auth": "oauth", + "ownershipModes": [ + "dcr" + ], + "whenToUse": "Use browser OAuth for Windsor.ai\u2019s hosted data MCP.", + "defaults": { + "serverUrl": "https://mcp.windsor.ai/", + "scopesHint": [ + "create", + "delete", + "offline_access" + ] + }, + "guidanceMd": "Browser sign-in requires a public HTTPS Paperclip callback; local HTTP callbacks are rejected by Windsor.ai. Connect Windsor.ai, then verify which advertising, analytics, CRM, or warehouse sources are linked. Keep source account and metric definitions with results. Review any action that changes campaigns, budgets, posts, or listings.", + "riskTier": "S4", + "warnings": [ + "Windsor.ai requires the provider-level delete scope to establish the MCP session, including for read-only use. This scope may expose destructive actions; do not approve it unless those provider permissions are acceptable.", + "The server includes actions across connected marketing platforms. A source connection does not imply authorization to modify budgets or publish content.", + "The server exposes write actions across some connected ad and commerce platforms." + ] + }, + { + "key": "mcp-api-key", + "label": "Use a Windsor.ai API key", + "transport": "mcp_remote", + "auth": "api_key", + "ownershipModes": [ + "customer" + ], + "whenToUse": "Use a customer-created Windsor.ai API key as a Bearer credential.", + "defaults": { + "serverUrl": "https://mcp.windsor.ai/" + }, + "guidanceMd": "Create a Windsor.ai key for the intended account. Verify connected source accounts and action availability before use; broad tool exposure may include advertising changes.", + "riskTier": "S4", + "credentialFields": [ + { + "key": "authorization", + "label": "Use a Windsor.ai API key", + "type": "password", + "required": true, + "placeholder": "Enter provider credential", + "secret": true + } + ], + "keyPlacement": { + "location": "header", + "name": "Authorization", + "prefix": "Bearer " + }, + "consoleLinks": { + "keys": "https://mcp.windsor.ai/", + "docs": "https://mcp.windsor.ai/" + } + } + ] +} diff --git a/scripts/ingest-app-definitions.mjs b/scripts/ingest-app-definitions.mjs index 9191eafa9dc..73151fa9125 100644 --- a/scripts/ingest-app-definitions.mjs +++ b/scripts/ingest-app-definitions.mjs @@ -185,7 +185,7 @@ const apps = [ key: "email-agent", label: "Email with an agent", purpose: "channel", provider: "agentmail", transport: "rest_api", auth: "api_key", ownershipModes: ["customer"], whenToUse: "Assign an inbox to an agent and manage email conversations in tasks.", credentialFields: [{ key: "apiKey", label: "AgentMail API key", type: "password", placeholder: "am_…", required: true, secret: true }], guidanceMd: "Connect an AgentMail API key, then create or select an inbox for your agent. WebSocket receiving works without a public URL.", - consoleLinks: { keys: "https://console.agentmail.to", docs: "https://docs.agentmail.to/inboxes" }, riskTier: "S3", requiredResourceFilters: ["inbox"] + consoleLinks: { keys: "https://console.agentmail.to/dashboard/api-keys", docs: "https://docs.agentmail.to/inboxes" }, riskTier: "S3", requiredResourceFilters: ["inbox"] }], [ "zapier", @@ -1758,7 +1758,10 @@ for (const entry of researchManifest.entries) { } let methods = specialMethodsFor(entry); if (!methods) { - if (entry.authMode === "customer_oauth") + if (entry.authMode === "public") + methods = [method("public-mcp", "mcp_remote", "none", { serverUrl: entry.serverUrl }, entry.riskTier, + "Connect the provider's public MCP server without an account credential.", { label: "Connect public tools" })]; + else if (entry.authMode === "customer_oauth") methods = [customerOAuthMethodFor(entry)]; else if (entry.authMode === "api_key") methods = [apiKeyMethodFor(entry)]; else { @@ -1949,6 +1952,23 @@ for (const { slug, name, provider, subscription, envKey, url, description } of a // AI account flow; saved REST connections remain removable through Connections. app.methods = [...methods, ...app.methods.filter(method => method.transport !== "rest_api")]; } +// Reviewed provider-specific source data stays separate from generated output. +// Apply it after legacy/research inputs, then run the same branding, permission, +// instruction-template and validation pipeline as every other definition. +const overridesDirectory = path.join(root, "scripts/app-definition-overrides"); +if (fs.existsSync(overridesDirectory)) { + for (const fileName of fs.readdirSync(overridesDirectory).filter(name => name.endsWith(".json")).sort()) { + const override = JSON.parse(fs.readFileSync(path.join(overridesDirectory, fileName), "utf8")); + if (!override.slug || fileName !== `${override.slug}.json` || !Array.isArray(override.methods)) { + throw new Error(`${fileName}: invalid provider definition source`); + } + override.branding = brandingFor(override.slug); + const existingIndex = apps.findIndex(app => app.slug === override.slug); + if (existingIndex === -1) apps.push(override); + else apps[existingIndex] = { ...apps[existingIndex], ...override }; + } +} + // Every tool method has a checked-in permission review. Discovery metadata is // evidence for reviewers, never a runtime instruction to request more scopes. const permissionReviews = JSON.parse(fs.readFileSync( diff --git a/server/src/__tests__/remote-mcp-connectors.test.ts b/server/src/__tests__/remote-mcp-connectors.test.ts index 1004790d832..2b5970f0ae1 100644 --- a/server/src/__tests__/remote-mcp-connectors.test.ts +++ b/server/src/__tests__/remote-mcp-connectors.test.ts @@ -50,6 +50,49 @@ describe("remote connector lifecycle", () => { }); return { service, requests, add: () => { added = true; }, remove: () => { removed = true; }, restore: () => { removed = false; } }; } + it("advertises the initiating OAuth callback and preserves explicitly configured origins", async () => { + const org = await company(); + const app = express(); + app.use((req, _res, next) => { req.actor = { type: "board", userId: actor.actorId, source: "local_implicit", isInstanceAdmin: true }; next(); }); + app.use("/api", toolAccessRoutes(db, { paperclipCloudConnector: null })); + + const publicBaseUrlEnv = process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL; + const otherPublicUrlNames = ["BETTER_AUTH_URL", "BETTER_AUTH_BASE_URL", "PAPERCLIP_PUBLIC_URL", "PAPERCLIP_MANAGED_RUNTIME_PUBLIC_URL"] as const; + const otherPublicUrlEnv = Object.fromEntries(otherPublicUrlNames.map((name) => [name, process.env[name]])); + try { + for (const name of otherPublicUrlNames) process.env[name] = ""; + process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL = "https://paperclip.example.test"; + const configured = await request(app).get(`/api/companies/${org.id}/tools/gallery`); + expect(configured.status).toBe(200); + expect(configured.body.oauthCallbackUrl).toBe("https://paperclip.example.test/api/tools/oauth/callback"); + + process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL = "http://127.0.0.1:3105"; + const configuredLoopback = await request(app).get(`/api/companies/${org.id}/tools/gallery`); + expect(configuredLoopback.status).toBe(200); + expect(configuredLoopback.body.oauthCallbackUrl).toBe("http://127.0.0.1:3105/api/tools/oauth/callback"); + + delete process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL; + const inferredLoopback = await request(app) + .get(`/api/companies/${org.id}/tools/gallery`) + .set("host", "127.0.0.1:3105"); + expect(inferredLoopback.status).toBe(200); + expect(inferredLoopback.body.oauthCallbackUrl).toBe("http://localhost:3105/api/tools/oauth/callback"); + + const unsupported = await request(app) + .get(`/api/companies/${org.id}/tools/gallery`) + .set("host", "paperclip.internal.test"); + expect(unsupported.status).toBe(200); + expect(unsupported.body).not.toHaveProperty("oauthCallbackUrl"); + } finally { + if (publicBaseUrlEnv === undefined) delete process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL; + else process.env.PAPERCLIP_AUTH_PUBLIC_BASE_URL = publicBaseUrlEnv; + for (const name of otherPublicUrlNames) { + const value = otherPublicUrlEnv[name]; + if (value === undefined) delete process.env[name]; + else process.env[name] = value; + } + } + }); it.each([undefined, false])("allows all aggregator setup with stored setting %s", async (legacyValue) => { await db.delete(instanceSettings); if (legacyValue !== undefined) await db.insert(instanceSettings).values({ experimental: { enableMcpAggregators: legacyValue } }); diff --git a/server/src/__tests__/tool-access-service.test.ts b/server/src/__tests__/tool-access-service.test.ts index 5da1230161d..fac6f6ec09f 100644 --- a/server/src/__tests__/tool-access-service.test.ts +++ b/server/src/__tests__/tool-access-service.test.ts @@ -52,6 +52,7 @@ import { } from "@paperclipai/db"; import { and, eq, inArray, sql } from "drizzle-orm"; import { + APP_DEFINITIONS, APP_STORE_HIDDEN_SLUGS, GITHUB_CONNECTOR_PROFILES, GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS, @@ -112,6 +113,17 @@ function createTestToolAccessService( }); } +function optIntoAirtableDcrRegistration() { + const method = APP_DEFINITIONS.find((app) => app.slug === "airtable")!.methods + .find((entry) => entry.key === "mcp-oauth")!; + const original = method.oauthClientRegistration; + method.oauthClientRegistration = "dcr"; + return () => { + if (original === undefined) delete method.oauthClientRegistration; + else method.oauthClientRegistration = original; + }; +} + function fakeGoogleWorkspaceConnector( companyId: string, userId: string, @@ -5214,7 +5226,18 @@ describeEmbeddedPostgres("tool access service", () => { "telem", ]), ); - expect(res.body.apps).toHaveLength(69); + expect(res.body.apps.length).toBeGreaterThanOrEqual(69); + expect(res.body.apps.map((app: { slug: string }) => app.slug)).toEqual( + expect.arrayContaining([ + "calendly", + "exa", + "firecrawl", + "gsc-wizard", + "parallel-search", + "tavily", + "windsor-ai", + ]), + ); for (const slug of ["openrouter", "bedrock", "responses-api", "messages-api", "chat-completions-api", "local"]) { expect(res.body.apps.find((app: { slug: string }) => app.slug === slug).tags).toContain("model-provider"); } @@ -11073,6 +11096,204 @@ describeEmbeddedPostgres("tool access service", () => { }); }); + it("uses Airtable DCR when both DCR and CIMD are advertised", async () => { + vi.stubEnv("PAPERCLIP_PUBLIC_URL", "https://paperclip.example"); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_SECRET", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_SECRET", ""); + const restoreMethod = optIntoAirtableDcrRegistration(); + try { + const company = await createCompany(db); + let metadataLookups = 0; + let registrations = 0; + const service = createTestToolAccessService(db, { + oauthClientMetadataLookup: async () => { + metadataLookups++; + return [{ address: "93.184.216.34", family: 4 }]; + }, + }); + const connected = await service.connectGalleryApp(company.id, { + galleryKey: "airtable", connectionMethodKey: "mcp-oauth", name: "Airtable DCR", + }); + const redirectUri = "https://paperclip.example/api/tools/oauth/callback"; + vi.spyOn(globalThis, "fetch").mockImplementation(async (url, init) => { + const href = String(url); + if (href === "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp") { + return mcpHttpResponse({ + resource: "https://mcp.airtable.com", + authorization_servers: ["https://airtable.com/oauth2/v1"], + scopes_supported: ["data.records:read", "data.records:write"], + }); + } + if (href === "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1") { + return mcpHttpResponse({ + issuer: "https://airtable.com/oauth2/v1", + authorization_endpoint: "https://airtable.com/oauth2/v1/authorize", + token_endpoint: "https://airtable.com/oauth2/v1/token", + registration_endpoint: "https://airtable.com/oauth2/v1/register", + client_id_metadata_document_supported: true, + code_challenge_methods_supported: ["S256"], + token_endpoint_auth_methods_supported: ["none"], + }); + } + if (href === "https://airtable.com/oauth2/v1/register") { + registrations++; + expect(JSON.parse(String(init?.body))).toMatchObject({ + redirect_uris: [redirectUri], + grant_types: ["authorization_code", "refresh_token"], + response_types: ["code"], + token_endpoint_auth_method: "none", + application_type: "web", + }); + return mcpHttpResponse({ + client_id: "airtable-dcr-client", + redirect_uris: [redirectUri], + grant_types: ["authorization_code", "refresh_token"], + response_types: ["code"], + token_endpoint_auth_method: "none", + }); + } + throw new Error(`unexpected fetch ${href}`); + }); + + const start = await service.startOAuth(company.id, connected.connectionId, { + redirectUri, actor: { actorType: "user", actorId: "board" }, + }); + + expect(start.registrationSource).toBe("dcr"); + expect(new URL(start.authorizationUrl).searchParams.get("client_id")).toBe("airtable-dcr-client"); + expect(registrations).toBe(1); + expect(metadataLookups).toBe(0); + } finally { + restoreMethod(); + } + }); + + it("rebinds an Airtable CIMD client through DCR when the curated method opts in", async () => { + vi.stubEnv("PAPERCLIP_PUBLIC_URL", "https://paperclip.example"); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_SECRET", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_SECRET", ""); + const company = await createCompany(db); + const service = createTestToolAccessService(db, { + oauthClientMetadataLookup: async () => [{ address: "93.184.216.34", family: 4 }], + }); + const connected = await service.connectGalleryApp(company.id, { + galleryKey: "airtable", connectionMethodKey: "mcp-oauth", name: "Airtable migration", + }); + const redirectUri = "https://paperclip.example/api/tools/oauth/callback"; + let registrations = 0; + vi.spyOn(globalThis, "fetch").mockImplementation(async (url) => { + const href = String(url); + if (href === "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp") { + return mcpHttpResponse({ + resource: "https://mcp.airtable.com", + authorization_servers: ["https://airtable.com/oauth2/v1"], + }); + } + if (href === "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1") { + return mcpHttpResponse({ + issuer: "https://airtable.com/oauth2/v1", + authorization_endpoint: "https://airtable.com/oauth2/v1/authorize", + token_endpoint: "https://airtable.com/oauth2/v1/token", + registration_endpoint: "https://airtable.com/oauth2/v1/register", + client_id_metadata_document_supported: true, + code_challenge_methods_supported: ["S256"], + token_endpoint_auth_methods_supported: ["none"], + }); + } + if (href === "https://airtable.com/oauth2/v1/register") { + registrations++; + return mcpHttpResponse({ + client_id: "airtable-rebound-dcr-client", + redirect_uris: [redirectUri], + grant_types: ["authorization_code", "refresh_token"], + response_types: ["code"], + token_endpoint_auth_method: "none", + }); + } + throw new Error(`unexpected fetch ${href}`); + }); + + const airtableMethod = APP_DEFINITIONS.find((app) => app.slug === "airtable")!.methods + .find((entry) => entry.key === "mcp-oauth")!; + const originalRegistration = airtableMethod.oauthClientRegistration; + try { + // Generated Airtable metadata now opts into DCR. Remove that curated + // flag here to model an existing client binding created before the opt-in. + delete airtableMethod.oauthClientRegistration; + const cimdStart = await service.startOAuth(company.id, connected.connectionId, { + redirectUri, actor: { actorType: "user", actorId: "board" }, + }); + expect(cimdStart.registrationSource).toBe("cimd"); + + airtableMethod.oauthClientRegistration = "dcr"; + const dcrStart = await service.startOAuth(company.id, connected.connectionId, { + redirectUri, actor: { actorType: "user", actorId: "board" }, + }); + expect(dcrStart.registrationSource).toBe("dcr"); + expect(new URL(dcrStart.authorizationUrl).searchParams.get("client_id")).toBe("airtable-rebound-dcr-client"); + expect(registrations).toBe(1); + } finally { + if (originalRegistration === undefined) delete airtableMethod.oauthClientRegistration; + else airtableMethod.oauthClientRegistration = originalRegistration; + } + }); + + it("does not fall back to Airtable CIMD when DCR is required but unavailable", async () => { + vi.stubEnv("PAPERCLIP_PUBLIC_URL", "https://paperclip.example"); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_AIRTABLE_CLIENT_SECRET", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_ID", ""); + vi.stubEnv("PAPERCLIP_TOOL_OAUTH_CLIENT_SECRET", ""); + const restoreMethod = optIntoAirtableDcrRegistration(); + try { + const company = await createCompany(db); + let metadataLookups = 0; + const service = createTestToolAccessService(db, { + oauthClientMetadataLookup: async () => { + metadataLookups++; + return [{ address: "93.184.216.34", family: 4 }]; + }, + }); + const connected = await service.connectGalleryApp(company.id, { + galleryKey: "airtable", connectionMethodKey: "mcp-oauth", name: "Airtable DCR unavailable", + }); + vi.spyOn(globalThis, "fetch").mockImplementation(async (url) => { + const href = String(url); + if (href === "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp") { + return mcpHttpResponse({ + resource: "https://mcp.airtable.com", + authorization_servers: ["https://airtable.com/oauth2/v1"], + }); + } + if (href === "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1") { + return mcpHttpResponse({ + issuer: "https://airtable.com/oauth2/v1", + authorization_endpoint: "https://airtable.com/oauth2/v1/authorize", + token_endpoint: "https://airtable.com/oauth2/v1/token", + client_id_metadata_document_supported: true, + code_challenge_methods_supported: ["S256"], + token_endpoint_auth_methods_supported: ["none"], + }); + } + throw new Error(`unexpected fetch ${href}`); + }); + + await expect(service.startOAuth(company.id, connected.connectionId, { + redirectUri: "https://paperclip.example/api/tools/oauth/callback", + actor: { actorType: "user", actorId: "board" }, + })).rejects.toMatchObject({ details: { code: "oauth_dcr_not_supported" } }); + expect(metadataLookups).toBe(0); + const [connection] = await db.select().from(toolConnections).where(eq(toolConnections.id, connected.connectionId)); + expect((connection.config.oauth as Record | undefined)?.clientId).toBeUndefined(); + } finally { + restoreMethod(); + } + }); + it("registers Linear against its MCP authorization server instead of the pinned console endpoints", async () => { vi.stubEnv("PAPERCLIP_PUBLIC_URL", "https://paperclip.example"); vi.stubEnv("PAPERCLIP_TOOL_OAUTH_LINEAR_CLIENT_ID", ""); @@ -11121,7 +11342,7 @@ describeEmbeddedPostgres("tool access service", () => { const connectRes = await request(app) .post(`/api/companies/${company.id}/tools/apps/connect`) - .send({ galleryKey: "linear", name: "Linear", grantKind: "user" }) + .send({ galleryKey: "linear", connectionMethodKey: "mcp-oauth", name: "Linear", grantKind: "user" }) .expect(201); const startUrl = new URL(connectRes.body.auth.startUrl); @@ -11131,6 +11352,52 @@ describeEmbeddedPostgres("tool access service", () => { expect(fetched.some((href) => href.startsWith("https://linear.app/"))).toBe(false); }); + it("registers Calendly with a provider-compatible DCR client name", async () => { + const company = await createCompany(db); + const service = createTestToolAccessService(db); + const connected = await service.connectGalleryApp(company.id, { + galleryKey: "calendly", connectionMethodKey: "mcp-oauth", name: "Calendly", + }); + const redirectUri = "http://localhost:3105/api/tools/oauth/callback"; + let registrationBody: Record | null = null; + vi.spyOn(globalThis, "fetch").mockImplementation(async (url, init) => { + const href = String(url); + if (href.includes("oauth-protected-resource")) return mcpHttpResponse({ + resource: "https://mcp.calendly.com/", authorization_servers: ["https://calendly.com/"], + scopes_supported: ["mcp:scheduling:read", "mcp:scheduling:write"], + }); + if (href.includes("oauth-authorization-server")) return mcpHttpResponse({ + issuer: "https://calendly.com/", authorization_endpoint: "https://calendly.com/oauth/authorize", + token_endpoint: "https://calendly.com/oauth/token", registration_endpoint: "https://calendly.com/oauth/register", + code_challenge_methods_supported: ["S256"], token_endpoint_auth_methods_supported: ["none"], + }); + if (href === "https://calendly.com/oauth/register") { + registrationBody = JSON.parse(String(init?.body)) as Record; + return mcpHttpResponse({ + client_id: "calendly-public-client", redirect_uris: [redirectUri], + grant_types: ["authorization_code", "refresh_token"], response_types: ["code"], + token_endpoint_auth_method: "none", + }); + } + throw new Error(`unexpected fetch ${href}`); + }); + + const result = await service.startOAuth(company.id, connected.connectionId, { + redirectUri, actor: { actorType: "user", actorId: "board" }, + }); + + expect(registrationBody).toMatchObject({ + client_name: "Paperclip localhost-3105", + redirect_uris: [redirectUri], + grant_types: ["authorization_code", "refresh_token"], + response_types: ["code"], + token_endpoint_auth_method: "none", + application_type: "web", + }); + expect(registrationBody?.client_name).toMatch(/^[A-Za-z0-9 -]+$/); + expect(new URL(result.authorizationUrl).searchParams.get("client_id")).toBe("calendly-public-client"); + }); + it("returns a pre-scoped personal Notion callback directly to Permissions", async () => { vi.stubEnv("PAPERCLIP_PUBLIC_URL", "https://paperclip.example"); vi.stubEnv("PAPERCLIP_TOOL_OAUTH_NOTION_CLIENT_ID", ""); @@ -12038,7 +12305,7 @@ describeEmbeddedPostgres("tool access service", () => { ).toBe("notion-dcr-client"); expect(registrationBodies).toEqual([ { - client_name: "Paperclip (paperclip-dev.tail29c1aa.ts.net)", + client_name: "Paperclip paperclip-dev-tail29c1aa-ts-net", redirect_uris: [redirectUri], grant_types: ["authorization_code", "refresh_token"], response_types: ["code"], diff --git a/server/src/__tests__/tool-gateway-service.test.ts b/server/src/__tests__/tool-gateway-service.test.ts index 2f0774be90c..3e9b984672d 100644 --- a/server/src/__tests__/tool-gateway-service.test.ts +++ b/server/src/__tests__/tool-gateway-service.test.ts @@ -1275,11 +1275,19 @@ describeEmbeddedPostgres("tool gateway service", () => { } }); - it("initializes a fresh Streamable HTTP session before a stateful tools/call", async () => { + it.each([ + ["persisted session preference", true], + ["retained connection curated default", false], + ] as const)("initializes Tavily's session before its first tools/call from the %s", async (_caseName, persistPreference) => { const { company, agent, run } = await createRunFixture(db); const { connection } = await createRemoteMcpToolFixture(db, company.id); await db.update(toolConnections).set({ - config: { url: "https://example.invalid/mcp", mcpSessionRequired: true }, + config: { + url: "https://mcp.tavily.com/mcp", + sourceTemplateKey: "tavily", + connectionMethodKey: "mcp-oauth", + ...(persistPreference ? { mcpSessionRequired: true } : {}), + }, }).where(eq(toolConnections.id, connection.id)); await db.insert(toolPolicies).values({ companyId: company.id, @@ -1341,6 +1349,36 @@ describeEmbeddedPostgres("tool gateway service", () => { ]); }); + it("keeps direct tools/call for generic connections without the curated session preference", async () => { + const { company, agent, run } = await createRunFixture(db); + const { connection } = await createRemoteMcpToolFixture(db, company.id); + await db.insert(toolPolicies).values({ + companyId: company.id, + name: "Allow read tools", + policyType: "allow", + selectors: { riskLevel: "read" }, + }); + const requests: string[] = []; + const gateway = createTestToolGatewayService(db, { + remoteHttpRequest: async (_url, init) => { + const payload = JSON.parse(String(init.body)) as { method?: string; id?: string }; + requests.push(payload.method ?? ""); + return Response.json({ + jsonrpc: "2.0", + id: payload.id, + result: { content: [{ type: "text", text: "generic ok" }] }, + }); + }, + }); + const session = await gateway.createSession({ companyId: company.id, agentId: agent.id, runId: run.id }); + const tool = (await gateway.listToolsForSession(session.token)) + .find((candidate) => candidate.providerType === "mcp_remote_http"); + + await expect(gateway.executeTool({ sessionToken: session.token, tool: tool!.name, parameters: {} })) + .resolves.toMatchObject({ status: "completed" }); + expect(requests).toEqual(["tools/call"]); + }); + it("hides cached Chat unread filters and blocks agent and board requests before provider dispatch", async () => { const { company, agent, run } = await createRunFixture(db); const { connection, catalogEntry } = await createRemoteMcpToolFixture(db, company.id); @@ -1449,7 +1487,7 @@ describeEmbeddedPostgres("tool gateway service", () => { }); }); - it("injects Vercel tokens at dispatch and refreshes exactly once after an upstream 401", async () => { + it("refreshes Vercel tokens after an upstream 401 without replaying the tool call", async () => { const { company, agent, run } = await createRunFixture(db); const { connection } = await createRemoteMcpToolFixture(db, company.id); await db.update(toolConnections).set({ @@ -1511,17 +1549,16 @@ describeEmbeddedPostgres("tool gateway service", () => { const tool = (await gateway.listToolsForSession(session.token)) .find((candidate) => candidate.providerType === "mcp_remote_http"); - const result = await gateway.executeTool({ + await expect(gateway.executeTool({ sessionToken: session.token, tool: tool!.name, parameters: {}, + })).rejects.toMatchObject({ + status: 409, + reasonCode: "oauth_refreshed_retry_required", }); - expect(result.status).toBe("completed"); - expect(authorizationHeaders).toEqual([ - "Bearer stale-provider-bearer", - "Bearer fresh-provider-bearer", - ]); + expect(authorizationHeaders).toEqual(["Bearer stale-provider-bearer"]); expect(getToken).toHaveBeenCalledTimes(2); expect(getToken.mock.calls[1]?.[1]).toEqual({ forceRefresh: true }); expect(evict).toHaveBeenCalledTimes(1); @@ -1639,7 +1676,7 @@ describeEmbeddedPostgres("tool gateway service", () => { expect(refreshed).toEqual(upstreamFailure ? [grants[1]!.id] : [grants[1]!.id, grants[0]!.id]); }); - it("refreshes a customer OAuth grant once and retries after an upstream 401", async () => { + it("refreshes customer OAuth after a session 401 without replaying the call, then uses a fresh session on explicit retry", async () => { const { company, agent, run } = await createRunFixture(db); const { connection } = await createRemoteMcpToolFixture(db, company.id); const accessSecret = await secretService(db).create(company.id, { @@ -1661,6 +1698,7 @@ describeEmbeddedPostgres("tool gateway service", () => { credentialRefs: [{ name: "oauth.access_token", placement: "header", key: "Authorization", prefix: "Bearer ", secretId: accessSecret.id, versionSelector: "latest" }], config: { url: "https://example.invalid/mcp", + mcpSessionRequired: true, oauth: { provider: "fixture", tokenUrl: "https://example.invalid/oauth/token", @@ -1701,13 +1739,37 @@ describeEmbeddedPostgres("tool gateway service", () => { return db.select().from(connectionGrants).where(eq(connectionGrants.id, input.grantId)) .then((rows) => rows[0]!); }); - const authorizationHeaders: string[] = []; + const requests: Array<{ method: string; authorization: string | null; sessionId: string | null; protocolVersion: string | null }> = []; + let callDispatches = 0; const gateway = createTestToolGatewayService(db, { oauthGrantRefresher, remoteHttpRequest: async (_url, init) => { - authorizationHeaders.push(new Headers(init.headers).get("authorization") ?? ""); - if (authorizationHeaders.length === 1) return new Response(null, { status: 401 }); - const requestBody = JSON.parse(String(init.body)) as { id: string }; + const requestBody = JSON.parse(String(init.body)) as { method: string; id?: string }; + const requestHeaders = new Headers(init.headers); + requests.push({ + method: requestBody.method, + authorization: requestHeaders.get("authorization"), + sessionId: requestHeaders.get("mcp-session-id"), + protocolVersion: requestHeaders.get("mcp-protocol-version"), + }); + if (requestBody.method === "initialize") { + const fresh = requestHeaders.get("authorization") === "Bearer fresh-customer-token"; + return new Response(JSON.stringify({ + jsonrpc: "2.0", + id: requestBody.id, + result: { + protocolVersion: "2025-06-18", + capabilities: { tools: {} }, + serverInfo: { name: "oauth-session", version: "1" }, + }, + }), { status: 200, headers: { + "content-type": "application/json", + "mcp-session-id": fresh ? "fresh-session" : "stale-session", + } }); + } + if (requestBody.method === "notifications/initialized") return new Response(null, { status: 202 }); + callDispatches += 1; + if (callDispatches === 1) return new Response(null, { status: 401 }); return new Response(JSON.stringify({ jsonrpc: "2.0", id: requestBody.id, @@ -1719,22 +1781,37 @@ describeEmbeddedPostgres("tool gateway service", () => { const tool = (await gateway.listToolsForSession(session.token)) .find((candidate) => candidate.providerType === "mcp_remote_http"); - const result = await gateway.executeTool({ + const execute = () => gateway.executeTool({ sessionToken: session.token, tool: tool!.name, parameters: {}, }); - expect(result.status).toBe("completed"); - expect(authorizationHeaders).toEqual([ - "Bearer stale-customer-token", - "Bearer fresh-customer-token", + await expect(execute()).rejects.toMatchObject({ + status: 409, + reasonCode: "oauth_refreshed_retry_required", + }); + expect(callDispatches).toBe(1); + expect(requests.map(({ method }) => method)).toEqual([ + "initialize", "notifications/initialized", "tools/call", ]); - expect(oauthGrantRefresher).toHaveBeenCalledTimes(2); - expect(vi.mocked(oauthGrantRefresher).mock.calls[1]?.[0]).toMatchObject({ forceRefresh: true }); + expect(requests.every((request) => request.authorization === "Bearer stale-customer-token")).toBe(true); + expect(requests[2]).toMatchObject({ sessionId: "stale-session", protocolVersion: "2025-06-18" }); + + const result = await execute(); + expect(result.status).toBe("completed"); + expect(callDispatches).toBe(2); + expect(requests.map(({ method }) => method)).toEqual([ + "initialize", "notifications/initialized", "tools/call", + "initialize", "notifications/initialized", "tools/call", + ]); + expect(requests.slice(3).every((request) => request.authorization === "Bearer fresh-customer-token")).toBe(true); + expect(requests[5]).toMatchObject({ sessionId: "fresh-session", protocolVersion: "2025-06-18" }); + expect(oauthGrantRefresher).toHaveBeenCalledTimes(3); + expect(vi.mocked(oauthGrantRefresher).mock.calls.some(([input]) => input.forceRefresh === true)).toBe(true); }); - it("marks a managed OAuth grant reconnect-required after one rejected refresh retry", async () => { + it("refreshes a managed OAuth grant after 401 without replaying the call", async () => { const { company, agent, run } = await createRunFixture(db); const { connection } = await createRemoteMcpToolFixture(db, company.id); const accessSecret = await secretService(db).create(company.id, { @@ -1811,16 +1888,13 @@ describeEmbeddedPostgres("tool gateway service", () => { sessionToken: session.token, tool: tool!.name, parameters: {}, - })).rejects.toMatchObject({ reasonCode: "mcp_remote_status" }); + })).rejects.toMatchObject({ reasonCode: "oauth_refreshed_retry_required" }); - expect(authorizationHeaders).toEqual([ - "Bearer stale-managed-token", - "Bearer fresh-managed-token", - ]); + expect(authorizationHeaders).toEqual(["Bearer stale-managed-token"]); expect(oauthGrantRefresher).toHaveBeenCalledTimes(2); expect(vi.mocked(oauthGrantRefresher).mock.calls[1]?.[0]).toMatchObject({ forceRefresh: true }); const [storedGrant] = await db.select().from(connectionGrants).where(eq(connectionGrants.id, grant.id)); - expect(storedGrant?.status).toBe("needs_reauthorization"); + expect(storedGrant?.status).toBe("active"); }); it("fails clearly when remote MCP elicitation has no issue interaction path", async () => { diff --git a/server/src/routes/tool-access.ts b/server/src/routes/tool-access.ts index a3574824a85..093cc1630d6 100644 --- a/server/src/routes/tool-access.ts +++ b/server/src/routes/tool-access.ts @@ -327,7 +327,7 @@ export function toolAccessRoutes( } } - function requestLoopbackBaseUrl(req: Request) { + function requestLoopbackBaseUrl(req: Request, forInitiation = false) { const host = req.get("host")?.trim(); if (!host) return null; try { @@ -346,8 +346,7 @@ export function toolAccessRoutes( // interoperable spelling and retain the browser's exact origin as OAuth // state for popup postMessage below. if ( - req.method !== "GET" - && req.method !== "HEAD" + (forInitiation || (req.method !== "GET" && req.method !== "HEAD")) && (options.deploymentMode ?? "local_trusted") === "local_trusted" && parsed.protocol === "http:" && parsed.hostname !== "localhost" @@ -414,11 +413,11 @@ export function toolAccessRoutes( return null; } - function oauthRedirectUri(req: Request) { + function oauthRedirectUri(req: Request, forInitiation = false) { const baseUrl = configuredPublicBaseUrl() ?? trustedBrowserBaseUrl(req) ?? enrolledConnectorBaseUrl(req) - ?? requestLoopbackBaseUrl(req); + ?? requestLoopbackBaseUrl(req, forInitiation); if (!baseUrl) { throw unprocessable( "This Paperclip needs a browser-reachable HTTPS address (or loopback HTTP) before browser sign-in can start.", @@ -821,7 +820,22 @@ function connectorEnrollmentPrincipal(req: Request): string { : []; const vercelConnect = vercelConnectIntegrationStatus(); const { enableMemoryConnectors } = await instanceSettingsService(db).getExperimental(); + let oauthCallbackUrl: string | undefined; + try { + // Setup must display the callback used by its initiating POST. Provider + // callbacks themselves retain their exact request-derived redirect URI. + oauthCallbackUrl = oauthRedirectUri(req, true); + } catch (error) { + const details = error instanceof HttpError + && error.details + && typeof error.details === "object" + && !Array.isArray(error.details) + ? error.details as Record + : null; + if (details?.code !== "oauth_redirect_origin_unsupported") throw error; + } res.json({ + ...(oauthCallbackUrl ? { oauthCallbackUrl } : {}), capabilities: await describeConnectionCreateCapabilities(req, companyId), credentialSources: { vercelConnect: { diff --git a/server/src/services/tool-access.ts b/server/src/services/tool-access.ts index fb473843888..108f885efa6 100644 --- a/server/src/services/tool-access.ts +++ b/server/src/services/tool-access.ts @@ -7149,7 +7149,20 @@ export function toolAccessService( return sendRemote({ method: "POST", headers: mcpHttpRequestHeaders(requestHeaders), body: JSON.stringify({ jsonrpc: "2.0", id: listRequestId, method: "tools/list", params: cursor ? { cursor } : {} }) }); }; - let usedInitializedSession = connection.config.mcpSessionRequired === true; + const connectionConfig = asRecord(connection.config); + const sourceTemplateKey = typeof connectionConfig?.sourceTemplateKey === "string" + ? connectionConfig.sourceTemplateKey + : null; + const connectionMethodKey = typeof connectionConfig?.connectionMethodKey === "string" + ? connectionConfig.connectionMethodKey + : null; + const curatedMethodRequiresMcpSession = Boolean( + sourceTemplateKey && connectionMethodKey && + getConnectableAppDefinition(sourceTemplateKey)?.methods.some((method) => + method.key === connectionMethodKey && method.defaults?.mcpSessionRequired === true + ), + ); + let usedInitializedSession = connectionConfig?.mcpSessionRequired === true || curatedMethodRequiresMcpSession; let response: Response; if (usedInitializedSession) { try { @@ -7194,7 +7207,7 @@ export function toolAccessService( } if ( usedInitializedSession && - connection.config.mcpSessionRequired !== true + connectionConfig?.mcpSessionRequired !== true ) { const nextConfig = { ...connection.config, mcpSessionRequired: true }; await db @@ -9954,8 +9967,15 @@ export function toolAccessService( ); const host = new URL(input.redirectUri).host; + const clientNameHost = host + .replace(/[^A-Za-z0-9-]/g, "-") + .replace(/-+/g, "-") + .replace(/^-|-$/g, ""); const requestedMetadata = { - client_name: `Paperclip (${host})`, + // Some DCR servers restrict client_name to alphanumeric characters, + // hyphens and spaces. Keep the deployment host recognizable without + // sending punctuation such as dots, colons or parentheses. + client_name: `Paperclip ${clientNameHost}`, redirect_uris: [input.redirectUri], grant_types: [ "authorization_code", @@ -10427,7 +10447,14 @@ export function toolAccessService( source: "preconfigured" as const, }; } - const metadataDocumentUrl = input.endpoints + const method = input.galleryEntry + ? connectionMethodForConnection(input.galleryEntry, input.connection) + : null; + const dcrRequired = method?.oauthClientRegistration === "dcr"; + // A reviewed provider compatibility choice may require DCR even when the + // server also advertises CIMD. Do not resolve/adopt a metadata URL for that + // method; the default for every other method remains CIMD-first. + const metadataDocumentUrl = !dcrRequired && input.endpoints .clientIdMetadataDocumentSupported ? await resolveOAuthClientIdMetadataDocumentUrl( input.redirectUri, @@ -10486,6 +10513,12 @@ export function toolAccessService( }, ); } + if (dcrRequired && !input.endpoints.registrationUrl) { + throw unprocessable( + "This provider requires dynamic client registration, but its authorization server did not advertise a registration endpoint.", + { code: "oauth_dcr_not_supported" }, + ); + } const key = `${input.connection.id}:${input.redirectUri}`; return singleFlight(oauthRegistrationFlights, key, async () => { @@ -10527,8 +10560,9 @@ export function toolAccessService( source: storedOAuthClientRegistrationSource(bound), }; } - // 3. Client ID Metadata Documents: no registration call at all, so prefer - // them over DCR when the authorization server advertises support. + // 3. By default, Client ID Metadata Documents need no registration call, + // so prefer them over DCR when the authorization server advertises + // support. Curated DCR opt-ins leave metadataDocumentUrl null above. if (metadataDocumentUrl) { const adopted = await adoptClientIdMetadataDocument({ connection: latest, @@ -12771,6 +12805,9 @@ export function toolAccessService( sourceTemplateKey: galleryEntry.slug, connectionMethodKey: method?.key, methodConfig: normalizedMethodConfig?.values ?? {}, + ...(method?.defaults?.mcpSessionRequired === true + ? { mcpSessionRequired: true } + : {}), // Grant-backed setup keeps the full discovered catalog selectable; // the wizard projects the app's action defaults into policies at // finish time instead of using catalog quarantine as access state. diff --git a/server/src/services/tool-gateway.ts b/server/src/services/tool-gateway.ts index 3e56275d205..86d79cd2f9c 100644 --- a/server/src/services/tool-gateway.ts +++ b/server/src/services/tool-gateway.ts @@ -91,6 +91,7 @@ import type { UpdateToolMcpGateway, } from "@paperclipai/shared"; import { + getConnectableAppDefinition, isGitHubConnectorProfileId, isGoogleWorkspaceConnectorProfileId, type GitHubConnectorProfileId, @@ -470,6 +471,21 @@ function asRecord(value: unknown): Record | null { return value as Record; } +function connectionRequiresMcpSession(connection: { config: unknown }): boolean { + const config = asRecord(connection.config); + if (config?.mcpSessionRequired === true) return true; + const sourceTemplateKey = typeof config?.sourceTemplateKey === "string" + ? config.sourceTemplateKey + : null; + const connectionMethodKey = typeof config?.connectionMethodKey === "string" + ? config.connectionMethodKey + : null; + if (!sourceTemplateKey || !connectionMethodKey) return false; + return getConnectableAppDefinition(sourceTemplateKey)?.methods.some((method) => + method.key === connectionMethodKey && method.defaults?.mcpSessionRequired === true + ) ?? false; +} + async function mapWithConcurrency( items: readonly T[], concurrency: number, @@ -5972,6 +5988,27 @@ export function createToolGatewayService( // letting the tighter default cut a legitimately slow tool short. responseTimeoutMs: ms, }); + const requireExplicitRetryAfterOAuthRefresh = async (refreshedResponse: Response): Promise => { + // The provider rejected this dispatch, but automatic replay is unsafe: + // a server can apply a request before returning 401. A caller retry + // starts a fresh credential-scoped MCP session and dispatches once. + if (mcpSession) forgetMcpHttpSession(mcpSession); + await refreshedResponse.body?.cancel().catch(() => undefined); + execution.response = { + httpStatus: refreshedResponse.status, + contentType: refreshedResponse.headers.get("content-type"), + bodySizeBytes: 0, + upstreamRequestId: + refreshedResponse.headers.get("x-request-id") ?? + refreshedResponse.headers.get("traceparent"), + }; + throw new ToolGatewayHttpError( + 409, + "The provider rejected the saved OAuth token, which has now been refreshed. Retry the action explicitly; the original call was not replayed.", + "oauth_refreshed_retry_required", + { connectionId: connection.id, catalogEntryId: entry.id, execution }, + ); + }; if (isRailwayEndpoint(connection.config.url) && normalizeRailwayToolName(entry.toolName).startsWith(RAILWAY_TOOL_PREFIX)) { if (!isRailwayConnection(connection) || connection.config.railwayApiStatus !== "available") { throw new ToolGatewayHttpError(422, "Railway API access is not verified. Refresh actions or reconnect this Railway connection.", "railway_api_not_verified"); @@ -6002,7 +6039,7 @@ export function createToolGatewayService( }; } let requestHeaders = headers; - if (connection.config.mcpSessionRequired === true) { + if (connectionRequiresMcpSession(connection)) { const scope = `${connection.id}:grant:${grant.id}:actor:${session.agentId}:${endpoint}`; requestHeaders = await getMcpHttpSession({ scope, @@ -6066,24 +6103,7 @@ export function createToolGatewayService( }); headers = builtHeaders.headers; headerSummary = builtHeaders.summary; - response = await dispatchRemote(endpoint, { - ...requestInit, - headers: mcpHttpRequestHeaders(headers), - }); - if (response.status === 401) { - await db - .update(connectionGrants) - .set({ - status: "needs_reauthorization", - updatedAt: new Date(options.now?.() ?? Date.now()), - }) - .where( - and( - eq(connectionGrants.id, grant.id), - eq(connectionGrants.companyId, connection.companyId), - ), - ); - } + await requireExplicitRetryAfterOAuthRefresh(response); } if ( response.status === 401 && @@ -6106,10 +6126,7 @@ export function createToolGatewayService( }); headers = builtHeaders.headers; headerSummary = builtHeaders.summary; - response = await dispatchRemote(endpoint, { - ...requestInit, - headers: mcpHttpRequestHeaders(headers), - }); + await requireExplicitRetryAfterOAuthRefresh(response); } if ( response.status === 401 && @@ -6146,10 +6163,7 @@ export function createToolGatewayService( }); headers = builtHeaders.headers; headerSummary = builtHeaders.summary; - response = await dispatchRemote(endpoint, { - ...requestInit, - headers: mcpHttpRequestHeaders(headers), - }); + await requireExplicitRetryAfterOAuthRefresh(response); } const sessionExpired = response.status === 404 && new Headers(requestHeaders).has("mcp-session-id"); if (sessionExpired) { diff --git a/tests/e2e/chat-adapters-ui-providers.spec.ts b/tests/e2e/chat-adapters-ui-providers.spec.ts index cf575235bef..f920bb3eab9 100644 --- a/tests/e2e/chat-adapters-ui-providers.spec.ts +++ b/tests/e2e/chat-adapters-ui-providers.spec.ts @@ -20,6 +20,15 @@ import { GITHUB_PRIVATE_KEY_PASTE_FIXTURE, } from "./chat-adapters-ui.shared"; +async function findConnectorBySearch(page: Page, query: string, slug: string) { + const search = page.getByRole("searchbox", { name: "Search connectors" }); + await expect(search).toBeVisible(); + await search.fill(query); + const connector = page.locator(`[role="listitem"][data-app-slug="${slug}"]`); + await expect(connector).toBeVisible({ timeout: 30_000 }); + return connector; +} + async function exerciseGitHubReviewSetup(page: Page, mock: ChatMock, seed: Seed, provider: ProviderCase) { await expect(page.getByRole("heading", { name: "Choose agent", exact: true })).toBeVisible(); await page.getByRole("button", { name: "Choose an agent", exact: true }).click(); @@ -289,10 +298,7 @@ test.describe.serial("native chat adapter UI", () => { await expect(page.getByRole("heading", { name: "Connectors" })).toBeVisible( { timeout: 30_000 }, ); - const connector = page.locator( - '[role="listitem"][data-app-slug="github"]', - ); - await expect(connector).toBeVisible(); + const connector = await findConnectorBySearch(page, "GitHub", "github"); // Without the cloud connector GitHub's default method is a token, so the // card's verb is "Add key" rather than "Connect". await connector.getByRole("button", { name: "Add key GitHub" }).click(); @@ -367,17 +373,15 @@ test.describe.serial("native chat adapter UI", () => { await expect( page.getByRole("heading", { name: "Connectors" }), ).toBeVisible({ timeout: 30_000 }); - const connector = page.locator( - `[role="listitem"][data-app-slug="${provider.slug}"]`, - ); - await expect(connector).toBeVisible({ timeout: 30_000 }); + let connector = await findConnectorBySearch(page, provider.name, provider.slug); if (provider.provider === "github") { - const tools = page.locator('[role="listitem"][data-app-slug="github"]'); + const tools = await findConnectorBySearch(page, "GitHub", "github"); await tools.getByRole("button", { name: "Add key GitHub", exact: true }).click(); await page.getByRole("button", { name: "Change", exact: true }).click(); await expect(page.getByRole("heading", { name: "Connect GitHub as" })).toBeVisible(); await expect(page.getByRole("heading", { name: "Choose how to connect" })).toHaveCount(0); await page.goto(`/${seed.prefix}/apps`); + connector = await findConnectorBySearch(page, provider.name, provider.slug); } await connector .getByRole("button", { name: `Connect ${provider.provider === "github" ? "GitHub Code Review Bot" : provider.name}` }) @@ -980,10 +984,7 @@ test.describe("iMessage Photon setup and management", () => { theme, ); await page.goto(`/${seed.prefix}/apps`); - const card = page.locator( - '[role="listitem"][data-app-slug="imessage-photon"]', - ); - await expect(card).toBeVisible(); + const card = await findConnectorBySearch(page, "iMessage Photon", "imessage-photon"); await card .getByRole("button", { name: "Connect iMessage Photon" }) .click(); diff --git a/ui/public/brands/apps/calendly.png b/ui/public/brands/apps/calendly.png new file mode 100644 index 00000000000..6d1f3edf51b Binary files /dev/null and b/ui/public/brands/apps/calendly.png differ diff --git a/ui/public/brands/apps/exa.svg b/ui/public/brands/apps/exa.svg new file mode 100644 index 00000000000..9f3159d327d --- /dev/null +++ b/ui/public/brands/apps/exa.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/public/brands/apps/firecrawl.svg b/ui/public/brands/apps/firecrawl.svg new file mode 100644 index 00000000000..bf31d1f070e --- /dev/null +++ b/ui/public/brands/apps/firecrawl.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ui/public/brands/apps/gsc-wizard.png b/ui/public/brands/apps/gsc-wizard.png new file mode 100644 index 00000000000..37c53bd81e2 Binary files /dev/null and b/ui/public/brands/apps/gsc-wizard.png differ diff --git a/ui/public/brands/apps/manifest.json b/ui/public/brands/apps/manifest.json index f3cb45de2a5..d8290fc25db 100644 --- a/ui/public/brands/apps/manifest.json +++ b/ui/public/brands/apps/manifest.json @@ -266,7 +266,7 @@ { "slug": "make", "provider": "Make", - "catalogVisible": false, + "catalogVisible": true, "localAsset": "/brands/apps/make.svg", "darkAsset": "/brands/apps/make-dark.svg" }, @@ -597,6 +597,49 @@ "provider": "Responses API", "catalogVisible": true, "localAsset": "/brands/apps/api-key-generic.svg" + }, + { + "slug": "calendly", + "provider": "Calendly", + "catalogVisible": true, + "localAsset": "/brands/apps/calendly.png" + }, + { + "slug": "exa", + "provider": "Exa", + "catalogVisible": true, + "localAsset": "/brands/apps/exa.svg" + }, + { + "slug": "firecrawl", + "provider": "Firecrawl", + "catalogVisible": true, + "localAsset": "/brands/apps/firecrawl.svg" + }, + { + "slug": "gsc-wizard", + "provider": "GSC Wizard", + "catalogVisible": true, + "localAsset": "/brands/apps/gsc-wizard.png" + }, + { + "slug": "parallel-search", + "provider": "Parallel Search", + "catalogVisible": true, + "localAsset": "/brands/apps/parallel.svg", + "darkAsset": "/brands/apps/parallel-dark.svg" + }, + { + "slug": "tavily", + "provider": "Tavily", + "catalogVisible": true, + "localAsset": "/brands/apps/tavily.png" + }, + { + "slug": "windsor-ai", + "provider": "Windsor.ai", + "catalogVisible": true, + "localAsset": "/brands/apps/windsor-ai.png" } ] } diff --git a/ui/public/brands/apps/parallel-dark.svg b/ui/public/brands/apps/parallel-dark.svg new file mode 100644 index 00000000000..0c143cae6d6 --- /dev/null +++ b/ui/public/brands/apps/parallel-dark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ui/public/brands/apps/parallel.svg b/ui/public/brands/apps/parallel.svg new file mode 100644 index 00000000000..2f91ae241ef --- /dev/null +++ b/ui/public/brands/apps/parallel.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ui/public/brands/apps/tavily.png b/ui/public/brands/apps/tavily.png new file mode 100644 index 00000000000..3c98a108c2c Binary files /dev/null and b/ui/public/brands/apps/tavily.png differ diff --git a/ui/public/brands/apps/windsor-ai.png b/ui/public/brands/apps/windsor-ai.png new file mode 100644 index 00000000000..2b7f8829780 Binary files /dev/null and b/ui/public/brands/apps/windsor-ai.png differ diff --git a/ui/src/api/tools.ts b/ui/src/api/tools.ts index c794e82ac7f..43cb010466d 100644 --- a/ui/src/api/tools.ts +++ b/ui/src/api/tools.ts @@ -87,6 +87,8 @@ export type ToolPoliciesResponse = { policies: ToolPolicy[] }; export type ToolProfilesResponse = { profiles: ToolProfileWithDetails[] }; export type ToolGalleryResponse = { apps: AppDefinition[]; + /** Server-authoritative OAuth callback URI, omitted when this deployment has no supported browser origin. */ + oauthCallbackUrl?: string; capabilities: ToolConnectionCreateCapabilities; credentialSources: { vercelConnect: { diff --git a/ui/src/components/JsonSchemaForm.test.tsx b/ui/src/components/JsonSchemaForm.test.tsx index ac56784d8ab..c1b53c2a49b 100644 --- a/ui/src/components/JsonSchemaForm.test.tsx +++ b/ui/src/components/JsonSchemaForm.test.tsx @@ -3,7 +3,12 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { JsonSchemaForm, getDefaultValues } from "./JsonSchemaForm"; +import { + JsonSchemaForm, + type JsonSchemaNode, + getDefaultValues, + validateJsonSchemaForm, +} from "./JsonSchemaForm"; // eslint-disable-next-line @typescript-eslint/no-explicit-any (globalThis as any).IS_REACT_ACT_ENVIRONMENT = true; @@ -605,3 +610,95 @@ describe("JsonSchemaForm enum rendering", () => { }); }); }); + +describe("JsonSchemaForm optional nested objects", () => { + const schema: JsonSchemaNode = { + type: "object", + properties: { + url: { type: "string" }, + profile: { + type: "object", + required: ["Name"], + properties: { + Name: { type: "string" }, + locale: { type: "string" }, + }, + }, + queryOptions: { + type: "object", + required: ["Prompt"], + properties: { + Prompt: { type: "string" }, + mode: { type: "string" }, + }, + }, + screenshotOptions: { + type: "object", + properties: { + viewport: { + type: "object", + required: ["Width", "Height"], + properties: { + Width: { type: "integer" }, + Height: { type: "integer" }, + }, + }, + }, + }, + }, + }; + + it("omits untouched optional object trees and accepts their defaults", () => { + const defaults = getDefaultValues(schema); + + expect(defaults).toEqual({}); + expect(validateJsonSchemaForm(schema, defaults)).toEqual({}); + expect( + validateJsonSchemaForm(schema, { + profile: {}, + queryOptions: {}, + screenshotOptions: { viewport: {} }, + }), + ).toEqual({ + "/profile/Name": "This field is required", + "/queryOptions/Prompt": "This field is required", + "/screenshotOptions/viewport/Width": "This field is required", + "/screenshotOptions/viewport/Height": "This field is required", + }); + + const nestedSchema: JsonSchemaNode = { + type: "object", + required: ["config"], + properties: { + config: { + type: "object", + properties: { + enabled: { type: "boolean" }, + queryOptions: { + type: "object", + required: ["Prompt"], + properties: { Prompt: { type: "string" } }, + }, + }, + }, + }, + }; + const nestedDefaults = getDefaultValues(nestedSchema); + expect(nestedDefaults).toEqual({ config: { enabled: false } }); + expect(validateJsonSchemaForm(nestedSchema, nestedDefaults)).toEqual({}); + }); + + it("validates required descendants once an optional object is populated", () => { + expect( + validateJsonSchemaForm(schema, { + profile: { locale: "en" }, + queryOptions: { mode: "search" }, + screenshotOptions: { viewport: { Width: 1280 } }, + }), + ).toEqual({ + "/profile/Name": "This field is required", + "/queryOptions/Prompt": "This field is required", + "/screenshotOptions/viewport/Height": "This field is required", + }); + }); +}); diff --git a/ui/src/components/JsonSchemaForm.tsx b/ui/src/components/JsonSchemaForm.tsx index d07242b4d60..c6e892eeb4f 100644 --- a/ui/src/components/JsonSchemaForm.tsx +++ b/ui/src/components/JsonSchemaForm.tsx @@ -164,7 +164,19 @@ export function getDefaultForSchema(schema: JsonSchemaNode): unknown { case "object": { if (!schema.properties) return {}; const obj: Record = {}; + const requiredProperties = new Set(schema.required ?? []); for (const [key, propSchema] of Object.entries(schema.properties)) { + // An optional object with no explicit default must stay absent until + // the user supplies a value. Materializing `{}` here makes recursive + // validation require all of its children even when the object was + // never touched. + if ( + resolveType(propSchema) === "object" && + !requiredProperties.has(key) && + propSchema.default === undefined + ) { + continue; + } const def = getDefaultForSchema(propSchema); if (def !== undefined) obj[key] = def; } @@ -286,7 +298,12 @@ export function validateJsonSchemaForm( } // Recurse into objects - if (type === "object" && propSchema.properties && typeof value === "object" && value !== null) { + if ( + type === "object" && + propSchema.properties && + typeof value === "object" && + value !== null + ) { Object.assign( errors, validateJsonSchemaForm(propSchema, value as Record, fieldPath), @@ -328,8 +345,16 @@ export function validateJsonSchemaForm( export function getDefaultValues(schema: JsonSchemaNode): Record { const result: Record = {}; const properties = schema.properties ?? {}; + const requiredProperties = new Set(schema.required ?? []); for (const [key, propSchema] of Object.entries(properties)) { + if ( + resolveType(propSchema) === "object" && + !requiredProperties.has(key) && + propSchema.default === undefined + ) { + continue; + } const def = getDefaultForSchema(propSchema); if (def !== undefined) { result[key] = def; diff --git a/ui/src/features/connections/ConnectionSetupFlow.tsx b/ui/src/features/connections/ConnectionSetupFlow.tsx index ef5c47b290d..d8dd7adcaf4 100644 --- a/ui/src/features/connections/ConnectionSetupFlow.tsx +++ b/ui/src/features/connections/ConnectionSetupFlow.tsx @@ -984,6 +984,10 @@ function StandardConnectionSetupFlow({ } : data, [connectionIntentId, aiConnection?.provider, aiConnection?.method, aiConnection?.mode]), enabled: !!selectedCompanyId, }); + const callbackUrlForSetup = oauthCallbackUrlForBrowser( + window.location.origin, + galleryQuery.data?.oauthCallbackUrl, + ); // Use the same visible catalog for cards and every branded URL shortcut. // Generic custom URLs remain usable without selecting a hidden provider. const visibleGalleryApps = useMemo( @@ -2025,7 +2029,7 @@ function StandardConnectionSetupFlow({ ).clientId === curatedOAuthClientId.trim() @@ -3397,6 +3402,7 @@ function KeyStep({ oauthClientId, onOAuthClientIdChange, oauthClientSecret, + oauthCallbackUrl: serverCallbackUrl, canReuseOAuthClientSecret, onOAuthClientSecretChange, credentialSource, @@ -3423,6 +3429,7 @@ function KeyStep({ oauthClientId: string; onOAuthClientIdChange: (next: string) => void; oauthClientSecret: string; + oauthCallbackUrl: string; canReuseOAuthClientSecret: boolean; onOAuthClientSecretChange: (next: string) => void; credentialSource: ToolConnectionCredentialSource; @@ -3520,7 +3527,7 @@ function KeyStep({ ); const vercelConnectorFilled = !usingVercel || vercelConnector.trim().length > 0; const oauthCallbackUrl = method?.auth === "oauth" && acceptsCustomerOAuthClient - ? oauthCallbackUrlForBrowser() + ? serverCallbackUrl : null; const allConfigFields = [...(method?.tenantFields ?? []), ...(method?.extensionFields ?? [])]; const configFields = allConfigFields.filter((field) => !field.hidden); diff --git a/ui/src/pages/apps/AppsConnect.test.tsx b/ui/src/pages/apps/AppsConnect.test.tsx index 14c409e923f..24fe9eb4568 100644 --- a/ui/src/pages/apps/AppsConnect.test.tsx +++ b/ui/src/pages/apps/AppsConnect.test.tsx @@ -1209,7 +1209,10 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => { }); it("collects customer-owned OAuth client details for a curated manual OAuth app", async () => { - listGalleryMock.mockResolvedValue({ apps: [BOX] }); + listGalleryMock.mockResolvedValue({ + apps: [BOX], + oauthCallbackUrl: "https://paperclip.example.test/api/tools/oauth/callback", + }); mockParams.appKey = "box"; await render(); await passAccessStep(); @@ -1222,7 +1225,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => { ); expect(container.textContent).toContain("Paperclip callback URL"); expect(container.textContent).toContain( - "http://localhost:3000/api/tools/oauth/callback", + "https://paperclip.example.test/api/tools/oauth/callback", ); expect(buttonByText("Continue to sign in")?.disabled).toBe(true); diff --git a/ui/src/pages/apps/app-detail/ActionTestDialog.test.tsx b/ui/src/pages/apps/app-detail/ActionTestDialog.test.tsx index 5be7ec1e3b5..87ef3ee641d 100644 --- a/ui/src/pages/apps/app-detail/ActionTestDialog.test.tsx +++ b/ui/src/pages/apps/app-detail/ActionTestDialog.test.tsx @@ -157,6 +157,163 @@ afterEach(async () => { }); describe("Permissions action Test dialog", () => { + it("forwards an explicitly cleared optional text field", async () => { + const textEntry = { + ...entry, + inputSchema: { type: "object", properties: { update_text: { type: "string" } } }, + } as ToolCatalogEntry; + runTestCallMock.mockResolvedValue({ decision: "allowed", invocationId: "empty-text" }); + + await renderDialog(textEntry); + const moreOptions = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "More options"); + expect(moreOptions).toBeTruthy(); + await act(() => moreOptions!.click()); + const input = document.body.querySelector('input[aria-label="Update Text"]'); + expect(input).toBeTruthy(); + const setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set; + await act(() => { + setValue!.call(input, "draft"); + input!.dispatchEvent(new Event("input", { bubbles: true })); + }); + await act(() => { + setValue!.call(input, ""); + input!.dispatchEvent(new Event("input", { bubbles: true })); + }); + const runButton = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "Run"); + await act(() => runButton!.click()); + await flushReact(); + + expect(runTestCallMock).toHaveBeenCalledWith("conn-1", { + agentId: "agent-ceo", + toolName: "list_projects", + parameters: { update_text: "" }, + }); + }); + + it("forwards false, zero, and an explicit object default without normalization", async () => { + const defaultsEntry = { + ...entry, + inputSchema: { + type: "object", + properties: { + enabled: { type: "boolean", default: false }, + count: { type: "integer", default: 0 }, + options: { + type: "object", + default: { enabled: false, count: 0 }, + required: ["enabled", "count"], + properties: { + enabled: { type: "boolean" }, + count: { type: "integer" }, + }, + }, + }, + }, + } as ToolCatalogEntry; + runTestCallMock.mockResolvedValue({ decision: "allowed", invocationId: "defaults" }); + + await renderDialog(defaultsEntry); + const runButton = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "Run"); + await act(() => runButton!.click()); + await flushReact(); + + expect(runTestCallMock).toHaveBeenCalledWith("conn-1", { + agentId: "agent-ceo", + toolName: "list_projects", + parameters: { enabled: false, count: 0, options: { enabled: false, count: 0 } }, + }); + }); + + it("rejects an explicitly supplied empty optional object with required children", async () => { + const objectEntry = { + ...entry, + inputSchema: { + type: "object", + properties: { + options: { + type: "object", + default: {}, + required: ["name"], + properties: { name: { type: "string" } }, + }, + }, + }, + } as ToolCatalogEntry; + + await renderDialog(objectEntry); + const runButton = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "Run"); + await act(() => runButton!.click()); + await flushReact(); + + expect(document.body.textContent).toContain("This field is required"); + expect(runTestCallMock).not.toHaveBeenCalled(); + }); + + it("runs the actual ActionTester with Firecrawl's minimal URL input after opening More options", async () => { + const firecrawlEntry = { + ...entry, + id: "firecrawl-scrape", + toolName: "firecrawl_scrape", + title: "Firecrawl scrape", + inputSchema: { + type: "object", + properties: { + url: { type: "string" }, + profile: { type: "object", required: ["name"], properties: { name: { type: "string" } } }, + queryOptions: { + type: "object", + required: ["prompt"], + properties: { + mode: { type: "string", enum: ["directQuote", "freeform"], default: "freeform" }, + prompt: { type: "string" }, + }, + }, + screenshotOptions: { + type: "object", + properties: { + viewport: { + type: "object", + required: ["width", "height"], + properties: { width: { type: "number" }, height: { type: "number" } }, + }, + }, + }, + }, + }, + } as ToolCatalogEntry; + getTestAgentAccessMock.mockResolvedValue({ + access: { + connectionId: "conn-1", toolCount: 1, allowedCount: 1, askFirstCount: 0, offCount: 0, + lastChangedAt: null, lastChangedByAgentId: null, lastChangedByName: null, + tools: [{ toolName: "firecrawl_scrape", gatewayToolName: "firecrawl__firecrawl_scrape", displayName: "Firecrawl scrape", risk: "read", decision: "allowed", reasonCode: null, matchedPolicyIds: [] }], + }, + }); + runTestCallMock.mockResolvedValue({ decision: "allowed", invocationId: "firecrawl-minimal" }); + + await renderDialog(firecrawlEntry); + const moreOptions = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "More options"); + expect(moreOptions).toBeTruthy(); + await act(() => moreOptions!.click()); + const urlInput = document.body.querySelector('input[aria-label="Url"]'); + expect(urlInput, document.body.textContent).toBeTruthy(); + const setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set; + await act(() => { + setValue!.call(urlInput, "https://paperclip.ing"); + urlInput!.dispatchEvent(new Event("input", { bubbles: true })); + }); + const runButton = [...document.body.querySelectorAll("button")].find((button) => button.textContent?.trim() === "Run"); + expect(runButton).toBeTruthy(); + await act(() => runButton!.click()); + await flushReact(); + + expect(document.body.textContent).not.toContain("This field is required"); + expect(runTestCallMock).toHaveBeenCalledWith("conn-1", { + agentId: "agent-ceo", + toolName: "firecrawl_scrape", + parameters: { url: "https://paperclip.ing" }, + }); + }); + it("renders structured MCP rows and keeps the full response behind the raw disclosure", async () => { runTestCallMock.mockResolvedValue({ decision: "allowed", invocationId: "structured", diff --git a/ui/src/pages/apps/app-detail/ActionTestDialog.tsx b/ui/src/pages/apps/app-detail/ActionTestDialog.tsx index 698b834e0a0..b9ddd8e670f 100644 --- a/ui/src/pages/apps/app-detail/ActionTestDialog.tsx +++ b/ui/src/pages/apps/app-detail/ActionTestDialog.tsx @@ -454,11 +454,11 @@ function ActionTester({ }, [running]); const run = useMutation({ - mutationFn: async () => { + mutationFn: async (parameters: Record) => { const result = await toolsApi.runTestCall(connectionId, { agentId: agent.id, toolName: entry.toolName, - parameters: values, + parameters, }); return result; }, @@ -496,7 +496,7 @@ function ActionTester({ setElapsedMs(0); setOutcome(null); setRunning(true); - run.mutate(); + run.mutate(values); }; const onReset = () => { diff --git a/ui/src/pages/apps/generic-mcp-connect.test.ts b/ui/src/pages/apps/generic-mcp-connect.test.ts index e32f8776ca0..d70100c3378 100644 --- a/ui/src/pages/apps/generic-mcp-connect.test.ts +++ b/ui/src/pages/apps/generic-mcp-connect.test.ts @@ -38,6 +38,13 @@ describe("endpointHost", () => { }); describe("oauthCallbackUrlForBrowser", () => { + it("prefers the callback URL advertised by the server", () => { + expect(oauthCallbackUrlForBrowser( + "http://localhost:3000", + "https://paperclip.example.test/api/tools/oauth/callback", + )).toBe("https://paperclip.example.test/api/tools/oauth/callback"); + }); + it("uses localhost for local HTTP callbacks to match the API authorization request", () => { expect(oauthCallbackUrlForBrowser("http://127.0.0.1:3200")).toBe( "http://localhost:3200/api/tools/oauth/callback", diff --git a/ui/src/pages/apps/generic-mcp-connect.ts b/ui/src/pages/apps/generic-mcp-connect.ts index d98eca617af..552b2acfd34 100644 --- a/ui/src/pages/apps/generic-mcp-connect.ts +++ b/ui/src/pages/apps/generic-mcp-connect.ts @@ -42,7 +42,11 @@ export function endpointHost(url: string): string | null { * they point at the same machine. The API therefore uses `localhost` for local * HTTP OAuth, so the setup form must advertise that same canonical spelling. */ -export function oauthCallbackUrlForBrowser(origin: string = window.location.origin): string { +export function oauthCallbackUrlForBrowser( + origin: string = window.location.origin, + serverCallbackUrl?: string, +): string { + if (serverCallbackUrl) return serverCallbackUrl; const callbackUrl = new URL("/api/tools/oauth/callback", origin); const hostname = callbackUrl.hostname.toLowerCase().replace(/^\[|\]$/g, ""); if (