---
name: tiktok-mcp-install
description: Start onboarding for the Mya TikTok MCP from any agent (Claude Code, Codex, Cursor, an always-on agent such as Claude Duet, Grok Bot, OpenAI Dots or Meta Muse, the Claude apps, or another one), with one browser sign-in, then ask which social media accounts the user wants to log in to. Use when asked to install, connect, set up, or get started with the TikTok MCP.
---

# Start onboarding

This guide is for any agent. The user signs in **once**, in a browser, to their Mya
account; that sign-in covers the onboarding page and the tools. Do the steps of your section in
order, without asking first.

Server: `https://mya.computer`
Onboarding page: `https://mya.computer/chat`
MCP address: `https://mya.computer/mcp`

## Which section is yours

Go by what you can do, not by your name:

| You are | Do |
| --- | --- |
| Claude Code, on the user's computer | Section A, all three steps |
| Another agent running on the user's own computer (Codex, Cursor, a terminal agent, ...) | Section A steps 1 and 2, then section C |
| An always-on agent with a computer of your own in the cloud (Claude Duet, Grok Bot, OpenAI Dots, Meta Muse, ...) | Section B, then section C |
| A chat app or bot that can't run commands (the Claude apps, ...) | Section B, then section C |
| Any other agent | Section B, then section C |

**"Your computer" is not "the user's computer".** If you run on a cloud computer of your own,
section A is not for you, even though you can run commands: the sign-in helper opens a browser
on the machine it runs on and waits for the answer there, and the user isn't at that machine.
Don't run it on your cloud computer, and don't open the sign-in page in your own browser and
sign in for them. The user signs in on their own phone or laptop.

If you already have tools named `new_login`, `list_logins` and `scroll`, the server is connected:
skip to "Then ask the user".

## A. You run on the user's own computer and can run commands there

### 1. Get the sign-in helper

It is one Python file (standard library only), kept in the user's home folder:

    mkdir -p ~/.averagetechlab && curl -fsSL "https://mya.computer/atl.py" -o ~/.averagetechlab/atl.py

### 2. Open the sign-in window

Check first: `python3 ~/.averagetechlab/atl.py status`. If it says signed in, skip to step 3.

Otherwise run this in the background (it waits up to 10 minutes for the user), and tell the user
in one line that a browser window has opened for them to sign in:

    python3 ~/.averagetechlab/atl.py login

The window opens by itself. The user signs in to their Mya account there (Google, or
a link emailed to them) and selects **Allow**. The same window then goes to the onboarding page,
already signed in. Sign-in is the user's step: never ask for a password, token or code in chat,
and don't type into that window.

Wait for the command to print `Signed in as ...`. If it times out, run it again and say so.

### 3. Connect the tools (Claude Code only)

    python3 ~/.averagetechlab/atl.py connect

This adds the `tiktok` MCP server to Claude Code and has it take its token from the helper, so the
user is not asked to sign in a second time. The tools load in the user's next Claude Code
session. If Claude Code asks whether to trust the folder, that choice is the user's.

Every other agent skips this step and does section C instead.

## B. You are not on the user's computer (an always-on agent, a chat app, a bot)

Send the user the onboarding link, in the chat or channel where they talk to you. They open it
on their own device and sign in there. If you can show a page in the user's own browser beside
the chat, open it for them instead. Then do section C; you don't have to wait for them to
finish signing in first.

## C. Add the server to your own agent (everything except Claude Code)

The server is a standard remote MCP server. Add it the way your agent adds one:

- **Name:** `tiktok`
- **Address:** `https://mya.computer/mcp`
- **Transport:** streamable HTTP (a remote server, not a local command)
- **Sign-in:** OAuth. There is no API key. Your agent opens a browser page, the user signs in to
  their Mya account there and selects **Allow**. Leave any client id, secret or
  header fields empty; the server registers your agent by itself.

If you can add a server yourself (a config file, a command, or a tool for it), do that, then tell
the user a sign-in page will open. If only the user can, tell them where, in one or two lines:

- **Claude apps and Claude Duet:** Duet uses the apps connected to the user's Claude account.
  At claude.ai: Settings (or Customize) > Connectors > Add custom connector, paste the address,
  then **Connect** and **Allow**.
- **Grok Bot:** Connect apps > Add a custom connector > Remote HTTPS, paste the address, and
  finish the sign-in when it asks (on grok.com: Connectors > New Connector > Custom). A server
  added once is there for every bot on the account.
- **OpenAI Dots:** in ChatGPT, Plugins > Add > Add custom MCP server (on some plans: Settings >
  Apps & Connectors, with Developer Mode on), paste the address and sign in.
- **Meta Muse and any other agent:** the setting is usually called connectors, plugins,
  integrations, tools or MCP servers. Add a custom or remote one with the address above.

When the sign-in link for the connector comes to you rather than to the user (some always-on
agents get it as a link to pass on), send it to the user and wait. Don't open it yourself.

Menu names change. If yours don't match, look for "custom connector" or "remote MCP server"
in your agent's settings and say what you found instead of guessing.

If your agent can only send a fixed header and can run commands, `python3
~/.averagetechlab/atl.py header` prints the `Authorization` header as JSON. Use it as a helper
command your agent runs each time, since the token inside is short-lived. Never print
it into the chat or save it in a file the user shares.

