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 +63 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
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
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED