SuperAPIAI Directory

Mux

github.com · AI developer platforms

The Mux TypeScript MCP Server in the official Mux Node/TypeScript SDK repository is a Model Context Protocol (MCP) server for the Mux Data and Mux Video APIs. It uses a "code mode" tool approach: it exposes documentation search tools and code tools to AI agents, the agent writes code against the TypeScript SDK, the code is executed in an isolated sandbox, and the execution results are returned to the agent. It supports running directly via npx and can also be configured and installed in MCP clients such as Cursor, VS Code, and Claude Code; it supports two execution modes, a local Deno sandbox and a remote code sandbox, and can run as a remote server over HTTP transport.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

The Mux TypeScript MCP Server is an MCP server implementation in the packages/mcp-server directory of the official Mux Node/TypeScript SDK repository (muxinc/mux-ts), designed to let AI agents access the Mux API through the Model Context Protocol. The SDK itself is the official Mux API wrapper, supporting Mux Data and Mux Video.

Purpose and positioning The MCP server targets scenarios where agents need to operate Mux services. Rather than directly exposing a large number of fine-grained API tools, it uses a "Code Mode" tool approach: the agent writes code against the TypeScript SDK, the server executes it in an isolated sandbox, and then returns whatever the code returns or prints to the agent as the tool call result. According to the official description, this approach enables agents to complete very complex tasks deterministically and repeatably.

Main capabilities The server exposes two tools to agents: first, a documentation search tool that can be used to query API/SDK documentation generically; second, a code tool in which the agent writes code against the TypeScript SDK, with the code executed in a sandbox environment with no network and no file system access.

Usage The MCP Server can be run directly via npx. For existing MCP clients, refer to their documentation to install the server; for clients that use configuration JSON, configure it according to the example. Cursor users can install it via a button and set environment variables in Cursor's mcp.json (Cursor Settings > Tools & MCP > New MCP Server); VS Code users can install it via a link and set environment variables in mcp.json (Command Palette > MCP: Open User Configuration); Claude Code users can run a command in the terminal to install it and set environment variables in .claude.json in the home directory.

Execution modes By default, --code-execution-mode=local is used, and code runs in an isolated Deno sandbox on the machine where the MCP server is located. When set to remote (or via the MCP_SERVER_CODE_EXECUTION_MODE environmentvariables), the code is sent to a remote code sandbox service, requiring configuration of --code-sandbox-url / CODE_SANDBOX_URL and --code-sandbox-api-key / CODE_SANDBOX_API_KEY (sent as a Bearer token); in remote mode these two are required. Local mode depends on Deno, and the package installs it itself via an optional deno dependency; if installation is not possible (binary downloads blocked, npm install --omit=optional, or platforms such as Alpine that have no Deno npm build), you can set DENO_PATH to point to a Deno 2.9 or newer executable. The desktop bundle (.mcpb) does not include Deno, and its settings also provide DENO_PATH.

Request headers and remote operation Under HTTP transport, callers can send x-stainless-mcp-client-envs to provide client environment values (such as credentials), and send x-stainless-mcp-client-permissions to adjust code tool permissions; by default both are accepted, for ease of use by trusted proxies. If deployed publicly and callers are not allowed to do this, start with --no-client-header-overrides, or pass clientHeaderOverrides: false when embedding streamableHTTPApp. Using --transport=http starts the server as a remote server with Streamable HTTP transport, --port selects the port, and --socket allows running on a Unix socket. Authorization can use the Basic or Bearer scheme via the Authorization header, or be provided via other specified request headers.

Running code outside the server The package also installs the mcp-code-runner executable, for use by sandbox services that execute caller code in their own VM. It runs a single request through the same Deno worker as local execution mode: it receives {"code": ..., "client_opts": ...} JSON from stdin or a file argument, writes a single line of {is_error, result, log_lines, err_lines} JSON to stdout, and Deno's own output goes to stderr. The network authorization scope is the same as local execution mode: the set of hosts called by the SDK (the client base URL plus the media hosts used by some endpoints).

Use cases and limitations Intended for developers already using Mux Data/Mux Video who want agents to call the Mux API programmatically through an MCP client. Limitations include: the code sandbox has no network or filesystem access; local mode depends on Deno 2.9+ (or specifying it via DENO_PATH); remote mode requires a sandbox URL and API key; the desktop bundle does not include Deno. Specific installation commands, configuration JSON examples, and authorization header details are not fully given in the materials and are not provided here.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools