@geohar/pi-svg-mcp 0.10.6 → 0.11.0
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/CHANGELOG.md +183 -0
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/instructions.txt +7 -3
- package/package.json +8 -5
- package/src/index.ts +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to svg-mcp and its plugins (Claude Code, OpenCode, Pi), which are
|
|
4
|
+
released together under one version. The format follows
|
|
5
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
|
|
6
|
+
[Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [0.11.0] - 2026-11-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Breaking:** every tool that touches session state needs a `session_id` from
|
|
12
|
+
`create_session`, on every client and transport. Stdio and handshake-era HTTP clients no
|
|
13
|
+
longer get documents tied to their connection implicitly; a call without a `session_id` is
|
|
14
|
+
rejected with guidance. A session created over a handshake-era HTTP connection still
|
|
15
|
+
belongs to that connection: only it can use the id, and the session ends when it
|
|
16
|
+
disconnects. Over stdio the process is the isolation (one client per server).
|
|
17
|
+
- **Breaking:** there is no active document. Every tool that acts on a document takes a
|
|
18
|
+
required `document_id`. `set_active_document` is removed, and `import_svg`'s `into_active`
|
|
19
|
+
is replaced by `document_id` (replace that document's content).
|
|
20
|
+
- **Breaking:** resources are scoped to the session by a token (a hash of the session id):
|
|
21
|
+
`svg://<token>/documents`, `svg://<token>/<document_id>/svg` and `/render`. Tools return
|
|
22
|
+
them (`create_document` and `import_svg` give `resources`; `list_documents` and
|
|
23
|
+
`current_context` give `index`). A session owned by its connection only reads from it.
|
|
24
|
+
- **Breaking:** the live preview has one page per document, `/<token>/<document_id>/`, and an
|
|
25
|
+
index at `/<token>/`. `start_preview` takes a `document_id` and returns that page's `url` plus
|
|
26
|
+
the `index`. A page stays on its document.
|
|
27
|
+
- Ending a session (`end_session`, disconnect, idle reaping) also drops its live-preview
|
|
28
|
+
snapshot, so its pages stop serving the drawing. `set_preview_backdrop` needs a session.
|
|
29
|
+
The preview `index` URL carries a login ticket like the document URL, and the index page
|
|
30
|
+
hides the drawing controls. Preview watchers of unknown tokens leave no state behind.
|
|
31
|
+
- The widget's resource URI is shared by every session, so it is now sent only on the
|
|
32
|
+
caller's own stream, not the listen bus.
|
|
33
|
+
- `session_id` is a required, non-null argument in every session-state tool's schema, so
|
|
34
|
+
clients see it as mandatory. The `X-Svg-Mcp-Session` header is removed (nothing used it).
|
|
35
|
+
Tools that touch no session state (`list_fonts`, `render_svg`, `render_backends`,
|
|
36
|
+
`export_formats`, `measure_text`) no longer take a `session_id`.
|
|
37
|
+
- The live preview answers an unknown or ended token, an unknown document's data and an
|
|
38
|
+
unsupported export format with one identical 404, so existing tokens and documents can't
|
|
39
|
+
be told apart from made-up ones. A page whose session ended shows "session ended".
|
|
40
|
+
- A call still running when its session ends can no longer bring the session back: it is
|
|
41
|
+
refused instead of recreating the documents, and it can't republish the preview.
|
|
42
|
+
- Refused resource reads (unknown token, ended session, a session owned by another
|
|
43
|
+
connection, a document that isn't open) all give the same error and never list
|
|
44
|
+
documents.
|
|
45
|
+
- `start_preview` no longer takes a `host`: the preview binds to the configured
|
|
46
|
+
`preview_host` (loopback by default), so the model can't choose the exposure.
|
|
47
|
+
- Style keys are documented as the CSS property names (`stroke-width`, `font-size`), the
|
|
48
|
+
only spelling the published schema accepts. The instructions used to list the snake_case
|
|
49
|
+
field names, which schema-validating clients such as mcp-combiner reject.
|
|
50
|
+
- `list_documents` returns `{document_ids, index}`; `current_context` returns the session and
|
|
51
|
+
its open documents, without an outline.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
- `set_document_metadata` never worked: inkex 1.4.1 exposes the metadata fields as
|
|
55
|
+
read-only properties, so every field failed. svg-mcp now writes Inkscape's RDF block itself,
|
|
56
|
+
and `title` also sets the root `<title>` that browsers and screen readers use.
|
|
57
|
+
|
|
58
|
+
## [0.10.7] - 2026-11-09
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
- `CHANGELOG.md`, shipped in the Pi package so Pi lists what changed after an update.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
- The README's configuration example keeps settings for one server (`transport`, `port`,
|
|
65
|
+
`[web_auth]`) out of the shared `~/.config/svg-mcp/config.toml`, in a separate file that
|
|
66
|
+
server's launch selects with `$SVG_MCP_CONFIG`. Every launch reads the shared file,
|
|
67
|
+
including the stdio servers MCP clients start themselves.
|
|
68
|
+
- When the config file turns the web login on and no password is set, the startup error
|
|
69
|
+
names the file and explains why other launches fail.
|
|
70
|
+
|
|
71
|
+
## [0.10.6] - 2026-11-08
|
|
72
|
+
|
|
73
|
+
### Security
|
|
74
|
+
- A request counts as "this machine" (and skips the preview login) only when its `Host`
|
|
75
|
+
header also names this machine: `localhost`, one of its addresses, its tailnet name, or
|
|
76
|
+
the preview's bind host. A DNS-rebinding page that points its own domain at `127.0.0.1`
|
|
77
|
+
now gets the login.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
- The refresh of this machine's addresses never started, so only loopback counted as
|
|
81
|
+
local and LAN or tailnet browsers were asked to log in even with `exempt_local` on.
|
|
82
|
+
|
|
83
|
+
## [0.10.5] - 2026-11-08
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
- A TOML config file: `~/.config/svg-mcp/config.toml` (or `$SVG_MCP_CONFIG`). Every
|
|
87
|
+
setting can go there; `web_auth` is a `[web_auth]` table. CLI flags and env vars still
|
|
88
|
+
override it. Unknown keys stop startup instead of being ignored.
|
|
89
|
+
- Transport, host, port, shutdown grace and the preview's settings are now ordinary
|
|
90
|
+
settings, so the config file can set them.
|
|
91
|
+
|
|
92
|
+
### Fixed
|
|
93
|
+
- A raw `password` inside the `web_auth` block was never hashed, so password mode failed
|
|
94
|
+
to start with it.
|
|
95
|
+
- The 0.10.4 package included a stray editor backup of `webauth.py`.
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
- The README documents env vars as `SVG_MCP_` plus the setting name, with JSON for
|
|
99
|
+
`web_auth`; the double-underscore form still works but is no longer documented.
|
|
100
|
+
- Documented the tunnel caveat: an `ssh -L` or `socat` tunnel, `tailscale serve --tcp`, or
|
|
101
|
+
any forwarder that drops `X-Forwarded-For` makes every browser look local. Set
|
|
102
|
+
`exempt_local: false` behind one.
|
|
103
|
+
|
|
104
|
+
## [0.10.4] - 2026-11-08
|
|
105
|
+
|
|
106
|
+
### Changed
|
|
107
|
+
- The web login code now mirrors mcp-combiner's, so a fix in one can be copied to the
|
|
108
|
+
other. Login rate limiting counts per address and overall, and an expired ticket never
|
|
109
|
+
signs a browser in.
|
|
110
|
+
- New `web_auth.ticket_uses` setting (default 1).
|
|
111
|
+
|
|
112
|
+
## [0.10.3] - 2026-11-08
|
|
113
|
+
|
|
114
|
+
### Changed
|
|
115
|
+
- This machine's addresses (interfaces and tailnet) are looked up again every minute, so
|
|
116
|
+
a roaming laptop stays recognised. Until the first lookup, only loopback counts.
|
|
117
|
+
- A browser connecting from loopback counts as this machine again, matching mcp-combiner.
|
|
118
|
+
|
|
119
|
+
## [0.10.2] - 2026-11-08
|
|
120
|
+
|
|
121
|
+
### Security
|
|
122
|
+
- Login hardening: a cap on logins in flight per address and overall, at most two
|
|
123
|
+
password checks at once, one-time tickets, logout by POST only, and stricter checks on
|
|
124
|
+
the signing-key file.
|
|
125
|
+
|
|
126
|
+
## [0.10.1] - 2026-11-08
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
- Optional browser login for the live preview (`web_auth`), compatible with toucan and
|
|
130
|
+
mcp-combiner: one password, session cookies, and sign-in tickets on the URLs
|
|
131
|
+
`start_preview` hands out.
|
|
132
|
+
- `SVG_MCP_WEB_PASSWORD`: give the password raw and svg-mcp hashes it at startup.
|
|
133
|
+
- `svg-mcp hash-password` prints a hash for `web_auth.password_hash`.
|
|
134
|
+
|
|
135
|
+
## [0.10.0] - 2026-11-03
|
|
136
|
+
|
|
137
|
+
### Added
|
|
138
|
+
- Support for 2026-era stateless MCP sessions: `create_session` and `end_session`, with
|
|
139
|
+
the session owned by the connection that created it.
|
|
140
|
+
- `subscriptions/listen`, so document changes reach clients between tool calls.
|
|
141
|
+
|
|
142
|
+
### Changed
|
|
143
|
+
- Idle HTTP sessions now expire after 24 hours instead of never.
|
|
144
|
+
|
|
145
|
+
## [0.10.0-dev.2] - 2026-11-03
|
|
146
|
+
|
|
147
|
+
### Changed
|
|
148
|
+
- Session guidance in the server instructions for chats behind mcp-combiner.
|
|
149
|
+
|
|
150
|
+
## [0.10.0-dev.1] - 2026-11-02
|
|
151
|
+
|
|
152
|
+
### Added
|
|
153
|
+
- `subscriptions/listen` (2026 era).
|
|
154
|
+
|
|
155
|
+
## [0.10.0-dev.0] - 2026-11-02
|
|
156
|
+
|
|
157
|
+
### Added
|
|
158
|
+
- Minted session ids for 2026-era stateless clients.
|
|
159
|
+
|
|
160
|
+
### Changed
|
|
161
|
+
- Idle HTTP sessions expire after 24 hours.
|
|
162
|
+
|
|
163
|
+
## [0.9.0] - 2026-11-01
|
|
164
|
+
|
|
165
|
+
### Changed
|
|
166
|
+
- **Breaking:** requires fastmcp 4 and mcp 2 (`fastmcp>=4.1.5,<5`).
|
|
167
|
+
|
|
168
|
+
### Fixed
|
|
169
|
+
- Exports no longer try to fsync a directory on Windows.
|
|
170
|
+
|
|
171
|
+
[0.11.0]: https://github.com/georgeharker/svg-mcp/compare/v0.10.7...v0.11.0
|
|
172
|
+
[0.10.7]: https://github.com/georgeharker/svg-mcp/compare/v0.10.6...v0.10.7
|
|
173
|
+
[0.10.6]: https://github.com/georgeharker/svg-mcp/compare/v0.10.5...v0.10.6
|
|
174
|
+
[0.10.5]: https://github.com/georgeharker/svg-mcp/compare/v0.10.4...v0.10.5
|
|
175
|
+
[0.10.4]: https://github.com/georgeharker/svg-mcp/compare/v0.10.3...v0.10.4
|
|
176
|
+
[0.10.3]: https://github.com/georgeharker/svg-mcp/compare/v0.10.2...v0.10.3
|
|
177
|
+
[0.10.2]: https://github.com/georgeharker/svg-mcp/compare/v0.10.1...v0.10.2
|
|
178
|
+
[0.10.1]: https://github.com/georgeharker/svg-mcp/compare/v0.10.0...v0.10.1
|
|
179
|
+
[0.10.0]: https://github.com/georgeharker/svg-mcp/compare/v0.9.0...v0.10.0
|
|
180
|
+
[0.10.0-dev.2]: https://github.com/georgeharker/svg-mcp/compare/v0.10.0-dev.1...v0.10.0-dev.2
|
|
181
|
+
[0.10.0-dev.1]: https://github.com/georgeharker/svg-mcp/compare/v0.10.0-dev.0...v0.10.0-dev.1
|
|
182
|
+
[0.10.0-dev.0]: https://github.com/georgeharker/svg-mcp/compare/v0.9.0...v0.10.0-dev.0
|
|
183
|
+
[0.9.0]: https://github.com/georgeharker/svg-mcp/compare/v0.8.2...v0.9.0
|
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ so they apply across every client. Pi-extension toggles use `PI_SVG_MCP_*`.
|
|
|
58
58
|
| Variable | Default | Effect |
|
|
59
59
|
|----------|---------|--------|
|
|
60
60
|
| `SVG_MCP_PORT` | `7731` | HTTP port svg-mcp serves on. |
|
|
61
|
-
| `SVG_MCP_VERSION` | `0.
|
|
61
|
+
| `SVG_MCP_VERSION` | `0.11.0` | Pin the PyPI release (`uvx svg-mcp@<v>`). Kept in lockstep with this package's release by `scripts/bump-version.sh`. |
|
|
62
62
|
| `SVG_MCP_DEV` | — | Dev checkout for `uv run --project <dir>` (a path, or `1` for in-repo source). |
|
|
63
63
|
| `PI_SVG_MCP_NAME` | `svg-mcp` | `sharedserver` instance name. |
|
|
64
64
|
| `PI_SVG_MCP_GRACE` | `1h` | `sharedserver` grace period. |
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const SHAREDSERVER_MIN_VERSION = "0.6.7";
|
|
|
42
42
|
// scripts/bump-version.sh — a plugin shipped un-updated here served svg-mcp@0.2.6 for
|
|
43
43
|
// several releases. (Track the release this tag publishes; `latest` is not published
|
|
44
44
|
// to the pi extension store, so users on `@latest` can still miss releases.)
|
|
45
|
-
const SVG_MCP_TOOL_VERSION = "0.
|
|
45
|
+
const SVG_MCP_TOOL_VERSION = "0.11.0";
|
|
46
46
|
// ── the diagram-authoring directive ────────────────────────────────
|
|
47
47
|
// Appended to the system prompt so the agent reaches for svg-mcp's tools instead of
|
|
48
48
|
// hand-writing SVG XML. Canonical source: CLAUDE.md.example at the repo root; a
|
package/instructions.txt
CHANGED
|
@@ -13,9 +13,13 @@ topic you have to remember to think about. That's deliberate: you will not remem
|
|
|
13
13
|
|
|
14
14
|
`create_session` is on the tools: call it ONCE per drawing task, then pass its
|
|
15
15
|
`session_id` on EVERY svg-mcp call that follows (each tool's schema marks the argument).
|
|
16
|
-
Keep the id in the conversation — drawings persist under it
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
Keep the id in the conversation — drawings persist under it for the rest of the task.
|
|
17
|
+
A session_id-less call fails with this same guidance: that's the cue you skipped the
|
|
18
|
+
mint, not a bug to route around — run create_session, retry with the id.
|
|
19
|
+
The same goes for documents: there is no "current" one, so pass the `document_id` you got
|
|
20
|
+
from `create_document` on every call that acts on it, even when only one is open.
|
|
21
|
+
The calls shown below omit `session_id` and `document_id` for brevity; every real call
|
|
22
|
+
passes both.
|
|
19
23
|
|
|
20
24
|
### 1. About to write `<svg`, or hand-edit XML inside one? That's the cue.
|
|
21
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geohar/pi-svg-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Pi extension: run the svg-mcp MCP server via sharedserver and inject the diagram-authoring directive. Pairs with pi-mcp-adapter, which makes svg-mcp's tools reachable from Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,22 +9,24 @@
|
|
|
9
9
|
"extensions": [
|
|
10
10
|
"./src/index.ts"
|
|
11
11
|
],
|
|
12
|
-
"image": "https://cdn.jsdelivr.net/npm/@geohar/pi-svg-mcp/assets/preview.png"
|
|
12
|
+
"image": "https://cdn.jsdelivr.net/npm/@geohar/pi-svg-mcp/assets/preview.png",
|
|
13
|
+
"changelogPath": "./CHANGELOG.md"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"src",
|
|
16
17
|
"dist",
|
|
17
18
|
"instructions.txt",
|
|
19
|
+
"CHANGELOG.md",
|
|
18
20
|
"mcp.json.example",
|
|
19
21
|
"README.md",
|
|
20
22
|
"LICENSE",
|
|
21
23
|
"assets"
|
|
22
24
|
],
|
|
23
25
|
"scripts": {
|
|
24
|
-
"build": "tsc",
|
|
26
|
+
"build": "node ./node_modules/typescript/bin/tsc",
|
|
25
27
|
"clean": "rm -rf dist",
|
|
26
|
-
"typecheck": "tsc --noEmit",
|
|
27
|
-
"prepack": "node -e \"require('fs').copyFileSync('../../CLAUDE.md.example', './instructions.txt')\"",
|
|
28
|
+
"typecheck": "node ./node_modules/typescript/bin/tsc --noEmit",
|
|
29
|
+
"prepack": "node -e \"const fs = require('fs'); fs.copyFileSync('../../CLAUDE.md.example', './instructions.txt'); fs.copyFileSync('../../CHANGELOG.md', './CHANGELOG.md')\"",
|
|
28
30
|
"prepublishOnly": "npm run clean && npm run build"
|
|
29
31
|
},
|
|
30
32
|
"keywords": [
|
|
@@ -51,6 +53,7 @@
|
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"@types/node": "^22.0.0",
|
|
56
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
54
57
|
"typescript": "^5.6.0"
|
|
55
58
|
},
|
|
56
59
|
"engines": {
|
package/src/index.ts
CHANGED
|
@@ -51,7 +51,7 @@ const SHAREDSERVER_MIN_VERSION = "0.6.7"
|
|
|
51
51
|
// scripts/bump-version.sh — a plugin shipped un-updated here served svg-mcp@0.2.6 for
|
|
52
52
|
// several releases. (Track the release this tag publishes; `latest` is not published
|
|
53
53
|
// to the pi extension store, so users on `@latest` can still miss releases.)
|
|
54
|
-
const SVG_MCP_TOOL_VERSION = "0.
|
|
54
|
+
const SVG_MCP_TOOL_VERSION = "0.11.0"
|
|
55
55
|
|
|
56
56
|
type LogFn = (level: "info" | "warn" | "error", message: string) => void
|
|
57
57
|
|