Skip to main content
Glama
leanhduy-iuh

tiktok-uploader-mcp

by leanhduy-iuh

tiktok-uploader-mcp

MCP server + CLI để đóng gói (bundle) TikTok photo carousel uploads. Chuẩn bị folder ảnh + caption + manifest cho upload thủ công qua app mobile.

Python 3.11+ License: MIT Tests

Tại sao cần repo này?

TikTok chỉ cho upload photo carousel (slide ảnh) qua app mobile, không qua web PC (đã verify: TikTok VN redirect tiktok.com/creator-center/uploadtiktokstudio/upload chỉ có "Select Video", không có Photo mode).

Repo này giải quyết bằng cách đóng gói sẵn ảnh + caption + manifest + README hướng dẫn thành 1 bundle, bạn copy vào điện thoại rồi upload qua app TikTok (nhanh, ~2 phút/post).

Related MCP server: Carousels MCP from Houtini

Tính năng

  • Bundle folder ảnh + caption thành package phone-ready.

  • 4 MCP tools tích hợp Antigravity / Claude Desktop / Cursor.

  • CLI wrappers cho agent auto-approve (.cmd on Windows).

  • caption.txt paste-ready, manifest.json có SHA-256 hash.

  • README.txt hướng dẫn upload từng bước (tiếng Việt).

  • ZIP optional để dễ transfer sang điện thoại.

  • Cross-platform Windows/Linux/macOS (không cần Playwright browser).

  • Error playbook E1-E5 với retry protocol.

  • 22 unit tests validation + end-to-end.

Cài đặt

Yêu cầu

  • Python 3.11+

  • pip

Install

git clone https://github.com/leanhduy-iuh/tiktok-uploader-mcp.git
cd tiktok-uploader-mcp
pip install -e .

Sử dụng

CLI (qua wrapper)

# Tạo bundle
.\wrappers\run_bundle.cmd `
    --images-dir "C:\path\to\slides" `
    --caption "Hook...

Body text.

CTA." `
    --hashtags sinhVienIT thuthuatvat `
    --series-slug office-real-vs-fake `
    --part-slug phan-1

# Liệt kê bundle đã tạo
.\wrappers\run_list.cmd

MCP server

Thêm vào config MCP client của bạn:

{
  "mcpServers": {
    "tiktok-uploader": {
      "command": "uv",
      "args": [
        "tool", "run", "--from",
        "git+https://github.com/leanhduy-iuh/tiktok-uploader-mcp.git",
        "tiktok-uploader-mcp"
      ]
    }
  }
}

4 tools:

  • tiktok_create_bundle(images_dir, caption, hashtags=[], series_slug, part_slug, make_zip=True)

  • tiktok_list_bundles()

  • tiktok_get_bundle(bundle_id)

  • tiktok_delete_bundle(bundle_id)

Output structure

bundles/
├── <series>_<part>_<timestamp>/
│   ├── images/
│   │   ├── 01.png
│   │   ├── 02.png
│   │   └── ...
│   ├── caption.txt      ← Paste vào TikTok
│   ├── manifest.json    ← Metadata (hashes, timestamps)
│   └── README.txt       ← Hướng dẫn upload từng bước
└── <series>_<part>_<timestamp>.zip

Upload lên TikTok (trên điện thoại)

Sau khi có bundle:

  1. Copy bundle folder (hoặc ZIP) vào điện thoại qua:

    • Google Drive (recommend — đã sync sẵn với pdf_to_images.py).

    • USB cable.

    • AirDrop / Quick Share.

  2. Giải nén ZIP nếu cần.

  3. Mở app TikTok → bấm [+][Tải lên] → tab [Ảnh].

  4. Chọn tất cả ảnh trong images/ (theo thứ tự 01, 02, ...).

  5. Bấm [Tiếp] → dán nội dung caption.txt vào ô [Chú thích].

  6. Bấm [Đăng].

Chi tiết trong file README.txt đi kèm mỗi bundle.

Architecture

┌──────────────────────────────────────────────────────────┐
│                      MCP Client                           │
│            (Antigravity / Claude / Cursor)                │
└──────────────────────┬───────────────────────────────────┘
                       │ stdio JSON-RPC
                       ▼
┌──────────────────────────────────────────────────────────┐
│              tiktok-uploader-mcp (FastMCP)                │
│                                                          │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌─────────┐  │
│  │ create_  │  │ list_    │  │ get_     │  │ delete_ │  │
│  │ bundle   │  │ bundles  │  │ bundle   │  │ bundle  │  │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬────┘  │
│       │             │              │              │       │
│       ▼             ▼              ▼              ▼       │
│  ┌──────────────────────────────────────────────────┐    │
│  │  bundler.py                                       │    │
│  │  ├── collect_images()   validate_caption()        │    │
│  │  ├── build_full_caption()  make_bundle_id()       │    │
│  │  ├── create_bundle()    list_bundles()            │    │
│  │  ├── get_bundle()       delete_bundle()           │    │
│  │  └── BundleManifest dataclass                     │    │
│  └──────────────────────────────────────────────────┘    │
│                       │                                  │
│                       ▼                                  │
│              bundles/<bundle_id>/                         │
│              ├── images/    caption.txt                   │
│              ├── manifest.json    README.txt              │
│              └── <bundle_id>.zip                          │
└──────────────────────────────────────────────────────────┘
                       │ Copy to phone
                       ▼
              TikTok mobile app

