MCP server
Give your AI assistant a Trell login. The MCP server exposes your workspaces — stats, funnels, webhooks, domains — as tools any MCP-compatible client can call, with the same guardrails as the dashboard.
Endpoint
The MCP server lives on its own host: https://mcp.relake.co — not https://trepi.relake.co, which serves only the REST API. It speaks Streamable HTTP (stateless: one transport per request, no session affinity) at POST /. Unknown paths answer 404 and non-POST methods 405. For local development there is also a stdio entry point that runs against your own database with no auth.
Authentication
Send Authorization: Bearer … with either the service key (MCP_API_KEY, for bots and backends) or an OAuth access token (Google login with dynamic client registration and PKCE, recommended for people). Missing or invalid credentials answer 401 with a WWW-Authenticate discovery header (RFC 9728). If MCP_API_KEY is empty the HTTP endpoint is disabled (fail-closed): only OAuth logins work.
Scope
MCP_ALLOWED_SLUGS restricts which workspaces the server answers for (*, the default, means all). OAuth callers additionally see only the workspaces they belong to. Destructive tools stay off unless MCP_ALLOW_DESTRUCTIVE=true and every call passes "confirm": true.
Reading
Every tool takes a project slug or id except list_projects:
list_projectsList accessible workspaces (id, slug, name, plan). The only tool that takes no project argument.
get_projectWorkspace detail: plan, publishable key, domain allowlist, creation date.
get_statsEvent KPIs for a workspace: total, counts by type, top forms and pages (default last 30 days, max range 366 days).
tracking_checkupIs a workspace receiving events? Reports connection state, last event time, totals, domains and findings.
get_seriesTime series of event counts in hour/day/week buckets, gap-filled with zeros.
get_breakdownTop-N breakdown by dimension: page, utm_*, device, browser, os, form or type (default page, limit 25).
get_formsPer-form ranking with starts, successes and conversion rate (default last 90 days).
query_eventsRaw events, newest first, with cursor pagination (max 100 per call).
list_funnelsFunnel definitions of a workspace.
get_funnelOne funnel definition by id or name, with its steps.
list_viewsSaved dashboard views of a workspace.
list_webhooksWebhook metadata (URL, events, enabled) — signing secrets are never exposed.
list_utm_templatesUTM templates of a workspace.
list_api_keysServer-key metadata only (name, prefix, creation date) — hashes and secrets are never exposed.
Writing
Safe mutations, available to workspace members:
create_funnelCreate a funnel from an ordered step list (1–10 steps).
update_funnelRename a funnel or replace its steps.
delete_funnelDelete a funnel.
create_utm_templateCreate a UTM template (name required).
update_utm_templateUpdate a UTM template.
delete_utm_templateDelete a UTM template.
add_domainAdd a hostname to the tracking allowlist (idempotent, normalized).
remove_domainRemove a hostname from the tracking allowlist.
create_webhookCreate a webhook: valid http(s) URL plus subscribed events (Pro workspaces).
delete_webhookDelete a webhook.
create_api_keyCreate a server key — the secret is shown exactly once, store it in .env, never in the browser.
Destructive
Owner role plus MCP_ALLOW_DESTRUCTIVE=true plus "confirm": true, otherwise the call fails with destructive_disabled or confirm_required:
revoke_api_keyRevoke a server key immediately — integrations using it break at once.
delete_projectPermanently delete a workspace and everything in it (events, keys, webhooks) in cascade.
rotate_project_secretRotate the project-level secret: the new sk shows once, the old one dies instantly, named keys are untouched.
Resources & prompts
Beyond tools, the server exposes three resources for context (trell://projects, trell://projects/{slug}/usage, trell://schema/events) and two canned prompts (weekly_report, tracking_setup_help).
Connect
Point any MCP client at the URL with your key in the headers:
Probe the endpoint — listing tools with a valid key returns a JSON-RPC result; without credentials you get 401:
Secrets stay secret
sk_… values, webhook signing secrets, key hashes, or its own credentials. create_api_key and rotate_project_secret reveal the new secret exactly once. The publishable pk_… is public by design and may appear in responses.