svg-mcp 1.0.1 → 1.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/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # svg-mcp
2
+
3
+ An MCP (Model Context Protocol) server that lets AI assistants render and view SVG content as images.
4
+
5
+ ## Tools
6
+
7
+ | Tool | Description |
8
+ |------|-------------|
9
+ | `viewSVG` | Renders an SVG string and returns it as a PNG image |
10
+ | `viewSVGFile` | Reads an SVG file from disk and returns it as a PNG image |
11
+
12
+ Both tools accept an optional `width` parameter to scale the output image.
13
+
14
+ ## Installation
15
+
16
+ ### Via npx (no install required)
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "svg-mcp": {
22
+ "command": "npx",
23
+ "args": ["svg-mcp"]
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ### Global install
30
+
31
+ ```bash
32
+ npm install -g svg-mcp
33
+ ```
34
+
35
+ Then configure:
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "svg-mcp": {
41
+ "command": "svg-mcp"
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+
48
+ ## Development
49
+
50
+ ```bash
51
+ # Install dependencies
52
+ npm install
53
+
54
+ # Build
55
+ npm run build
56
+
57
+ # Build and run
58
+ npm start
59
+ ```
60
+
61
+ ## License
62
+
63
+ MIT
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  export {};
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  const promises_1 = require("fs/promises");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svg-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server that allows AI to view SVGs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { readFile } from "fs/promises";
2
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";