Testing

pip install -e ".[dev]"
pytest tests/

22 unit tests cover:

  • Caption validation (empty, too long, hashtag count, strip leading #).

  • Image collection (mixed exts, sorted, unsupported, count limits).

  • Bundle ID generation (special chars, slug formatting).

  • End-to-end bundle creation (with/without ZIP, manifest correctness).

  • List / get / delete lifecycle.

Roadmap

  • Auto-copy bundle to Google Drive folder (giảm manual step).

  • Generate QR code linking to bundle (scan từ điện thoại).

  • Caption templates (per audience type: student/office/dev).

  • Multi-account support (different bundle dirs per TikTok account).

  • Upload tracking (mark bundle as "posted" + post URL).

Why not auto-upload?

Đã thử 3 hướng trước khi pivot sang bundle workflow:

  1. Playwright qua web PC: TikTok VN redirect tới TikTok Studio chỉ có "Select Video", không có Photo mode. (Đã verify với 6 URL khác nhau.)

  2. TikTok Content Posting API: Yêu cầu đăng ký TikTok for Developers + review process dài. Photo carousel API chưa stable.

  3. ADB automation trên app Android: Khả năng cao nhưng cần thiết bị test Android + risk break khi TikTok update app.

Bundle workflow đơn giản, ổn định, không phụ thuộc TikTok UI changes — chỉ là tổ chức file.

FAQ

Q: Tại sao không tự upload luôn?

A: TikTok VN không hỗ trợ photo carousel upload qua web. Bundle là cách tiếp cận务实 — chuẩn bị sẵn mọi thứ, user chỉ paste + click.

Q: Có thể tự động copy sang Google Drive không?

A: Có, xem roadmap. Hiện tại copy thủ công (nhưng nhanh — chỉ 1 thao tác).

Q: Bundle lưu ở đâu?

A: Mặc định bundles/ ở repo root. Có thể override qua --bundles-dir.

Q: Có support Linux/macOS không?

A: Code Python thuần, không phụ thuộc Playwright nên chạy được. Wrapper .cmd chỉ cho Windows — PR .sh cho Linux/macOS welcome.

Contributing

PR welcome. Branch main = stable, branch dev = WIP.

License

MIT © Duy Le

Available Tools

4 tools
tiktok_create_bundleA

Bundle a folder of images + caption for TikTok mobile upload.

Photo carousel can only be uploaded from TikTok mobile app (not web). This tool prepares a folder + ZIP with:

  • images/ (sorted 01.png, 02.png, ...)

  • caption.txt (ready to paste into TikTok)

  • manifest.json (metadata)

  • README.txt (human upload instructions)

User then copies the ZIP/folder to their phone and uploads manually.

Args: images_dir: Absolute path to folder with 2-35 PNG/JPG images. caption: Caption text (1-2200 chars). Hashtags can be inline or via arg. hashtags: Optional list of hashtags without '#'. Max 30. series_slug: Series identifier for bundle naming (lowercase, no spaces). part_slug: Part identifier (optional). bundles_dir: Override default bundles output directory. make_zip: Also create .zip alongside the folder.

Returns: JSON with {"ok": true, "bundle_id": "...", "zip_path": "...", ...}.

ParametersJSON Schema
NameRequiredDescriptionDefault
captionYes
hashtagsNo
make_zipNo
part_slugNo
images_dirYes
bundles_dirNo
series_slugNotiktok

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool does not upload but prepares a local bundle, describes output files (images/, caption.txt, manifest.json, README.txt, ZIP), and specifies constraints (2-35 images, 1-2200 chars, max 30 hashtags). It lacks mention of side effects like overwriting existing bundles, but creation tools are generally non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear lead sentence, bullet-like list of output files, and separate line for each argument. It is somewhat long but every sentence adds value. Could be slightly more concise by grouping some lines, but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters, no annotations, and presence of output schema, the description is thorough. It explains the entire workflow from input to output, the rationale for manual transfer, and provides constraints for each parameter. The return format (JSON with ok, bundle_id, zip_path) is mentioned, complementing the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description adds significant value beyond the schema. It explains each parameter: images_dir (absolute path, 2-35 PNG/JPG), caption (1-2200 chars), hashtags (optional list, max 30, no '#'), series_slug (lowercase, no spaces), part_slug (optional), bundles_dir (override), make_zip (boolean, default true). It provides constraints and defaults not evident in the schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The tool name 'tiktok_create_bundle' clearly indicates a creation action. The description explicitly states it 'bundle[s] a folder of images + caption for TikTok mobile upload' and distinguishes from siblings (delete, get, list) by focusing on creation of a bundle for manual transfer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: 'Photo carousel can only be uploaded from TikTok mobile app (not web)' and 'User then copies the ZIP/folder to their phone and uploads manually.' It does not explicitly state when not to use, but the context of manual upload implies it is not for automated posting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tiktok_delete_bundleA

Delete a bundle folder + its ZIP file.

Args: bundle_id: Bundle identifier. bundles_dir: Override default bundles directory.

Returns: JSON with list of removed paths.

ParametersJSON Schema
NameRequiredDescriptionDefault
bundle_idYes
bundles_dirNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It states the tool deletes a folder and ZIP file, implying destructive behavior, but does not disclose permissions needed, reversibility, or side effects. Minimal transparency beyond the core action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: a single-line purpose followed by structured Args and Returns sections. Every sentence is informative with no redundancy, and the key action is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete tool with 2 parameters and an output schema, the description covers the essential: what it deletes, the arguments, and the return type. It lacks detail on error handling or edge cases, but these are less critical for a basic operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description's Args section provides crucial meaning: 'Bundle identifier' for bundle_id and 'Override default bundles directory' for bundles_dir. These explanations add value beyond the schema's titles, effectively covering both parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete' and the resource 'a bundle folder + its ZIP file', making the tool's purpose unambiguous. It distinguishes from siblings (create, get, list) by focusing on deletion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., using delete versus other actions on bundles). There is no mention of prerequisites, when-not to use, or comparison with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tiktok_get_bundleA

