terminal-png-mcp 0.1.5

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 Poe Platform
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,35 @@
1
+ # terminal-png-mcp
2
+
3
+ MCP server that exposes `terminal-png` as a tool over stdio.
4
+
5
+ ## Tool: `render_terminal_png`
6
+
7
+ Renders ANSI terminal output as a PNG image.
8
+
9
+ | Input | Type | Required | Description |
10
+ | ---------- | ------- | -------- | ------------------------------------ |
11
+ | `ansiText` | string | yes | ANSI-formatted terminal output |
12
+ | `padding` | number | no | Padding in pixels around the content |
13
+ | `window` | boolean | no | Whether to render window chrome |
14
+
15
+ Returns: PNG image content block.
16
+
17
+ ## Usage
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "terminal-png": {
23
+ "command": "terminal-png-mcp"
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Configuration Options
30
+
31
+ Configuration is supplied through MCP tool arguments. There is no package-level config file.
32
+
33
+ ## Environment Variables
34
+
35
+ This package does not read public environment variables.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createTerminalPngMcpServer } from "./index.js";
3
+ await createTerminalPngMcpServer().listen();
@@ -0,0 +1 @@
1
+ export declare function createTerminalPngMcpServer(): import("tiny-stdio-mcp-server").Server;
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import { createServer, Image } from "tiny-stdio-mcp-server";
2
+ import { renderTerminalPng } from "terminal-png";
3
+ const schema = {
4
+ type: "object",
5
+ properties: {
6
+ ansiText: {
7
+ type: "string",
8
+ description: "ANSI-formatted terminal output to render"
9
+ },
10
+ padding: {
11
+ type: "integer",
12
+ minimum: 0,
13
+ description: "Padding in pixels around the content"
14
+ },
15
+ window: {
16
+ type: "boolean",
17
+ description: "Whether to render a window chrome around the screenshot"
18
+ }
19
+ },
20
+ required: ["ansiText"]
21
+ };
22
+ export function createTerminalPngMcpServer() {
23
+ return createServer({
24
+ name: "terminal-png-mcp",
25
+ version: "0.1.0"
26
+ }).tool("render_terminal_png", "Renders ANSI terminal output as a PNG image", schema, async ({ ansiText, padding, window }) => {
27
+ const buffer = await renderTerminalPng(ansiText, { padding, window });
28
+ return Image.fromBytes(buffer, "image/png");
29
+ });
30
+ }
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "terminal-png-mcp",
3
+ "version": "0.1.5",
4
+ "description": "MCP server that exposes terminal PNG rendering as a tool.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "terminal-png-mcp": "dist/cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "build": "node ../../scripts/guard-package-dist.mjs && tsc",
19
+ "prepack": "node ../../scripts/set-bin-executable.mjs",
20
+ "prepublishOnly": "tsc"
21
+ },
22
+ "files": [
23
+ "LICENSE",
24
+ "dist"
25
+ ],
26
+ "engines": {
27
+ "node": ">=18.18"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/poe-platform/poe-code.git",
32
+ "directory": "packages/terminal-png-mcp"
33
+ },
34
+ "license": "MIT",
35
+ "keywords": [
36
+ "mcp",
37
+ "model-context-protocol",
38
+ "terminal",
39
+ "png",
40
+ "ansi"
41
+ ],
42
+ "dependencies": {
43
+ "terminal-png": "0.1.5",
44
+ "tiny-stdio-mcp-server": "^0.1.0"
45
+ }
46
+ }