PageSourceSearch

https://gtm-mcp.com/assets/SetupPage-CUojg4Q2.js

js gtm-mcp.com collected 2026-10-09 22:53:55 UTC 14,244 bytes, 1 lines download raw bytes

1import{j as e,r as i}from"./vendor-react-o7rsRgvM.js";import{u as L}from"./useTelegramPair-OFRfj4ud.js";import{S as N,I as $}from"./IdentityCard-BWZSm60e.js";import"./vendor-misc-SETun2HO.js";const O={email:"email campaigns",linkedin:"LinkedIn outreach"};function w({name:n,channel:o}){return e.jsxs("div",{"data-testid":`coming-soon-connector-${n.toLowerCase()}`,style:{border:"1px dashed var(--border)",borderRadius:10,padding:"12px 20px",background:"var(--bg-card)",opacity:.7,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e.jsxs("div",{style:{fontWeight:600,fontSize:14,color:"var(--text)"},children:[n," ",e.jsxs("span",{style:{fontWeight:400,color:"var(--text-muted)"},children:["— ",O[o]]})]}),e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",padding:"3px 8px",borderRadius:4,background:"var(--border)",color:"var(--text-muted)"},children:"Soon"})]})}function z(n){try{const o=document.createElement("textarea");o.value=n,o.style.position="fixed",o.style.opacity="0",document.body.appendChild(o),o.select();const u=document.execCommand("copy");return document.body.removeChild(o),u}catch{return!1}}function H({token:n}){const[o,u]=i.useState(null),f=JSON.stringify({mcpServers:{"gtm-mcp":{type:"sse",url:`https://gtm-mcp.com/mcp/sse?token=${n}`}}},null,2),y=`claude mcp add gtm-mcp --transport sse "https://gtm-mcp.com/mcp/sse?token=${n}"`,g=l=>{u(l),window.setTimeout(()=>u(null),1600)},v=l=>({padding:"8px 14px",borderRadius:8,background:l?"#22c55e":"#0B0D0E",color:l?"#052e16":"#FAFAFA",border:"1px solid transparent",fontSize:13,fontWeight:500,cursor:"pointer",transition:"background-color 160ms cubic-bezier(0.4, 0, 0.2, 1)"}),r=l=>({flexShrink:0,background:l?"rgba(34,197,94,0.12)":"transparent",color:l?"#22c55e":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,padding:"4px 10px",fontSize:12,cursor:"pointer",transition:"all 160ms cubic-bezier(0.4, 0, 0.2, 1)"}),h={margin:0,padding:14,borderRadius:8,background:"rgba(0,0,0,0.28)",border:"1px solid var(--border)",fontSize:12,lineHeight:1.55,color:"var(--text-muted)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",overflowX:"auto",whiteSpace:"pre"};return e.jsxs("div",{"data-testid":"mcp-developer-block",className:"settings-card",children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",marginBottom:4},children:[e.jsx("div",{style:{fontSize:15,fontWeight:500,color:"var(--text)"},children:"Use from Claude Code"}),e.jsx("a",{href:"https://docs.claude.com/en/docs/claude-code/mcp",target:"_blank",rel:"noreferrer",style:{fontSize:12,color:"var(--accent-cyan)",textDecoration:"none"},children:"Docs ↗"})]}),e.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:14},children:"Connect Claude Code, Cursor, or any MCP-capable agent to GTM-MCP."}),e.jsxs("div",{style:{marginBottom:18},children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--text-muted)",marginBottom:6},children:"Your token"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderRadius:8,background:"rgba(255,255,255,0.03)",border:"1px solid var(--border)"},children:[e.jsx("code",{style:{flex:1,minWidth:0,fontSize:12,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",color:"var(--text)",whiteSpace:"nowrap",overflow:"auto"},children:n}),e.jsx("button",{type:"button",onClick:()=>{z(n)&&g("token")},style:r(o==="token"),children:o==="token"?"Copied":"Copy"})]})]}),e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--text-muted)",marginBottom:10},children:"Setup — two options"}),e.jsxs("div",{style:{marginBottom:18},children:[e.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"var(--text)",marginBottom:6},children:["Option A — add ",e.jsx("code",{style:{fontSize:12,padding:"1px 5px",borderRadius:4,background:"rgba(255,255,255,0.06)"},children:".mcp.json"})," to your project"]}),e.jsxs("ol",{style:{margin:"0 0 10px 18px",padding:0,fontSize:12,color:"var(--text-muted)",lineHeight:1.7},children:[e.jsxs("li",{children:["In your project folder, create a file literally named ",e.jsx("code",{style:{fontSize:11,padding:"1px 4px",borderRadius:4,background:"rgba(255,255,255,0.06)"}
1,children:".mcp.json"})," (note the leading dot)."]}),e.jsx("li",{children:"Paste the content below into that file and save."}),e.jsxs("li",{children:["From that folder, run ",e.jsx("code",{style:{fontSize:11,padding:"1px 4px",borderRadius:4,background:"rgba(255,255,255,0.06)"},children:"claude"}),". The MCP server loads automatically."]}),e.jsxs("li",{children:["Try it: ",e.jsx("em",{style:{color:"var(--text)"},children:'"Launch a new campaign for acme.com"'})]})]}),e.jsx("pre",{style:{...h,maxHeight:200},children:f}),e.jsx("div",{style:{marginTop:10},children:e.jsx("button",{type:"button","data-testid":"mcp-config-copy",onClick:()=>{z(f)&&g("config")},style:v(o==="config"),children:o==="config"?"Copied":"Copy .mcp.json"})})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:13,fontWeight:600,color:"var(--text)",marginBottom:6},children:"Option B — one-line CLI"}),e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8},children:"Run this from anywhere. It registers the server globally for Claude Code."}),e.jsx("pre",{style:{...h,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:y}),e.jsx("div",{style:{marginTop:10},children:e.jsx("button",{type:"button",onClick:()=>{z(y)&&g("cli")},style:r(o==="cli"),children:o==="cli"?"Copied":"Copy command"})})]})]})}const m="/api",U=["smartlead"],I={smartlead:{label:"SmartLead",hint:"Email outreach platform"}};function V(){const[n]=i.useState(localStorage.getItem("mcp_token")||""),[o,u]=i.useState(""),[f,y]=i.useState(""),[g,v]=i.useState([]),r=L(),[h,l]=i.useState(null),[_,j]=i.useState(null),[T,b]=i.useState(""),[S,B]=i.useState(!1),[R,k]=i.useState(""),[c,F]=i.useState(null);i.useEffect(()=>{if(!n){window.location.href="/";return}fetch(`${m}/auth/me`,{headers:{"X-MCP-Token":n}}).then(t=>t.ok?t.json():null).then(t=>{t?(u(t.name),y(t.email)):(localStorage.removeItem("mcp_token"),window.location.href="/")}),fetch(`${m}/billing/status`,{headers:{"X-MCP-Token":n}}).then(t=>t.ok?t.json():null).then(t=>{t&&F({subscription_status:t.subscription_status||"none",plan:t.plan||null})}).catch(()=>{}),P()},[n]);const P=()=>{n&&fetch(`${m}/setup/integrations`,{headers:{"X-MCP-Token":n}}).then(t=>t.ok?t.json():[]).then(v)};i.useEffect(()=>{!n||!r.paired||fetch(`${m}/telegram/paired`,{headers:{"X-MCP-Token":n}}).then(t=>t.ok?t.json():null).then(t=>{t&&l(t.username||t.bot_username||null)}).catch(()=>{})},[n,r.paired]);const M=async t=>{const a=T.trim();if(!a)return;B(!0),k("");const p=await(await fetch(`${m}/setup/integrations`,{method:"POST",headers:{"Content-Type":"application/json","X-MCP-Token":n},body:JSON.stringify({integration_name:t,api_key:a})})).json();k(p.message||JSON.stringify(p)),B(!1),b(""),j(null),P()},A=()=>{localStorage.removeItem("mcp_token"),window.location.href="/"},E=new Map(g.map(t=>[t.name,t])),C=E.get("smartlead"),D=!!(C!=null&&C.connected);return e.jsxs(N,{title:"Setup",children:[e.jsx($,{name:o,email:f,onLogout:A}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.12em",color:"var(--text-muted)",marginBottom:12},children:"Connect your outbound channels"}),e.jsx("div",{className:"settings-card",style:{padding:0,overflow:"hidden"},children:U.map(t=>{var x,W;const a=E.get(t),d=!!(a!=null&&a.connected),p=_===t;return e.jsxs("div",{style:{padding:"14px 20px",display:"flex",alignItems:"center",gap:12},children:[e.jsx("div",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:d?"#22c55e":"var(--border-hi)"}}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:15,fontWeight:500,color:"var(--text)"},children:((x=I[t])==null?void 0:x.label)||t}),e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:1},children:d?(a==null?void 0:a.info)||"Connected":((W=I[t])==null?void 0:W.hint)||"Not connected"})]}),p?e.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[e.jsx("input",{style:{width:220,fontSize:12,padding:"6px 10px",fontFamily:"ui-monospace, monospace",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",outline:"none"},placeholder:"Paste API key",type:"password",value:T,onChange:s=>b(s.target.value),onPaste:s=>{s.preventDefault(),b((s.clipboardData.getData("text")||"").trim())},onKeyDown:s=>s.key==="Enter"&&M(t),autoFocus:!0}),e.jsx("button",{onClick:()=>M(t),disabled:S,style:{fontSize:12,padding:"6px 12px",borderRadius:6,background:"#a855f7",color:"white",border:"none",cursor:"pointer",opacity:S?.5:1},children:S?"…":"Save"}),e.jsx("button",{onClick:()=>{j(null),b("")},style:{fontSize:12,padding:"6px 8px",background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer"},children:"Cancel"})]}):e.jsx("button",{onClick:()=>{j(t),k("")},style:{fontSize:12,padding:"6px 14px",borderRadius:8,background:"transparent",border:"1px solid var(--border)",color:"var(--text)",cursor:"pointer",transition:"background-color 160ms cubic-bezier(0.4, 0, 0.2, 1)"},onMouseEnter:s=>{s.currentTarget.style.background="rgba(255,255,255,0.05)"},onMouseLeave:s=>{s.currentTarget.style.background="transparent"},children:d?"Replace":"Connect"})]},t)})}),D&&e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6,paddingLeft:4},children:"Every campaign you launch pushes a SmartLead draft automatically."}),R&&e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:8},children:R})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.12em",color:"var(--text-muted)",marginBottom:12},children:"Coming soon"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[e.jsx(w,{name:"Instantly",channel:"email"}),e.jsx(w,{name:"HeyReach",channel:"linkedin"}),e.jsx(w,{name:"GetSales",channel:"linkedin"})]})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.12em",color:"var(--text-muted)",marginBottom:12},children:"Telegram"}),e.jsx("div",{className:"settings-card",children:r.paired?e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[e.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:"#22c55e"}}),e.jsxs("div",{style:{fontSize:15,fontWeight:500,color:"var(--text)"},children:["Connected",h?` as @${h}`:""]})]}),e.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:14,lineHeight:1.5},children:"Every warm reply lands in this bot. Launch new campaigns from your phone."}),e.jsx("button",{"data-testid":"tg-unpair-btn",disabled:!0,style:{padding:"8px 14px",borderRadius:8,background:"transparent",border:"1px solid var(--border)",color:"var(--text-muted)",fontSize:13,cursor:"not-allowed",opacity:.6},children:"Unpair"})]}):e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:14,lineHeight:1.55},children:"A full GTM MCP client on your phone — read replies, send answers, launch new campaigns. One tap to pair."}),e.jsx("button",{type:"button","data-testid":"tg-connect-btn","aria-label":"Connect Telegram",onClick:t=>{t.preventDefault(),t.stopPropagation(),r.connect()},disabled:r.pairing,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"10px 18px",borderRadius:10,background:"#0B0D0E",color:"#FAFAFA",border:"1px solid #0B0D0E",fontSize:13,fontWeight:600,cursor:r.pairing?"wait":"pointer",opacity:r.pairing?.6:1,transition:"transform 80ms cubic-bezier(0.4, 0, 0.2, 1)"},children:r.pairing?"Waiting for Telegram…":"Connect Telegram"}),r.error&&e.jsx("div",{style:{fontSize:12,color:"#ef4444",marginTop:10},children:r.error})]})})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.12em",color:"var(--text-muted)",marginBottom:12},children:"Developer"}),(()=>{const t=typeof localStorage<"u"&&localStorage.getItem("mcp_onboarding_stage")||"done",a=t==="done",d=(c==null?void 0:c.subscription_status)==="active"||(c==null?void 0:c.subscription_status)==="trialing";
1return d?e.jsx(H,{token:n}):a?c&&!d?e.jsxs("div",{className:"settings-card","data-testid":"mcp-paywall-card",children:[e.jsx("div",{style:{fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.1em",color:"var(--accent-cyan, #06b6d4)",marginBottom:8},children:"Pro plan required"}),e.jsx("div",{style:{fontSize:15,fontWeight:500,color:"var(--text)",marginBottom:4},children:"MCP is a Pro feature"}),e.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:14},children:"Connect Claude Code and Cursor to GTM-MCP after you upgrade."}),e.jsx("button",{type:"button",onClick:async()=>{try{const p=await fetch(`${m}/billing/checkout-session`,{method:"POST",headers:{"Content-Type":"application/json","X-MCP-Token":n},body:JSON.stringify({plan:"pro"})});if(p.ok){const x=await p.json();if(x.checkout_url){window.location.href=x.checkout_url;return}}window.location.href="/account"}catch{window.location.href="/account"}},style:{display:"inline-block",padding:"8px 14px",borderRadius:8,background:"var(--accent-cyan, #06b6d4)",color:"#052e16",fontSize:13,fontWeight:600,border:"none",cursor:"pointer"},children:"Upgrade to unlock →"})]}):null:e.jsxs("div",{className:"settings-card","data-testid":"mcp-locked-onboarding",children:[e.jsx("div",{style:{fontSize:15,fontWeight:500,color:"var(--text)",marginBottom:4},children:"Finish onboarding first"}),e.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:14},children:"Complete your first campaign in the web app, then come back to connect MCP."}),e.jsx("a",{href:`/${t}`,style:{display:"inline-block",padding:"8px 14px",borderRadius:8,background:"#0B0D0E",color:"#FAFAFA",fontSize:13,fontWeight:500,textDecoration:"none"},children:"Resume onboarding →"})]})})()]})]})}export{V as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.