pup-recorder-mcp 0.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Autokaka <qq1909698494@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # pup-recorder-mcp(1)
2
+
3
+ ## NAME
4
+
5
+ pup-recorder-mcp - MCP server for pup(1)
6
+
7
+ ## SYNOPSIS
8
+
9
+ ```
10
+ pup-mcp-server
11
+ ```
12
+
13
+ ## DESCRIPTION
14
+
15
+ Exposes pup(1) as an MCP tool over stdio transport.
16
+
17
+ ## CONFIGURATION
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "pup-recorder": {
23
+ "command": "npx",
24
+ "args": ["--yes", "pup-recorder-mcp"]
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ## TOOL
31
+
32
+ ```
33
+ name pup-recorder
34
+ source string file://, http(s)://, or data: URI (required)
35
+ duration number seconds, default 5
36
+ width number default 1920
37
+ height number default 1080
38
+ fps number default 30
39
+ withAlphaChannel boolean default false
40
+ outDir string default "out"
41
+ useInnerProxy boolean default false
42
+ ```
43
+
44
+ Returns JSON: `{ mp4?, webm?, mov?, cover, width, height, fps, duration }`.
45
+
46
+ ## SEE ALSO
47
+
48
+ pup(1), pup(7)
49
+
50
+ ## AUTHOR
51
+
52
+ qq1909698494@gmail.com
package/bin.ts ADDED
@@ -0,0 +1,41 @@
1
+ // Created by Autokaka (qq1909698494@gmail.com) on 2026/02/26.
2
+
3
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
+ import { pup, RecordSchema } from "pup-recorder";
6
+ import z from "zod";
7
+ import pkg from "./package.json";
8
+
9
+ export const PupMCPSchema = z
10
+ .object({ source: z.string().describe("file://, http(s)://, or data: URI") })
11
+ .extend(RecordSchema.shape);
12
+
13
+ async function main() {
14
+ const server = new McpServer(pkg);
15
+ server.registerTool(
16
+ "pup-recorder",
17
+ {
18
+ title: "Record Webpage",
19
+ description: "Record a webpage to video",
20
+ inputSchema: PupMCPSchema,
21
+ },
22
+ async (args) => {
23
+ try {
24
+ const result = await pup(args.source, args);
25
+ return {
26
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
27
+ };
28
+ } catch (error) {
29
+ return {
30
+ isError: true,
31
+ content: [
32
+ { type: "text", text: JSON.stringify({ error: String(error) }) },
33
+ ],
34
+ };
35
+ }
36
+ },
37
+ );
38
+ await server.connect(new StdioServerTransport());
39
+ }
40
+
41
+ main();
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "pup-recorder-mcp",
3
+ "version": "0.0.2",
4
+ "description": "MCP server for pup-recorder.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Autokaka/pup-recorder-mcp.git"
8
+ },
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "autokaka",
12
+ "email": "qq1909698494@gmail.com"
13
+ },
14
+ "type": "module",
15
+ "bin": "bin.ts",
16
+ "engines": {
17
+ "bun": ">= 1",
18
+ "node": ">= 20"
19
+ },
20
+ "engineStrict": true,
21
+ "dependencies": {
22
+ "@modelcontextprotocol/sdk": "latest",
23
+ "@typescript/native-preview": "latest",
24
+ "pup-recorder": "workspace:*",
25
+ "zod": "latest"
26
+ },
27
+ "scripts": {
28
+ "build": "tsgo"
29
+ }
30
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["ESNext", "DOM"],
4
+ "target": "ESNext",
5
+ "module": "Preserve",
6
+ "moduleDetection": "force",
7
+ "types": ["node"],
8
+
9
+ "moduleResolution": "bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "verbatimModuleSyntax": true,
12
+ "noEmit": true,
13
+
14
+ "strict": true,
15
+ "skipLibCheck": true,
16
+ "noFallthroughCasesInSwitch": true,
17
+ "noUncheckedIndexedAccess": true,
18
+ "noImplicitOverride": true,
19
+
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "noPropertyAccessFromIndexSignature": true
23
+ },
24
+ "include": ["bin.ts"]
25
+ }