Get full manifest for a bundle.

Args: bundle_id: Bundle identifier (from list_bundles). bundles_dir: Override default bundles directory.

Returns: JSON manifest with image hashes, caption, timestamps, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
bundle_idYes
bundles_dirNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and description only mentions 'Get' and return format. Lacks disclosure of side effects, auth requirements, or network usage, but for a simple read operation this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise: states purpose, then args, then returns. No unnecessary words, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With output schema present, description covers what is needed: purpose, parameter sources, and return contents. Sibling tools are listed, and the tool is simple.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description adds meaningful context: bundle_id is from list_bundles, bundles_dir overrides default directory. This compensates well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Get full manifest for a bundle' with a specific verb and resource, and distinguishes from sibling tools (create, delete, list).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies prerequisite by stating bundle_id is from list_bundles, and provides optional directory override. No explicit when-not-to-use, but siblings are distinct actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tiktok_list_bundlesA

List all prepared bundles with summary metadata.

Args: bundles_dir: Override default bundles directory.

Returns: JSON array of bundle summaries (id, image_count, created_at, has_zip, ...).

ParametersJSON Schema
NameRequiredDescriptionDefault
bundles_dirNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool lists bundles and allows overriding the default directory, implying a read-only behavior. However, it does not explicitly confirm no side effects, no destructive actions, or any limitations. The description is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using just a few lines to state the purpose, parameter, and return value. Every sentence adds value with no redundant information. The format is clear and front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, the single optional parameter, and the return format (JSON array with bundle summaries). Although an output schema exists, the description provides sufficient detail for an agent to understand what is returned. For a simple list tool, this is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the parameter 'bundles_dir' lacks schema-level explanation. The description compensates by explaining it overrides the default directory. This adds meaningful context beyond the raw schema type, though it could specify the default behavior more precisely.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all prepared bundles with summary metadata. The verb 'list' and noun 'bundles' unambiguously define the action and resource. It is distinct from sibling tools that create, delete, or get individual bundles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (tiktok_create_bundle, tiktok_delete_bundle, tiktok_get_bundle). It does not mention prerequisites, exclusions, or typical use cases. The agent must infer from the name and context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: create, delete, get, and list bundles. No overlap exists, and the descriptions make it easy to differentiate.

Naming Consistency5/5

All tools follow the consistent pattern tiktok_verb_noun (e.g., tiktok_create_bundle, tiktok_list_bundles). Naming is predictable and uniform.

Tool Count5/5

Four tools is well-scoped for the domain of bundle management. Each tool serves a necessary CRUD-like function without being excessive or too sparse.

Completeness5/5

The tool set covers all essential operations for bundle lifecycle: create, read (get/list), and delete. No obvious gaps given the manual upload workflow.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    Not graded
    maintenance
    A comprehensive MCP server that enables AI assistants to search, download, and analyze TikTok content while also performing active tasks like publishing videos and interacting with posts. It provides full automation capabilities for TikTok through browser session management and anti-detection features.
    12
    2
  • F
    license
    B
    quality
    C
    maintenance
    MCP server for TikTok that enables searching videos, users, hashtags, and fetching trending content, user profiles, and video details via official API or public scraping.
    8

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leanhduy-iuh/tiktok-uploader-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server