Skip to content

AI connections (MCP)

Latch’s optional MCP connector lets your AI application read your publication without hosting a model in Latch. Your AI client owns the model, conversation and any subscription usage. Latch never asks for Claude/ChatGPT credentials.

  1. Ask your instance administrator to enable MCP after applying database migrations (LATCH_MCP_ENABLED=true). Remote clients require a public HTTPS API URL.
  2. Open Settings → AI connections and copy the MCP URL.
  3. Add that URL as a remote MCP connector in a compatible AI application. Clients must support Streamable HTTP, OAuth authorization-code flow with S256 PKCE, and dynamic public-client registration.
  4. Sign into Latch in the authorization window and explicitly choose a publication you own. Review the data disclosure and approve read-only access.

The connection stays bound to that user/publication even if you switch publications in the dashboard. Client names are self-reported, not verified by Latch; check the application’s callback address before approving.

Claude and ChatGPT connector availability, setup screens, subscription allowances and limits vary by plan. A subscription does not automatically guarantee MCP support or unlimited usage. This connector does not provide in-dashboard chat, unattended inference or built-in AI campaign generation.

Pi 1.0.2 was verified with browser OAuth, model calls to all 12 tools, automatic refresh and revocation. Add your URL to Pi’s user-level mcp.json:

{
"mcpServers": {
"latch": {
"url": "https://your-latch-api.example/mcp",
"oauth": { "scope": "latch:read offline_access" },
"exposure": "direct"
}
}
}

Run pi mcp login latch, then pi mcp list. Start Pi or use /reload in an existing session. Pi owns the AI-provider login; only publication-scoped Latch authorization belongs in the connector.

Request offline_access explicitly for automatic refresh. Without it, Pi requests the minimum latch:read permission and must reconnect after its 15-minute access token expires. Use default dynamic registration, not CIMD.

ToolData
get_publication_overviewPublication identity and aggregate counts
list_paywallsBounded paywall metadata search
get_paywallCurrent paywall configuration and conditions, not separate draft content
list_productsBounded product/price search, without Stripe identifiers
get_analytics_summaryAggregate subscription/billing metrics
get_productOne product and a paginated price list
list_segmentsSegment metadata, without conditions or memberships
list_experimentsExperiment lifecycle metadata, without variant configuration
get_experiment_resultsAggregate counts and conversion-rate fractions for configured variants
list_campaignsCampaign status, scheduling and goals, without audience filters or overrides
list_journeysJourney status and triggers, without steps, drafts or customer runs
get_revenue_historyStored daily aggregate snapshots for the last 1–90 UTC days

Money uses minor currency units (normally cents); mixed currencies are not converted. Billing summary metrics use the same definitions as the dashboard. Revenue history omits missing snapshot days rather than filling them with zeros or writing new snapshots. Experiment results count events, not unique customers; conversion rates are fractions, and no statistical significance or winner is inferred.

There are no mutation tools, customer records, payment credentials, API keys, shell commands or arbitrary URL-fetch tools. Names, descriptions and publication text are untrusted content, not instructions. Lists use bounded pagination (default 20, maximum 50; offset at most 10,000). get_product uses priceLimit/priceOffset for price pagination. Lifecycle lists optionally filter by status; segment lists deliberately do not expose targeting conditions.

Tool results reach your AI application and its provider. Review their data-handling policies before connecting. Latch records tool name, user/publication/client identifiers, success, timestamp and duration—not tool arguments, outputs, tokens or conversation history.

Settings → AI connections lists your connections and recent activity for the active publication. Disconnect revokes that connection’s access and refresh tokens. Signing out of the authorizing Latch session, losing publication ownership, token/session expiry or client disablement also stops access. Reconnect through your AI application when needed.