@wavespeed/mcp 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,9 +32,9 @@ Built on the same design as the open-source [`@wavespeed/cli`](https://github.co
32
32
  | Tool | What it does |
33
33
  |---|---|
34
34
  | `list_models` | Search the live catalog by text or modality type |
35
- | `get_model_schema` | A model's real input schema (required, properties, defaults), with a link to the model's docs page |
35
+ | `get_model_schema` | A model's real input schema (required, properties, defaults), with a link to the model's playground page |
36
36
  | `run_model` | Submit + wait; rejects input keys the model doesn't accept; `@path` inputs upload automatically; returns output URLs |
37
- | `get_price` | Cost estimate for the inputs you pass (no charge), with a link to the model's docs page |
37
+ | `get_price` | Cost estimate for the inputs you pass (no charge), with a link to the model's playground page |
38
38
  | `get_balance` | Account credit balance, with the top-up link |
39
39
  | `list_predictions` | Run history (default last 24h); filter by model, status, time range |
40
40
  | `list_billings` | Itemized charges and refunds (needs a Billing-access key) |
@@ -71,12 +71,14 @@ The hosted server has the same tools, with one difference for files: it cannot r
71
71
 
72
72
  ### Local (npx)
73
73
 
74
+ `@latest` makes npx fetch the newest release on each start; without it, npx runs a globally installed `@wavespeed/mcp` if one exists, however old.
75
+
74
76
  Auth resolves from `WAVESPEED_API_KEY`, or from the CLI's stored login (`wavespeed login`) — one login covers both tools. Keys: [wavespeed.ai/accesskey](https://wavespeed.ai/accesskey).
75
77
 
76
78
  **Claude Code**
77
79
 
78
80
  ```bash
79
- claude mcp add wavespeed -- npx -y @wavespeed/mcp
81
+ claude mcp add wavespeed -- npx -y @wavespeed/mcp@latest
80
82
  ```
81
83
 
82
84
  **Claude Desktop / other clients** (`mcpServers` config):
@@ -86,7 +88,7 @@ claude mcp add wavespeed -- npx -y @wavespeed/mcp
86
88
  "mcpServers": {
87
89
  "wavespeed": {
88
90
  "command": "npx",
89
- "args": ["-y", "@wavespeed/mcp"],
91
+ "args": ["-y", "@wavespeed/mcp@latest"],
90
92
  "env": { "WAVESPEED_API_KEY": "wsk_..." }
91
93
  }
92
94
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // stdio entry point: `wavespeed-mcp` (or `npx -y @wavespeed/mcp`).
2
+ // stdio entry point: `wavespeed-mcp` (or `npx -y @wavespeed/mcp@latest`).
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { createServer } from './server.js';
5
5
  async function main() {
package/dist/lib/api.js CHANGED
@@ -200,12 +200,9 @@ export async function fetchUsageStats(startTime, endTime, model) {
200
200
  body.model_uuid = model;
201
201
  return apiPost('/api/v3/user/usage_stats', body, { timeoutMs: GET_TIMEOUT_MS });
202
202
  }
203
- // The model's page on the docs site (same rule as the dashboard's model page
204
- // link): provider folder, then the id without a leading "wavespeed-ai/" and
205
- // with "/" turned into "-".
206
- export function modelDocsUrl(modelId) {
207
- const provider = modelId.split('/')[0];
208
- return `https://wavespeed.ai/docs/docs-api/${provider}/${modelId.replace('wavespeed-ai/', '').split('/').join('-')}`;
203
+ // The model's page on the site, where it can be tried in the playground.
204
+ export function modelPlaygroundUrl(modelId) {
205
+ return `https://wavespeed.ai/models/${modelId}`;
209
206
  }
210
207
  export async function fetchPricing(modelId, inputs) {
211
208
  // /model/price is the documented pricing endpoint.
package/dist/server.js CHANGED
@@ -9,13 +9,13 @@
9
9
  // * Inputs are never mutated. The one explicit transform is the `@path`
10
10
  // marker, which uploads the referenced local file and substitutes its
11
11
  // hosted URL. Bare paths pass through untouched.
12
- // * Price quotes are estimates for the inputs given; the model's docs page
13
- // is linked next to them for what each input means.
12
+ // * Price quotes are estimates for the inputs given; the model's playground
13
+ // page is linked next to them for what each input means.
14
14
  import { createRequire } from 'node:module';
15
15
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
16
16
  import { z } from 'zod';
17
17
  import { Client } from 'wavespeed';
18
- import { fetchModels, fetchBalance, fetchHistory, fetchBillings, fetchUsageStats, deletePredictions, PREDICTION_STATUSES, fetchPricing, modelDocsUrl, submitPrediction, waitForPrediction, MCP_CLIENT_NAME, TERMINAL_FAILURES, } from './lib/api.js';
18
+ import { fetchModels, fetchBalance, fetchHistory, fetchBillings, fetchUsageStats, deletePredictions, PREDICTION_STATUSES, fetchPricing, modelPlaygroundUrl, submitPrediction, waitForPrediction, MCP_CLIENT_NAME, TERMINAL_FAILURES, } from './lib/api.js';
19
19
  import { getApiKey, getBaseUrl } from './lib/config.js';
20
20
  import { MAX_DELETE_IDS, prepareDelete, summarizeDelete } from './lib/delete-predictions.js';
21
21
  // Where to add credit; handed to the assistant next to the balance.
@@ -163,7 +163,7 @@ export function createServer() {
163
163
  required: schema?.required ?? [],
164
164
  properties: schema?.properties ?? {},
165
165
  property_order: schema?.['x-order-properties'] ?? [],
166
- docs_url: modelDocsUrl(meta.model_id),
166
+ playground_url: modelPlaygroundUrl(meta.model_id),
167
167
  });
168
168
  });
169
169
  server.tool('run_model', 'Run any WaveSpeed model. input keys come from get_model_schema; unknown keys are rejected before submission. Local files: pass "@./path" string values — they are uploaded and replaced with hosted URLs (bare paths are NOT uploaded). Returns the prediction id right away (done=false); call get_prediction with that id and wait_seconds until done=true to get the output URLs. The task keeps running on the server. Pass wait_seconds here to wait for a quick model in the same call.', {
@@ -221,7 +221,7 @@ export function createServer() {
221
221
  });
222
222
  const priceInput = resolved.input;
223
223
  const data = await fetchPricing(model, priceInput);
224
- return ok({ ...data, estimate: true, disclaimer: PRICE_DISCLAIMER, docs_url: modelDocsUrl(model) });
224
+ return ok({ ...data, estimate: true, disclaimer: PRICE_DISCLAIMER, playground_url: modelPlaygroundUrl(model) });
225
225
  });
226
226
  server.tool('get_balance', 'Show the WaveSpeed account credit balance, with the link to top up.', {}, { readOnlyHint: true, openWorldHint: true }, async () => {
227
227
  return ok({ ...(await fetchBalance()), top_up_url: TOP_UP_URL });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavespeed/mcp",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "WaveSpeed MCP server — run any model on the live WaveSpeed catalog (image, video, audio, 3D) with schema introspection, local-file upload, and price quotes.",
5
5
  "type": "module",
6
6
  "bin": {