Logo Tiktok Live Studio MCP

Tiktok Live Studio MCP

Cộng đồng
dannguyen9x

Local MCP server for controlling TikTok LIVE Studio through its verified Stream Deck Socket.IO channel.

Nhà phát hànhdannguyen9x
Kho mãtiktok-live-studio-mcp
Ngôn ngữTypeScript
Bản fork
1
Sao
42
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Tiktok Live Studio MCP cung cấp các chức năng MCP cho các ứng dụng khách AI và tác nhân AI tương thích.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Mẫu cấu hình có thể sao chép ngay

    Dùng các đoạn cấu hình mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Mức độ quan tâm của cộng đồng đến kho mã

    42 sao và 1 bản fork từ kho mã được liên kết.

TikTok LIVE Studio MCP

English | Tiếng Việt

CI License: MIT Node.js 20+

A local Model Context Protocol server for Windows that lets Codex, Claude Code, Claude Desktop, and other stdio MCP clients control TikTok LIVE Studio through its localhost Stream Deck Socket.IO channel.

The server does not use mouse automation, OCR, browser automation, or screen coordinates. It discovers the running LIVE Studio process and its owned port, validates the protocol, acknowledges each action, and verifies readable state changes.

Community project. Not affiliated with TikTok, ByteDance, Elgato, Anthropic, or OpenAI.

Features

  • Twelve typed MCP tools for status, scenes, sources, audio, microphone, recording, actions, and LIVE control.
  • Official MCP TypeScript SDK with stdio transport.
  • Windows process, installed-version, and process-owned port discovery.
  • Automatic rediscovery when LIVE Studio restarts on a different port.
  • Idempotent scene/source/audio/microphone/recording/LIVE operations.
  • Action-result validation plus post-action state verification.
  • Cross-process mutation lock for multiple locally configured MCP clients.
  • Structured error contract and compact JSONL evidence logs.
  • Mock Socket.IO, MCP contract, real safe integration, opt-in full integration, built stdio, packaging, and release gates.

Requirements

  • Windows 10 or Windows 11.
  • Node.js 20 or newer.
  • TikTok LIVE Studio installed. Start it before running doctor or real integration checks.

Quick start

powershell
git clone https://github.com/dannguyen9x/tiktok-live-studio-mcp.git
cd tiktok-live-studio-mcp
npm.cmd ci
npm.cmd run build
npm.cmd run doctor
npm.cmd run mcp:smoke

Then connect your MCP client using the client setup guide. For a complete walkthrough, safety model, examples, updates, and uninstall steps, read the full user guide or Vietnamese user guide.

Run the server directly:

powershell
npm.cmd start

MCP uses stdout, so ordinary runtime logs are written to artifacts/evidence/runtime.jsonl rather than stdout.

MCP client configuration

Copy the relevant example and replace C:/path/to/tiktok-live-studio-mcp with the absolute clone path:

  • .mcp.json.example
  • config/claude-desktop.example.json
  • config/claude-code.example.json
  • config/codex.example.toml

The common stdio configuration is:

json
{
  "mcpServers": {
    "tiktok-live-studio": {
      "command": "node",
      "args": [
        "C:/path/to/tiktok-live-studio-mcp/dist/src/index.js"
      ],
      "env": {
        "TTLS_LOG_PATH": "C:/path/to/tiktok-live-studio-mcp/artifacts/evidence/runtime.jsonl"
      }
    }
  }
}

Restart the MCP client after changing its configuration.

For current Codex and Claude Code CLI commands, Claude Desktop configuration, generic-client setup, and verification steps, see docs/CLIENT_SETUP.md.

Example requests

Once the server is connected, ask your MCP client naturally:

text
Check whether TikTok LIVE Studio is connected and list my scenes.
Switch LIVE Studio to the exact scene "Gameplay".
Hide source "Starting Soon" in scene "Gameplay".
Mute the microphone in LIVE Studio.
Start a local recording, but do not start LIVE.

For LIVE state changes, explicitly authorize the dedicated tool call:

text
Start LIVE using studio_start_live with confirm set to true.

Always review account, audience, scene, audio, and recording state before authorizing a LIVE action.

Tools

ToolBehavior
studio_get_statusRead running, connected, app version, endpoint, active scene, recording state, and LIVE state.
studio_list_scenesList scenes and the active scene.
studio_switch_sceneIdempotently switch to an exact scene and verify it.
studio_list_sourcesList source names, internal IDs, and visibility for the active or named scene.
studio_set_source_visibilitySet source visibility without a blind toggle; temporarily switches/restores scene when required.
studio_set_microphone_muteIdempotently set and verify aggregate microphone mute.
studio_set_audio_muteIdempotently set and verify desktop/audio-output mute.
studio_start_recordingStart recording only when stopped and verify the state.
studio_stop_recordingStop recording only when active and verify the state.
studio_trigger_actionTrigger a verified parameterless Stream Deck action and require LIVE Studio acknowledgement.
studio_start_liveRequire confirm:true, start LIVE from readable offline state, and verify live state.
studio_stop_liveRequire confirm:true, stop LIVE, and verify offline state.

