LamaTok

io.github.subzeroidv1.1.2更新於 Oct 6, 2026

TikTok data via LamaTok: profiles, videos, comments, followers, hashtags, search, downloads.

概覽

AI 產生的概覽

讓助理透過 LamaTok API 取得 TikTok 資料,包括個人檔案、影片、留言、粉絲、主題標籤、搜尋結果與下載連結。

功能
啟動時依 LamaTok OpenAPI 規格產生 MCP 工具,每個工具對應一個 REST 端點,例如 get_v1_user_by_username 或 get_v1_media_comments_by_id。預設核心集提供約 23 個精選工具,涵蓋個人檔案與受眾、影片與留言、下載連結、主題標籤與搜尋;設定 LAMATOK_TOOLS=all 會開放所有未淘汰的端點。工具參數對應端點的 query 與 path 參數,回應以原始 JSON 文字傳回。
適用情境
當助理需要 TikTok 的個人檔案、影片、留言、粉絲、主題標籤或搜尋資料,或需要下載連結,用於研究、內容監測或報告時使用。它是唯讀資料來源,不用於發布內容或管理帳號。
執行需求
以 stdio 方式在使用者本機執行,通常透過 npx lamatok-mcp 啟動,因此需要 Node.js。必須提供 LamaTok 存取金鑰,放在 LAMATOK_KEY 環境變數中,並以 x-access-key 標頭送出;金鑰需在 lamatok.com 取得。需要連線至 api.lamatok.com 的網路,伺服器啟動時會抓取一次 OpenAPI 規格。選用變數可設定基底 URL、工具集、標籤篩選、逾時與回應大小上限。
安裝前請注意
LAMATOK_KEY 是機密,會送往所設定的 API 主機;若 LAMATOK_URL 指向 api.lamatok.com 以外的位址,伺服器會警告金鑰將被送往該處,因此只應使用可信任的自架或代理端點。請求會消耗付費或有限額的 API 額度,免費額度有限。查詢內容與傳回的 TikTok 資料會送往第三方服務。工具標註為唯讀,伺服器不會寫入、傳送或刪除資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LamaTok,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

lamatok-mcp

[npm version] [npm downloads] [License: MIT]

MCP server for LamaTok — TikTok data API. Available on npm: lamatok-mcp.

Generates MCP tools from the LamaTok OpenAPI spec at startup. Tools map 1:1 to REST endpoints (GET /v1/user/by/username → get_v1_user_by_username). By default you get a core set of ~23 tools, one per task, each with a description that tells the assistant when to use it; LAMATOK_TOOLS=all exposes every non-deprecated endpoint.

Get 100 Free API Requests

Sign up with this link and get 100 free LamaTok requests — no credit card required. Enough to wire up the MCP server, try a few prompts in Claude/Cursor/Codex, and evaluate the data quality before committing.

Get your free 100 requests here

Quick start

  1. Get an API key at lamatok.com.
  2. Add the server to your AI assistant.
  3. Ask your assistant something like:
    • "Get the TikTok profile for @nasa."
    • "List the last 10 videos by user_id 6707206320333226502."
    • "Find recent TikTok videos for the hashtag photography."

Claude Code

bash
claude mcp add lamatok -e LAMATOK_KEY=your-api-key -- npx -y lamatok-mcp

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "lamatok": {      "command": "npx",      "args": ["-y", "lamatok-mcp"],      "env": {        "LAMATOK_KEY": "your-api-key"      }    }  }}

Cursor / Windsurf

Same shape as Claude Desktop — put the block under mcpServers in the app's MCP config file.

Zed

Add to ~/.config/zed/settings.json:

json
{  "context_servers": {    "lamatok": {      "command": "npx",      "args": ["-y", "lamatok-mcp"],      "env": {        "LAMATOK_KEY": "your-api-key"      }    }  }}

OpenAI Codex

Append to ~/.codex/config.toml:

toml
[mcp_servers.lamatok]command = "npx"args = ["-y", "lamatok-mcp"]
[mcp_servers.lamatok.env]LAMATOK_KEY = "your-api-key"

Tools

Tools are generated at startup from the live LamaTok OpenAPI spec. The default core set keeps one endpoint per task and drops version duplicates:

GroupToolsExamples
Profiles and audience12get_v1_user_by_username, get_v2_user_medias_by_secUid, get_v1_user_followers_by_username
Videos and comments4get_v1_media_by_url, get_v1_media_by_id, get_v1_media_comments_by_id
Download links4get_v1_media_video_download_by_url, get_v1_media_music_download_by_id
Hashtags and search3get_v1_hashtag_info, get_v1_hashtag_medias, get_v2_search

Core tools carry hand-written descriptions (what the tool does, when to prefer a sibling, pagination, billing) and every tool is annotated read-only. The list lives in src/curated.ts.

Set LAMATOK_TOOLS=all to expose every non-deprecated endpoint instead — same tool names as before, so existing prompts keep working. Tool names mirror their endpoint (GET /v1/user/by/username → get_v1_user_by_username); call tools/list over MCP for the current list with parameter schemas. /sys, Legacy, and System tag groups are excluded in both modes.

Configuration

VariableDescriptionRequired
LAMATOK_KEYYour LamaTok access key (sent as x-access-key header)yes
LAMATOK_URLBase URL. Default: https://api.lamatok.comno
LAMATOK_SPEC_URLOpenAPI spec URL. Default: ${LAMATOK_URL}/openapi.jsonno
LAMATOK_TOOLScore (default): curated set, one tool per task. all: every non-deprecated endpointno
LAMATOK_TAGSWhitelist: only include operations with these tags (comma-separated)no
LAMATOK_EXCLUDE_TAGSBlacklist: additional tags to exclude (on top of Legacy, System, /sys)no
LAMATOK_TIMEOUT_MSPer-request timeout for API calls. Default: 30000no
LAMATOK_SPEC_TIMEOUT_MSTimeout for the startup spec fetch. Default: 60000no
LAMATOK_SPEC_RETRY_DELAY_MSBase delay between the 3 startup spec fetch attempts. Default: 2000no
LAMATOK_MAX_RESPONSE_BYTESMax bytes read from each API response. Default: 10485760 (10 MB)no
LAMATOK_MAX_SPEC_BYTESMax bytes read from the OpenAPI spec. Default: 8388608 (8 MB)no

Legacy, System, and /sys tags are excluded by default. Deprecated operations are also skipped.

If LAMATOK_URL points to a host other than api.lamatok.com, the server prints a warning on startup — your key will be sent there, so only use it for a self-hosted or proxied LamaTok.

Requests are sent with User-Agent: lamatok-mcp/<version>.

How it works

AI Assistant ←stdio→ lamatok-mcp ──https──> api.lamatok.com                          │                          └─ fetches /openapi.json once on startup,                             builds one MCP tool per GET endpoint                             (core set by default)

Tool arguments map to the endpoint's query and path parameters. The response body is returned as-is (JSON text). Non-2xx responses are surfaced as tool errors with the HTTP status and body.

Development

bash
git clone https://github.com/subzeroid/lamatok-mcp.gitcd lamatok-mcpnpm installnpm run buildLAMATOK_KEY=your-key node dist/index.js

Run in watch mode:

bash
LAMATOK_KEY=your-key npm run dev

Run tests (unit + stdio smoke tests against a local mock server, no network/API key required):

bash
npm test

License

MIT

來源:README.md,提交 d1e33e9

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.1.2最新Oct 6, 2026