Skip to content

Commit 981b62d

Browse files
release: 12.2.0 (#596)
* chore: upload dxt file as release asset * fix(build): bump node version in CI build to 20 to be compatible with MCP package * chore(internal): version bump * chore: make some internal functions async * feat(mcp): support filtering tool results by a jq expression * fix(mcp): relax input type for asTextContextResult * docs: clarify that additional audio tracks may be removed (#357) * fix: Fix incorrect deprecated message in live streaming playback policies (#358) * feat: clean up environment call outs * fix(mcp): support jq filtering on cloudflare workers * chore(mcp): rework imports in tools * chore(mcp): formatting * chore(api): build cloudflare worker mcp server * release: 12.2.0 --------- Co-authored-by: Tomer Aberbach <[email protected]> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent ed4cb34 commit 981b62d

File tree

123 files changed

+7896
-392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+7896
-392
lines changed

.github/workflows/publish-npm.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,11 @@ jobs:
3939
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
4040
env:
4141
NPM_TOKEN: ${{ secrets.MUX_NPM_TOKEN || secrets.NPM_TOKEN }}
42+
43+
- name: Upload DXT file to release
44+
if: github.event_name == 'release'
45+
run: |
46+
gh release upload ${{ github.event.release.tag_name }} \
47+
packages/mcp-server/dxt/mux.dxt#mux-mcp.dxt
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "12.1.0"
2+
".": "12.2.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-d4d7fca3b738848f0ecb2658b7a8ee82f51886dae8014266671954b980f5fdac.yml
3-
openapi_spec_hash: 0db43f6551ec879686631abbc738c9b4
4-
config_hash: 82eb9b770c0e6a5db21fab2794a26a69
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-211713a01eb052da5f6732bba658d2436bf866412bfa310c690d8983f267cbbc.yml
3+
openapi_spec_hash: ad58459421d76cb976989951c6656816
4+
config_hash: 2093578740c6c695af8b0a84e6deebb0

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## 12.2.0 (2025-07-16)
4+
5+
Full Changelog: [v12.1.0...v12.2.0](https://github.com/muxinc/mux-node-sdk/compare/v12.1.0...v12.2.0)
6+
7+
### Features
8+
9+
* clean up environment call outs ([b6bd416](https://github.com/muxinc/mux-node-sdk/commit/b6bd416af78cd2010189e26c5b24ac188d6b5f51))
10+
* **mcp:** support filtering tool results by a jq expression ([24ee59b](https://github.com/muxinc/mux-node-sdk/commit/24ee59be71cae71c8d570df1f0c0b77d505d567d))
11+
12+
13+
### Bug Fixes
14+
15+
* **build:** bump node version in CI build to 20 to be compatible with MCP package ([31a0909](https://github.com/muxinc/mux-node-sdk/commit/31a09098aa083c0e4dc8c320d5459331351bd5ea))
16+
* Fix incorrect deprecated message in live streaming playback policies ([#358](https://github.com/muxinc/mux-node-sdk/issues/358)) ([4fe35bb](https://github.com/muxinc/mux-node-sdk/commit/4fe35bb6af229f6d2a046ec2778830e0c72b618c))
17+
* **mcp:** relax input type for asTextContextResult ([b6e7352](https://github.com/muxinc/mux-node-sdk/commit/b6e7352dbab0f99ccf7484a7b1701aea52b7e846))
18+
* **mcp:** support jq filtering on cloudflare workers ([2bd8dc6](https://github.com/muxinc/mux-node-sdk/commit/2bd8dc658156a31a6082dcb82614a8b63889c1eb))
19+
20+
21+
### Chores
22+
23+
* **api:** build cloudflare worker mcp server ([69e6f8c](https://github.com/muxinc/mux-node-sdk/commit/69e6f8c0395b58faab0bd0142764b514e3ea10bb))
24+
* **internal:** version bump ([e312932](https://github.com/muxinc/mux-node-sdk/commit/e312932665b6e64bddd158cb417a8ef08e66b7d8))
25+
* make some internal functions async ([4e78a17](https://github.com/muxinc/mux-node-sdk/commit/4e78a1788fe1da9a98ef75fa0693ae74df1ce369))
26+
* **mcp:** formatting ([4844bf6](https://github.com/muxinc/mux-node-sdk/commit/4844bf69e84b4c7bfc7fdbfef3ff63bd963981b1))
27+
* **mcp:** rework imports in tools ([4ee527f](https://github.com/muxinc/mux-node-sdk/commit/4ee527f9c107b94c0b74962a500c7f86c25aeb1f))
28+
* upload dxt file as release asset ([86c5ad1](https://github.com/muxinc/mux-node-sdk/commit/86c5ad16f7b749a3cd6cb9132f955241f9697f0e))
29+
30+
31+
### Documentation
32+
33+
* clarify that additional audio tracks may be removed ([#357](https://github.com/muxinc/mux-node-sdk/issues/357)) ([8577e42](https://github.com/muxinc/mux-node-sdk/commit/8577e42a3f1b7f9d2307be6151c83d9fae57a56c))
34+
335
## 12.1.0 (2025-07-03)
436

537
Full Changelog: [v12.0.1...v12.1.0](https://github.com/muxinc/mux-node-sdk/compare/v12.0.1...v12.1.0)

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ The full API of this library can be found in [api.md](api.md).
2323
```js
2424
import Mux from '@mux/mux-node';
2525

26-
const client = new Mux();
26+
const client = new Mux({
27+
tokenId: process.env['MUX_TOKEN_ID'], // This is the default and can be omitted
28+
tokenSecret: process.env['MUX_TOKEN_SECRET'], // This is the default and can be omitted
29+
});
2730

2831
const asset = await client.video.assets.create({
2932
inputs: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
@@ -41,7 +44,10 @@ This library includes TypeScript definitions for all request params and response
4144
```ts
4245
import Mux from '@mux/mux-node';
4346

44-
const client = new Mux();
47+
const client = new Mux({
48+
tokenId: process.env['MUX_TOKEN_ID'], // This is the default and can be omitted
49+
tokenSecret: process.env['MUX_TOKEN_SECRET'], // This is the default and can be omitted
50+
});
4551

4652
const params: Mux.Video.AssetCreateParams = {
4753
inputs: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mux/mux-node",
3-
"version": "12.1.0",
3+
"version": "12.2.0",
44
"description": "The official TypeScript library for the Mux API",
55
"author": "Mux <[email protected]>",
66
"types": "dist/index.d.ts",

packages/mcp-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ The following tools are available in this MCP server.
169169
- `create_track_video_assets` (`write`): Adds an asset track (for example, subtitles, or an alternate audio track) to an asset. Assets must be in the `ready` state before tracks can be added.
170170
- `delete_playback_id_video_assets` (`write`): Deletes a playback ID, rendering it nonfunctional for viewing an asset's video content. Please note that deleting the playback ID removes access to the underlying asset; a viewer who started playback before the playback ID was deleted may be able to watch the entire video for a limited duration.
171171
- `delete_static_rendition_video_assets` (`write`): Deletes a single static rendition for an asset
172-
- `delete_track_video_assets` (`write`): Removes a text track from an asset. Audio and video tracks on assets cannot be removed.
172+
- `delete_track_video_assets` (`write`): Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed.
173173
- `generate_subtitles_video_assets` (`write`): Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created.
174174
- `retrieve_input_info_video_assets` (`read`): Returns a list of the input objects that were used to create the asset along with any settings that were applied to each input.
175175
- `retrieve_playback_id_video_assets` (`read`): Retrieves information about the specified playback ID.
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
node_modules
2+
3+
.nx
4+
.idea
5+
.vscode
6+
.zed
7+
# Logs
8+
9+
logs
10+
_.log
11+
npm-debug.log_
12+
yarn-debug.log*
13+
yarn-error.log*
14+
lerna-debug.log*
15+
.pnpm-debug.log*
16+
17+
# Diagnostic reports (https://nodejs.org/api/report.html)
18+
19+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20+
21+
# Runtime data
22+
23+
pids
24+
_.pid
25+
_.seed
26+
\*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
34+
coverage
35+
\*.lcov
36+
37+
# nyc test coverage
38+
39+
.nyc_output
40+
41+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42+
43+
.grunt
44+
45+
# Bower dependency directory (https://bower.io/)
46+
47+
bower_components
48+
49+
# node-waf configuration
50+
51+
.lock-wscript
52+
53+
# Compiled binary addons (https://nodejs.org/api/addons.html)
54+
55+
build/Release
56+
57+
# Dependency directories
58+
59+
node_modules/
60+
jspm_packages/
61+
62+
# Snowpack dependency directory (https://snowpack.dev/)
63+
64+
web_modules/
65+
66+
# TypeScript cache
67+
68+
\*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
72+
.npm
73+
74+
# Optional eslint cache
75+
76+
.eslintcache
77+
78+
# Optional stylelint cache
79+
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
84+
.rpt2_cache/
85+
.rts2_cache_cjs/
86+
.rts2_cache_es/
87+
.rts2_cache_umd/
88+
89+
# Optional REPL history
90+
91+
.node_repl_history
92+
93+
# Output of 'npm pack'
94+
95+
\*.tgz
96+
97+
# Yarn Integrity file
98+
99+
.yarn-integrity
100+
101+
# dotenv environment variable files
102+
103+
.env
104+
.env.development.local
105+
.env.test.local
106+
.env.production.local
107+
.env.local
108+
109+
# parcel-bundler cache (https://parceljs.org/)
110+
111+
.cache
112+
.parcel-cache
113+
114+
# Next.js build output
115+
116+
.next
117+
out
118+
119+
# Nuxt.js build / generate output
120+
121+
.nuxt
122+
dist
123+
124+
# Gatsby files
125+
126+
.cache/
127+
128+
# Comment in the public line in if your project uses Gatsby and not Next.js
129+
130+
# https://nextjs.org/blog/next-9-1#public-directory-support
131+
132+
# public
133+
134+
# vuepress build output
135+
136+
.vuepress/dist
137+
138+
# vuepress v2.x temp and cache directory
139+
140+
.temp
141+
.cache
142+
143+
# Docusaurus cache and generated files
144+
145+
.docusaurus
146+
147+
# Serverless directories
148+
149+
.serverless/
150+
151+
# FuseBox cache
152+
153+
.fusebox/
154+
155+
# DynamoDB Local files
156+
157+
.dynamodb/
158+
159+
# TernJS port file
160+
161+
.tern-port
162+
163+
# Stores VSCode versions used for testing VSCode extensions
164+
165+
.vscode-test
166+
167+
# yarn v2
168+
169+
.yarn/cache
170+
.yarn/unplugged
171+
.yarn/build-state.yml
172+
.yarn/install-state.gz
173+
.pnp.\*
174+
175+
# wrangler project
176+
177+
.dev.vars
178+
.wrangler/
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Remote MCP Server on Cloudflare with Stainless
2+
3+
Remote MCP servers require OAuth, so this flow implements a local version of the OAuth redirects, but instead accepts the
4+
API token and any other client configuration options that you'd need to instantiate your TypeScript client.
5+
6+
## Usage
7+
8+
The recommended way to use this project is to use the below "deploy to cloudflare" button to use this repo as a template for generating a server.
9+
10+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/muxinc/mux-node-sdk/tree/main/packages/mcp-server/cloudflare-worker)
11+
12+
## Develop locally
13+
14+
```bash
15+
# install dependencies
16+
npm install
17+
18+
# run locally
19+
npm run dev
20+
```
21+
22+
You should be able to open [`http://localhost:8787/`](http://localhost:8787/) in your browser
23+
24+
## Connect the MCP inspector to your server
25+
26+
To explore your new MCP api, you can use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector).
27+
28+
- Start it with `npx @modelcontextprotocol/inspector`
29+
- [Within the inspector](http://localhost:5173), switch the Transport Type to `SSE` and enter `http://localhost:8787/sse` as the URL of the MCP server to connect to, and click "Connect"
30+
- You will navigate to a (mock) user/password login screen. Input any email and pass to login.
31+
- You should be redirected back to the MCP Inspector and you can now list and call any defined tools!
32+
33+
## Connect Claude Desktop to your local MCP server
34+
35+
The MCP inspector is great, but we really want to connect this to Claude! Follow [Anthropic's Quickstart](https://modelcontextprotocol.io/quickstart/user) and within Claude Desktop go to Settings > Developer > Edit Config to find your configuration file.
36+
37+
Open the file in your text editor and replace it with this configuration:
38+
39+
```json
40+
{
41+
"mcpServers": {
42+
"mux_mux_node_api": {
43+
"command": "npx",
44+
"args": ["mcp-remote", "http://localhost:8787/sse"]
45+
}
46+
}
47+
}
48+
```
49+
50+
This will run a local proxy and let Claude talk to your MCP server over HTTP
51+
52+
When you open Claude a browser window should open and allow you to login. You should see the tools available in the bottom right. Given the right prompt Claude should ask to call the tool.
53+
54+
## Deploy to Cloudflare
55+
56+
If you want to manually deploy this server (e.g. without the "deploy to cloudflare" button)
57+
58+
1. `npx wrangler@latest kv namespace create remote-mcp-server-oauth-kv`
59+
2. Follow the guidance to add the kv namespace ID to `wrangler.jsonc`
60+
3. `npm run deploy`
61+
62+
## Call your newly deployed remote MCP server from a remote MCP client
63+
64+
Just like you did above in "Develop locally", run the MCP inspector:
65+
66+
`npx @modelcontextprotocol/inspector@latest`
67+
68+
Then enter the `workers.dev` URL (ex: `worker-name.account-name.workers.dev/sse`) of your Worker in the inspector as the URL of the MCP server to connect to, and click "Connect".
69+
70+
You've now connected to your MCP server from a remote MCP client.
71+
72+
## Connect Claude Desktop to your remote MCP server
73+
74+
Update the Claude configuration file to point to your `workers.dev` URL (ex: `worker-name.account-name.workers.dev/sse`) and restart Claude
75+
76+
```json
77+
{
78+
"mcpServers": {
79+
"mux_mux_node_api": {
80+
"command": "npx",
81+
"args": ["mcp-remote", "https://worker-name.account-name.workers.dev/sse"]
82+
}
83+
}
84+
}
85+
```
86+
87+
## Debugging
88+
89+
Should anything go wrong it can be helpful to restart Claude, or to try connecting directly to your
90+
MCP server on the command line with the following command.
91+
92+
```bash
93+
npx mcp-remote http://localhost:8787/sse
94+
```
95+
96+
In some rare cases it may help to clear the files added to `~/.mcp-auth`
97+
98+
```bash
99+
rm -rf ~/.mcp-auth
100+
```

0 commit comments

Comments
 (0)