The generic action enum contains live-pause, highlight, recording-gallery, co-host, treasure-box, say-hi, guess-game, play-together, goody-bag, team, game-rewards, live-goal, multi-guest, vote, promote, and viewer-wishes.

Some generic actions are conditional. LIVE Studio returns result code -1 when the verified action exists but the current account, LIVE state, eligibility, or panel state does not permit it. The MCP tool returns that as a structured ACTION_FAILED result rather than pretending the action succeeded.

Verified local protocol

FieldValue
Endpointws://127.0.0.1:<discovered-process-port>
Socket.IO path/socket.io/
Namespace/
Transportwebsocket
WebSocket subprotocolstreamdeck_ttls_v1
Joinstream_deck/join_room once per connection
Statestream_deck/sync_settings
Actionstream_deck/action_emit
Action resultstream_deck/<unique-context>

The contract was verified against LIVE Studio 1.33.2. See docs/PROTOCOL.md for payloads, status values, action IDs, and evidence provenance.

Reliability and safety model

  • Every mutation acquires %TEMP%\tiktok-live-studio-mcp.mutation.lock, reads current state, emits at most one action, verifies readable state, and releases the lock.
  • A crashed lock owner is detected by PID and recovered.
  • Source operations restore the original scene in finally.
  • Toggle-like mutations are never automatically retried after an uncertain result.
  • LIVE start/end requires literal confirm:true.
  • Disconnects trigger process and port rediscovery rather than retrying forever against a stale endpoint.
  • Malformed settings or action responses produce PROTOCOL_MISMATCH.

Every tool error contains:

text
code, message, operation, appVersion, endpoint, socketEvent,
attempt, suggestedFix, evidencePath

Tests

CI-safe checks:

powershell
npm.cmd run test:ci

Safe real integration with LIVE Studio open:

powershell
npm.cmd run doctor
npm.cmd run test:integration
npm.cmd run mcp:smoke
npm.cmd run smoke

The safe real suite switches/restores a scene, changes/restores source visibility, and changes/restores microphone mute. It never starts LIVE.

For a deliberately opt-in real audio, recording, LIVE, and generic-action gate, read docs/FULL_INTEGRATION.md. It requires explicit environment confirmations and writes a restoration report.

Full local release evidence:

powershell
npm.cmd run verify:final

See docs/VERIFICATION.md for what each gate proves.

Protocol research

powershell
npm.cmd run protocol:research

This executes npm view ttls-controller --json, downloads the published package with npm pack ttls-controller, records official Elgato Marketplace metadata, and hashes protocol-bearing files from the installed LIVE Studio version. Generated machine-specific evidence is excluded from Git; see artifacts/README.md.

Project layout

text
src/mcp/                 MCP server and schemas
src/domain/              state policy, errors, mutation lock
src/adapters/ttls/       Socket.IO protocol adapter
src/discovery/           Windows process/version/port discovery
src/logging/             structured JSONL logging
tests/unit/              mock Socket.IO and domain tests
tests/contract/          MCP and protocol contract tests
tests/integration/       safe real LIVE Studio integration
scripts/                 doctor, smoke, research, full and release gates
docs/                    protocol, architecture, and verification guides

Contributing and security

Read CONTRIBUTING.md before submitting a change. Report vulnerabilities through GitHub private vulnerability reporting as described in SECURITY.md. Do not publish raw evidence logs, credentials, recordings, account data, or proprietary LIVE Studio bundles.

Documentation

License

MIT. See LICENSE.

Dùng MCP Tiktok Live Studio MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Tiktok Live Studio MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Thiết lập trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Thiết lập trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh thiết lập trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Để tiến trình tiếp tục chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Để tiến trình tiếp tục chạy trong cửa sổ Terminal khi bạn dùng các công cụ MCP.
3

Thêm Tiktok Live Studio MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Tiktok Live Studio MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "tiktok-live-studio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Tiktok Live Studio MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Tiktok Live Studio MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng Tiktok Live Studio MCP giúp tôi làm việc này không?
Tiktok Live Studio MCP
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng Tiktok Live Studio MCP.

Câu hỏi thường gặp

Máy chủ MCP Tiktok Live Studio MCP dùng để làm gì?

Tiktok Live Studio MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Tiktok Live Studio MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Tiktok Live Studio MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Tiktok Live Studio MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Tiktok Live Studio MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Tiktok Live Studio MCP với TypingMind?

Tiktok Live Studio MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Tiktok Live Studio MCP cung cấp những công cụ nào trong TypingMind?

Tiktok Live Studio MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Tiktok Live Studio MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Tiktok Live Studio MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