Mux

com.mux由 mux.com 發布官方發布者v12.8.0更新於 Oct 27, 2026

The official MCP Server for the Mux API

已驗證Streamable HTTP可網頁執行開發者工具媒體與設計

概覽

AI 產生的概覽

Mux 官方 MCP 伺服器,讓助理查詢 Mux API 文件並在沙箱中執行 TypeScript SDK 程式碼來管理影片資產與播放。

可以做什麼
  • 搜尋 Mux API 與 SDK 文件
  • 在隔離沙箱中撰寫並執行 TypeScript SDK 程式碼以呼叫 Mux API
  • 把沙箱程式碼印出或回傳的內容當作工具結果回傳
  • 以 stdio 在本機執行,或作為遠端 Streamable HTTP 伺服器執行
適用情境
適合希望助理透過官方 API 處理 Mux 帳戶事務(例如檢視或修改影片資產、直播與播放設定)而不必手動操作主控台的場合,也適合在寫程式時查詢 Mux SDK 用法。
執行需求
需要遠端端點,或透過 npx 執行 npm 套件(Node.js)。必須提供 Mux 存取權杖 ID 與密鑰(MUX_TOKEN_ID、MUX_TOKEN_SECRET),也可改用 OAuth 或 Authorization 標頭。簽章播放 ID 可選用 MUX_SIGNING_KEY 與 MUX_PRIVATE_KEY。本機程式碼執行需要 Deno(自動安裝或以 DENO_PATH 指定);遠端沙箱模式需要 CODE_SANDBOX_URL 與 CODE_SANDBOX_API_KEY。
安裝前請注意
伺服器持有 Mux API 憑證並能操作你的 Mux 帳戶,其執行的程式碼可能建立、修改或刪除資產等資源。私鑰(MUX_PRIVATE_KEY)與簽章金鑰屬敏感機密。預設情況下 HTTP 呼叫端可透過請求標頭覆寫用戶端環境值與程式碼工具權限,公開部署應以 --no-client-header-overrides 關閉。遠端沙箱模式會把程式碼傳送給第三方服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mux,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.mux%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "mux": {
      "type": "http",
      "url": "https://mcp.mux.com/"
    }
  }
}

README

Mux TypeScript MCP Server

Installation

Direct invocation

You can run the MCP Server directly via npx:

sh
export MUX_TOKEN_ID="my token id"export MUX_TOKEN_SECRET="my secret"export MUX_WEBHOOK_SECRET="My Webhook Secret"export MUX_SIGNING_KEY="My Jwt Signing Key"export MUX_PRIVATE_KEY="My Jwt Private Key"export MUX_AUTHORIZATION_TOKEN="my authorization token"npx -y @mux/mcp@latest

Via MCP Client

There is a partial list of existing clients at modelcontextprotocol.io. If you already have a client, consult their documentation to install the MCP server.

For clients with a configuration JSON, it might look something like this:

json
{  "mcpServers": {    "mux": {      "command": "npx",      "args": ["-y", "@mux/mcp"],      "env": {        "MUX_TOKEN_ID": "my token id",        "MUX_TOKEN_SECRET": "my secret",        "MUX_WEBHOOK_SECRET": "My Webhook Secret",        "MUX_SIGNING_KEY": "My Jwt Signing Key",        "MUX_PRIVATE_KEY": "My Jwt Private Key",        "MUX_AUTHORIZATION_TOKEN": "my authorization token"      }    }  }}

Cursor

If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables in Cursor's mcp.json, which can be found in Cursor Settings > Tools & MCP > New MCP Server.

[Add to Cursor]

VS Code

If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables in VS Code's mcp.json, which can be found via Command Palette > MCP: Open User Configuration.

Open VS Code

Claude Code

If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your environment variables in Claude Code's .claude.json, which can be found in your home directory.

claude mcp add mux_mcp_api --env MUX_TOKEN_ID="my token id" MUX_TOKEN_SECRET="my secret" MUX_WEBHOOK_SECRET="My Webhook Secret" MUX_SIGNING_KEY="My Jwt Signing Key" MUX_PRIVATE_KEY="My Jwt Private Key" MUX_AUTHORIZATION_TOKEN="my authorization token" -- npx -y @mux/mcp

Code Mode

This MCP server is built on the "Code Mode" tool scheme. In this MCP Server, your agent will write code against the TypeScript SDK, which will then be executed in an isolated sandbox. To accomplish this, the server will expose two tools to your agent:

  • The first tool is a docs search tool, which can be used to generically query for documentation about your API/SDK.

  • The second tool is a code tool, where the agent can write code against the TypeScript SDK. The code will be executed in a sandbox environment without web or filesystem access. Then, anything the code returns or prints will be returned to the agent as the result of the tool call.

Using this scheme, agents are capable of performing very complex tasks deterministically and repeatably.

Execution modes

By default (--code-execution-mode=local), code runs on the MCP server machine in an isolated Deno sandbox. Setting --code-execution-mode=remote (or the MCP_SERVER_CODE_EXECUTION_MODE environment variable) sends code to a remote code sandbox service instead, configured with:

  • --code-sandbox-url / CODE_SANDBOX_URL: URL of the sandbox service. Required in remote mode.
  • --code-sandbox-api-key / CODE_SANDBOX_API_KEY: API key for the sandbox service, sent as a Bearer token. Required in remote mode.

Local mode runs the code under Deno, which the package installs for itself through its optional deno dependency. Where that cannot install — a blocked binary download, npm install --omit=optional, or a platform Deno does not ship an npm build for, such as Alpine — set DENO_PATH to a Deno 2.9 or newer executable. The same variable applies to mcp-code-runner below. The desktop bundle (.mcpb) never includes Deno; its settings expose DENO_PATH for the same purpose.

Request headers a caller may send

Over the HTTP transport, x-stainless-mcp-client-envs lets a caller supply client environment values (for example credentials) and x-stainless-mcp-client-permissions lets it adjust code tool permissions. Both are honored by default so a trusted proxy in front of the server can use them. A public deployment whose callers must not do either should start the server with --no-client-header-overrides (or pass clientHeaderOverrides: false in mcpOptions when embedding streamableHTTPApp).

Running code outside the server

The package also installs a mcp-code-runner bin for sandbox services that execute caller code in their own VM. It runs one request through the same Deno worker as local execution mode: feed it {"code": ..., "client_opts": ...} as JSON on stdin or as a file argument; it writes one {is_error, result, log_lines, err_lines} JSON line to stdout and Deno's own output to stderr. The network grant is the set of hosts the SDK calls (the client's base URL plus the media hosts some endpoints use), as in local execution mode.

Running remotely

Launching the client with --transport=http launches the server as a remote server using Streamable HTTP transport. The --port setting can choose the port it will run on, and the --socket setting allows it to run on a Unix socket.

Authorization can be provided via the Authorization header using the Basic or Bearer scheme.

Additionally, authorization can be provided via the following headers:

HeaderEquivalent client optionSecurity scheme
x-mux-token-idtokenIdaccessToken
x-mux-token-secrettokenSecretaccessToken
x-mux-authorization-tokenauthorizationTokenauthorizationToken

A configuration JSON for this server might look like this, assuming the server is hosted at http://localhost:3000:

json
{  "mcpServers": {    "mux": {      "url": "http://localhost:3000",      "headers": {        "Authorization": "Basic <auth value>"      }    }  }}

來源:packages/mcp-server/README.md,提交 59af362

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v12.8.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分