If the sign-in page never opens, or your agent can't add remote MCP servers at all, say so
plainly and give the onboarding link: the user can still sign in and manage their accounts
there, without the tools.

## Then ask the user

Send one short, friendly message that:

- Says they're signed in (or, in case B, where to sign in), and that the onboarding page shows
  their social media accounts. Give the link; they can open it at any time.
- Says when the tools will be there: in Claude Code, in their next session; in other agents,
  once the server is added and they have selected **Allow**.
- Asks: **"Would you like to log in to any of your social media accounts?"**, and says they can
  do that themselves with the **Log in to TikTok** button on that page.

Then stop and wait for their answer. Do not start a TikTok login yourself.

## What the TikTok tools do

Once an account is signed in, these act on it. Pass `account` when the user has more than one.

- **Accounts:** `list_logins`, `whoami`, and `new_login` / `login_status` / `cancel_login` to add
  an account by QR code (the user scans it; you show the image and link).
  `new_login(site="instagram")` or `new_login(site="x")` adds an Instagram or X account instead:
  give the user the private link it returns, where they sign in themselves. The feed tools
  below are TikTok only; computer use and DMs also work on the other sites.
- **Messages:** `import_dms` reads an account's inbox (`site="tiktok"` or `"instagram"`) and
  `messages` returns what was imported. Neither sends anything.
- **Draft replies:** `draft_push` saves a reply or a new message for the user to review on the
  Messages tab (`channel` `gmail`, `instagram`, `tiktok`, `x` or `other`). It never sends.
  `drafts_list` shows what's waiting; `draft_discard` throws one away, and that doesn't send
  either. The user edits the text there and clicks **Send** (Gmail, which really sends) or
  **Approve** (a channel the page can't send from, which only marks the text ready to copy)
  or **Discard**. Don't send that text yourself with `gmail_send`.
- **Notes:** `account_notes` returns what the user wrote on the onboarding page about what each
  account should do. Read them before acting on an account, and follow them.
- **For You feed:** `scroll` (1-20 videos), `up_next`, `engage` (like) and `save` act on the
  video on screen, and return the caption, hashtags, stats and what plays next. Videos are
  paused as soon as they load; `watch(seconds)` plays the one on screen for 1-60 seconds, also
  after opening a video from search or a profile.
- **Lists:** `lists` shows the user's creator lists; `edit_list` makes a new one or changes its
  columns (e.g. `edit_list("AI creators", columns=["Niche", "Note", "Email"])`); `add_to_list`
  adds creators and fills the columns (`"fields": {"Niche": "AI tools"}`); `remove_from_list`
  takes one off. The user sees every change on the dashboard's Lists tab.
- **Calendar:** `calendar_events` shows what the user plans on which day (from today, 60 days
  on, unless you pass `start` and `end`); `calendar_add`, `calendar_update` and
  `calendar_delete` change it. Pass `account` (and `site`) to tie an event to a bot. The user
  sees every change on the dashboard's Calendar page. An event only plans: it never posts.
- **Warming up a feed:** `warmup_instructions` returns the loop to follow (train, pause, refresh,
  check, compare), each platform's signals and settings, and what never to press. Read it before
  training an account's feed.
- **History:** `history` lists what was done with an account, newest first.
- **Computer use:** `open_url`, `read_page`, `screenshot`, `click`, `type_text`, `press_key` and
  `scroll_page` drive the account's browser like a person would. Use them for search, profiles,
  hashtags and comments, e.g. `open_url("/search/video?q=claude code")` or `open_url("/tag/ai")`.
  `read_page` lists the clickable elements with their (x, y) for `click`, and costs less than a
  screenshot. They work on Instagram and X accounts too: pass `site="instagram"` or `site="x"`,
  e.g. `open_url("/nasa/", site="instagram")`. Each account's browser only opens its own site,
  never types into password fields, and stops when the site shows a puzzle or verification
  check: tell the user then; don't try to get past it.

Every step shows up live on the onboarding page, in the **Activity** log under each account:
each tool call, each video swiped past, and how it ended.

## If you are an always-on agent

You keep working while the user is away, so a few things matter more:

- Only act on an account when the user asked for it or its notes (`account_notes`) say to. A
  scheduled check is fine; liking, saving or opening pages on your own idea is not.
- A sign-in, a code, a puzzle or a verification check always waits for the user. Message them
  and stop work on that account until they have dealt with it; don't retry in a loop.
- Use the tools, not your own cloud browser, for the user's TikTok, Instagram and X accounts.
  The accounts are signed in on the server's browsers, each with its own identity; signing in
  from your computer as well can get an account flagged.

## Rules

- Never ask the user for a password, token, or code in chat.
- The pages are for the user. Don't fill anything in on them, and don't report them as empty or
  broken if they loaded.
- If a step fails, say which one and give the onboarding link; the user can always sign in there.
- Don't sign in to TikTok, or solve a TikTok puzzle or verification check, for the user. Those
  are theirs (`new_login` and the onboarding page).
- Go at a person's pace. If the For You feed doesn't load, wait a minute before trying again.
