t3code icon indicating copy to clipboard operation
t3code copied to clipboard

MCP `link` for external clients doesn't open the iOS app — also return a `t3code://threads/...` link

Open kairan opened this issue 1 month ago • 0 comments

Problem

When an external MCP client (OAuth, e.g. an assistant running outside T3) calls t3_thread_launch / t3_thread_read, the returned link is the relay web URL (https://<relay>.t3coderelay.com/<envId>/<threadId>) or t3-thread://v2/.... Neither opens the T3 Code iOS app:

  • t3-thread:// is only a markdown/chip format and not a registered OS scheme.
  • app.t3.codes and *.t3coderelay.com aren't in the app's associated domains (apps/mobile/app.config.ts, only clerk.t3.codes).

The only URL the iOS app opens is t3code://threads/<environmentId>/<threadId> (apps/mobile/src/App.tsx linking prefixes, apps/mobile/src/Stack.tsx thread route). I confirmed it opens the right thread when pasted into Safari, including mcp:launch:... thread ids with colons.

Proposal

In threadLinkFor (apps/server/src/mcp/McpInvocationContext.ts), also return an app link for external clients, e.g. appLink: t3code://threads/${encodeURIComponent(envId)}/${encodeURIComponent(threadId)}, next to the existing link. It's additive, uses the already-registered scheme and route, and needs no native rebuild.

Optional, larger: add applinks:app.t3.codes (and the relay domain) plus an AASA file so the https:// links open the app directly.

Related

  • #4996 (desktop t3code://threads/... deep link)

kairan avatar Oct 29 '26 11:10 kairan