aivideowatch 1.0.0 → 1.0.1

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.
Files changed (3) hide show
  1. package/README.md +37 -7
  2. package/cli.mjs +43 -1
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -5,7 +5,9 @@
5
5
  [![Wan 3.0 Pricing](https://aivideowatch.com/api/v1/badge/model/wan-3-0.svg)](https://aivideowatch.com/models/wan-3-0)
6
6
  [![Magi-2 Pricing](https://aivideowatch.com/api/v1/badge/model/magi-2.svg)](https://aivideowatch.com/models/magi-2)
7
7
 
8
- Zero-dependency Node.js SDK & CLI for live AI video generation pricing, retry-adjusted cost-per-usable-clip budgets, and cross-platform model arbitrage across **53 platforms** and **31 canonical models** from **[AIVideoWatch.com](https://aivideowatch.com)** (`CC BY 4.0`, no API key required).
8
+ Zero-dependency Node.js SDK, CLI, and **Official MCP Server (`com.aivideowatch/pricing-mcp`)** for live AI video generation pricing, retry-adjusted cost-per-usable-clip budgets, and cross-platform model arbitrage across **53 platforms** and **31 canonical models** from **[AIVideoWatch.com](https://aivideowatch.com)** (`CC BY 4.0`, no API key required).
9
+
10
+ [![2026 Flagship AI Video Direct API Floors — AIVideoWatch](https://aivideowatch.com/api/v1/chart/api-floors.svg)](https://aivideowatch.com/api-pricing)
9
11
 
10
12
  ## Quick Start (CLI)
11
13
 
@@ -21,6 +23,31 @@ npx aivideowatch cheapest kling-4-0
21
23
  npx aivideowatch clip seedance-2-5 --sec 30 --tries 3
22
24
  ```
23
25
 
26
+ ## Official MCP Server (Claude Desktop, Cursor, VS Code)
27
+
28
+ **Option 1 — Hosted Streamable HTTP (recommended, zero local install):**
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "aivideowatch": {
33
+ "url": "https://aivideowatch.com/api/mcp"
34
+ }
35
+ }
36
+ }
37
+ ```
38
+
39
+ **Option 2 — Local stdio bridge via `npx`:**
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "aivideowatch": {
44
+ "command": "npx",
45
+ "args": ["-y", "aivideowatch", "mcp"]
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
24
51
  ## Programmatic Usage
25
52
 
26
53
  ```js
@@ -31,10 +58,13 @@ const budget = await calculateClipCost("kling-4-0", { durationSec: 10, tries: 2.
31
58
  console.log(best, budget);
32
59
  ```
33
60
 
34
- ## Links & Open Data
61
+ ## Links, Open Data & Peer-Citable Technical Report
35
62
  - **Interactive Cost-Per-Clip Calculator:** https://aivideowatch.com/cost-per-clip-calculator
36
- - **Direct API Pricing Index:** https://aivideowatch.com/api-pricing
37
- - **Open Datasets & OpenAPI 3.1:** https://aivideowatch.com/datasets
38
- - **Remote MCP Server:** https://aivideowatch.com/api/mcp
39
- - **CERN Zenodo DOI:** https://doi.org/10.5281/zenodo.24715193
40
- - **Figshare DOI:** https://doi.org/10.6084/m9.figshare.35171947
63
+ - **Direct API Pricing Index (299 rates):** https://aivideowatch.com/api-pricing
64
+ - **Cheapest AI Video APIs (2026 Ranked):** https://aivideowatch.com/best/cheapest-ai-video-api
65
+ - **How Much Does a 1-Minute AI Video Cost (2026):** https://aivideowatch.com/guides/how-much-does-a-1-minute-ai-video-cost
66
+ - **Open Datasets, Live SVG Charts & OpenAPI 3.1:** https://aivideowatch.com/datasets
67
+ - **Official MCP Registry:** https://registry.modelcontextprotocol.io/v0.1/servers/com.aivideowatch%2Fpricing-mcp/versions/latest
68
+ - **6-Page Technical Report (CERN Zenodo DOI):** https://doi.org/10.5281/zenodo.24724427
69
+ - **Preprint PDF Mirror (Figshare DOI):** https://doi.org/10.6084/m9.figshare.35173666
70
+ - **Open Dataset DOIs:** Zenodo https://doi.org/10.5281/zenodo.24715193 · Figshare https://doi.org/10.6084/m9.figshare.35171947
package/cli.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import readline from "node:readline";
2
3
  import { calculateClipCost, cheapestModel, getCostPerClip } from "./index.mjs";
3
4
 
4
5
  const [, , cmd = "top", arg1, ...rest] = process.argv;
@@ -12,8 +13,49 @@ function flagNum(name, fallback) {
12
13
  return fallback;
13
14
  }
14
15
 
16
+ async function runMcpStdioBridge() {
17
+ const endpoint = "https://aivideowatch.com/api/mcp";
18
+ const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
19
+ for await (const rawLine of rl) {
20
+ const line = rawLine.trim();
21
+ if (!line) continue;
22
+ try {
23
+ const res = await fetch(endpoint, {
24
+ method: "POST",
25
+ headers: {
26
+ "Content-Type": "application/json",
27
+ Accept: "application/json",
28
+ "User-Agent": "aivideowatch-npm-mcp-bridge/1.0.1",
29
+ },
30
+ body: line,
31
+ });
32
+ if (res.status === 202 || res.status === 204) continue;
33
+ const text = await res.text();
34
+ if (text.trim()) {
35
+ process.stdout.write(text.replace(/\r?\n/g, " ").trim() + "\n");
36
+ }
37
+ } catch (err) {
38
+ let id = null;
39
+ try {
40
+ id = JSON.parse(line).id ?? null;
41
+ } catch {}
42
+ if (id !== null) {
43
+ process.stdout.write(
44
+ JSON.stringify({
45
+ jsonrpc: "2.0",
46
+ id,
47
+ error: { code: -32000, message: `AIVideoWatch MCP bridge error: ${err.message}` },
48
+ }) + "\n"
49
+ );
50
+ }
51
+ }
52
+ }
53
+ }
54
+
15
55
  try {
16
- if (cmd === "cheapest" && arg1) {
56
+ if (cmd === "mcp") {
57
+ await runMcpStdioBridge();
58
+ } else if (cmd === "cheapest" && arg1) {
17
59
  const m = await cheapestModel(arg1);
18
60
  if (!m) {
19
61
  console.error(`Model '${arg1}' not found. Run 'aivideowatch top' to list flagship models.`);
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "aivideowatch",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
+ "mcpName": "com.aivideowatch/pricing-mcp",
4
5
  "description": "Zero-dependency Node.js SDK & CLI for live AI video generation pricing, cost-per-usable-clip budgets, and cross-platform model arbitrage (Seedance 2.5, Kling 4.0, Wan 3.0, Veo 3.1, Magi-2) from AIVideoWatch.com (CC BY 4.0).",
5
6
  "type": "module",
6
7
  "main": "./index.mjs",