@reworkdigital.io/rework-proof-mcp 1.3.2 → 1.5.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 +33 -0
- package/README.md +2 -1
- package/package.json +2 -1
- package/src/index.js +55 -6
- package/src/mcp-spec.json +98 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Changes to `@reworkdigital.io/rework-proof-mcp`. The source syncs to GitHub on
|
|
4
|
+
every merge; npm only gets a change when a new version is published, so
|
|
5
|
+
anything under **Unreleased** is on GitHub and not yet on npm.
|
|
6
|
+
|
|
7
|
+
When you publish, move the Unreleased entries under the new version and date,
|
|
8
|
+
and bump `version` in both `package.json` and `server.json` (npm never
|
|
9
|
+
republishes a version).
|
|
10
|
+
|
|
11
|
+
## Unreleased
|
|
12
|
+
|
|
13
|
+
Nothing yet.
|
|
14
|
+
|
|
15
|
+
## 1.5.0
|
|
16
|
+
|
|
17
|
+
- **README:** the hosted-server section said "the same four tools". There are
|
|
18
|
+
five since 1.4.0 added `check_rework_certificate`, so it now says "the same
|
|
19
|
+
tools", with no number to go stale.
|
|
20
|
+
- **Package:** this changelog ships in the package from this version on.
|
|
21
|
+
- **Unknown tool:** in the 2026-07-28 protocol revision, a call for a tool this
|
|
22
|
+
server does not have is now answered as a tool result (`isError: true`) that
|
|
23
|
+
names the tools that exist, as the older revisions always did. It was a
|
|
24
|
+
JSON-RPC error (-32602), which gives a model nothing to correct itself with.
|
|
25
|
+
The message now lists the tools in every revision.
|
|
26
|
+
|
|
27
|
+
## 1.4.0
|
|
28
|
+
|
|
29
|
+
- Added `check_rework_certificate`: check a certificate from its ID or its
|
|
30
|
+
link.
|
|
31
|
+
|
|
32
|
+
Versions before this changelog was started are described in the repository's
|
|
33
|
+
commit history, not here; the 1.4.0 entry above is not a complete list.
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ No API key. No account. Every tool here reads public endpoints.
|
|
|
24
24
|
|
|
25
25
|
### Or use the hosted server
|
|
26
26
|
|
|
27
|
-
The same
|
|
27
|
+
The same tools are served at a URL, for clients that take a remote
|
|
28
28
|
server (Claude's connectors, for one) and for anyone who would rather not
|
|
29
29
|
install anything:
|
|
30
30
|
|
|
@@ -70,6 +70,7 @@ run them without asking each time.
|
|
|
70
70
|
| `get_rework_issuer_keys` | Fetches REWORK's public JWKS so you can verify offline yourself instead of trusting this server. |
|
|
71
71
|
| `explain_rework_assurance` | Explains what an assurance level proves and what it explicitly does not. |
|
|
72
72
|
| `lookup_rework_attestation` | Checks whether REWORK actually *issued* a credential — a forged-but-well-formed token fails this — and returns the current OpenTimestamps receipt, which may have been upgraded to a Bitcoin confirmation since issue. The credential is hashed locally; it never leaves your machine. |
|
|
73
|
+
| `check_rework_certificate` | Checks a certificate from its ID or its link, which is what people usually share: whether REWORK holds it, whether it is active or revoked, and what its public page shows. Only the ID or link is sent, and it is already public. |
|
|
73
74
|
|
|
74
75
|
### Why the verdict ships with a caveat
|
|
75
76
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reworkdigital.io/rework-proof-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"mcpName": "io.github.reworkio/rework-proof",
|
|
5
5
|
"description": "MCP server for verifying REWORK credentials — check whether delivered work is genuinely the author's.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"src",
|
|
14
14
|
"README.md",
|
|
15
|
+
"CHANGELOG.md",
|
|
15
16
|
"LICENSE"
|
|
16
17
|
],
|
|
17
18
|
"engines": {
|
package/src/index.js
CHANGED
|
@@ -174,7 +174,53 @@ async function certificateRecord(id) {
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
/**
|
|
178
|
+
* The tool's answer from REWORK's record of a certificate, with the note that
|
|
179
|
+
* fits it. The hosted server builds the same answer from the same record
|
|
180
|
+
* (certificate_answer in its Python); a test compares the two.
|
|
181
|
+
*/
|
|
182
|
+
function certificateAnswer(record) {
|
|
183
|
+
const r = record && typeof record === 'object' ? record : {};
|
|
184
|
+
const flag = (v) => (typeof v === 'boolean' ? v : null);
|
|
185
|
+
const text = (v) => (typeof v === 'string' ? v : null);
|
|
186
|
+
const out = {
|
|
187
|
+
found: flag(r.found),
|
|
188
|
+
active: flag(r.active),
|
|
189
|
+
revoked: flag(r.revoked),
|
|
190
|
+
certificate_id: text(r.certificate_id),
|
|
191
|
+
status: text(r.status),
|
|
192
|
+
verify_url: text(r.verify_url),
|
|
193
|
+
};
|
|
194
|
+
if (out.found === true && out.active === true && r.certificate && typeof r.certificate === 'object' && !Array.isArray(r.certificate)) {
|
|
195
|
+
out.certificate = r.certificate;
|
|
196
|
+
}
|
|
197
|
+
let note;
|
|
198
|
+
if (out.found === null) note = SPEC.notes.certificate_unreadable;
|
|
199
|
+
else if (out.found === false) note = SPEC.notes.certificate_not_found;
|
|
200
|
+
else if (out.revoked === true) note = SPEC.notes.certificate_revoked;
|
|
201
|
+
else if (out.active === true) note = SPEC.notes.certificate_active;
|
|
202
|
+
else note = SPEC.notes.certificate_inactive;
|
|
203
|
+
out.assurance_note = note;
|
|
204
|
+
return out;
|
|
205
|
+
}
|
|
206
|
+
|
|
177
207
|
async function callTool(name, args) {
|
|
208
|
+
if (name === 'check_rework_certificate') {
|
|
209
|
+
const ref = typeof (args && args.certificate) === 'string' ? args.certificate.trim() : '';
|
|
210
|
+
if (!ref) throw new Error(SPEC.errors.certificate_required);
|
|
211
|
+
// REWORK reads the certificate the ID or link names; only that text is
|
|
212
|
+
// sent, and it is already public on the certificate's own page.
|
|
213
|
+
let record;
|
|
214
|
+
try {
|
|
215
|
+
record = await http(`/proofs/certificates/check?ref=${encodeURIComponent(ref)}`);
|
|
216
|
+
} catch (err) {
|
|
217
|
+
if (/REWORK API (400|422)\b/.test(String(err.message))) throw new Error(SPEC.errors.certificate_unrecognised);
|
|
218
|
+
log(`certificate check failed: ${err.message}`);
|
|
219
|
+
record = {};
|
|
220
|
+
}
|
|
221
|
+
return certificateAnswer(record);
|
|
222
|
+
}
|
|
223
|
+
|
|
178
224
|
if (name === 'verify_rework_credential') {
|
|
179
225
|
const credential = (args && args.credential) || '';
|
|
180
226
|
if (!credential.trim()) throw new Error(SPEC.errors.credential_required);
|
|
@@ -280,7 +326,7 @@ async function callTool(name, args) {
|
|
|
280
326
|
}
|
|
281
327
|
}
|
|
282
328
|
|
|
283
|
-
throw new Error(`unknown tool: ${name}`);
|
|
329
|
+
throw new Error(`unknown tool: ${name}. This server has: ${[...TOOL_NAMES].sort().join(', ')}`);
|
|
284
330
|
}
|
|
285
331
|
|
|
286
332
|
// ── JSON-RPC plumbing ──────────────────────────────────────────────────────
|
|
@@ -331,11 +377,14 @@ async function handleStateless(msg, meta) {
|
|
|
331
377
|
if (method === 'tools/call') {
|
|
332
378
|
const name = params && params.name;
|
|
333
379
|
const args = params && params.arguments;
|
|
334
|
-
//
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
|
|
338
|
-
|
|
380
|
+
// A tool this server does not have is answered as a result the model can
|
|
381
|
+
// read, naming the tools that exist (callTool throws it), as the
|
|
382
|
+
// handshake era always has. It used to be a protocol error here, which
|
|
383
|
+
// gives the model nothing to act on. Arguments that are not an object
|
|
384
|
+
// stay a protocol error: there is no tool to hand them to. What is wrong
|
|
385
|
+
// inside the arguments is the tool's to report.
|
|
386
|
+
const known = typeof name === 'string' && TOOL_NAMES.has(name);
|
|
387
|
+
if (known && args !== undefined && args !== null && (typeof args !== 'object' || Array.isArray(args))) {
|
|
339
388
|
return failure(id, -32602, 'Invalid params: arguments must be an object');
|
|
340
389
|
}
|
|
341
390
|
try {
|
package/src/mcp-spec.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"server": {
|
|
4
4
|
"name": "rework-proof",
|
|
5
5
|
"title": "REWORK Proof",
|
|
6
|
-
"description": "Check whether delivered work is genuinely the author's: verify a REWORK credential, see whether it was revoked or ever issued, and read what it does and does not prove.",
|
|
6
|
+
"description": "Check whether delivered work is genuinely the author's: verify a REWORK credential or certificate, see whether it was revoked or ever issued, and read what it does and does not prove.",
|
|
7
7
|
"instructions": "Read `assurance_note` with every result: it states the ceiling on what the result proves. A valid signature is not a review of the work."
|
|
8
8
|
},
|
|
9
9
|
"protocols": {
|
|
@@ -276,6 +276,94 @@
|
|
|
276
276
|
"idempotentHint": true,
|
|
277
277
|
"openWorldHint": true
|
|
278
278
|
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "check_rework_certificate",
|
|
282
|
+
"title": "Check a REWORK certificate by ID or link",
|
|
283
|
+
"description": "Check a REWORK certificate from its ID or its link, which is what people usually share: whether REWORK holds it, whether it is active or revoked, and what its public page shows (holder, title, issue date, verified proofs and skills, and a verified result when there is one). Use this when you are given a certificate ID (such as RW-CERT-...) or a link to /verify/... or /certificates/share/....",
|
|
284
|
+
"annotations": {
|
|
285
|
+
"title": "Check a REWORK certificate by ID or link",
|
|
286
|
+
"readOnlyHint": true,
|
|
287
|
+
"destructiveHint": false,
|
|
288
|
+
"idempotentHint": true,
|
|
289
|
+
"openWorldHint": true
|
|
290
|
+
},
|
|
291
|
+
"inputSchema": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"certificate": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "A certificate ID, or a link to a REWORK certificate page (/verify/<id> or /certificates/share/<token>)."
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"required": [
|
|
300
|
+
"certificate"
|
|
301
|
+
],
|
|
302
|
+
"additionalProperties": false
|
|
303
|
+
},
|
|
304
|
+
"outputSchema": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"found": {
|
|
308
|
+
"type": [
|
|
309
|
+
"boolean",
|
|
310
|
+
"null"
|
|
311
|
+
],
|
|
312
|
+
"description": "Whether REWORK holds a certificate under this ID or link. Null when the records could not be read just now."
|
|
313
|
+
},
|
|
314
|
+
"active": {
|
|
315
|
+
"type": [
|
|
316
|
+
"boolean",
|
|
317
|
+
"null"
|
|
318
|
+
],
|
|
319
|
+
"description": "Whether the certificate is active. Null when unknown."
|
|
320
|
+
},
|
|
321
|
+
"revoked": {
|
|
322
|
+
"type": [
|
|
323
|
+
"boolean",
|
|
324
|
+
"null"
|
|
325
|
+
],
|
|
326
|
+
"description": "Whether REWORK revoked it. Null when unknown."
|
|
327
|
+
},
|
|
328
|
+
"certificate_id": {
|
|
329
|
+
"type": [
|
|
330
|
+
"string",
|
|
331
|
+
"null"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"status": {
|
|
335
|
+
"type": [
|
|
336
|
+
"string",
|
|
337
|
+
"null"
|
|
338
|
+
],
|
|
339
|
+
"description": "The certificate's status as REWORK records it."
|
|
340
|
+
},
|
|
341
|
+
"verify_url": {
|
|
342
|
+
"type": [
|
|
343
|
+
"string",
|
|
344
|
+
"null"
|
|
345
|
+
],
|
|
346
|
+
"description": "The certificate's public page."
|
|
347
|
+
},
|
|
348
|
+
"certificate": {
|
|
349
|
+
"type": "object",
|
|
350
|
+
"description": "What the public page shows, for an active certificate only: holder, title, issued_at, verified_proofs, verified_skills, and verified_result when there is one."
|
|
351
|
+
},
|
|
352
|
+
"assurance_note": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "The ceiling on what this result proves. Read it before relying on the result."
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": [
|
|
358
|
+
"found",
|
|
359
|
+
"active",
|
|
360
|
+
"revoked",
|
|
361
|
+
"certificate_id",
|
|
362
|
+
"status",
|
|
363
|
+
"verify_url",
|
|
364
|
+
"assurance_note"
|
|
365
|
+
]
|
|
366
|
+
}
|
|
279
367
|
}
|
|
280
368
|
],
|
|
281
369
|
"credential_types": {
|
|
@@ -301,11 +389,18 @@
|
|
|
301
389
|
"no_assurance_level": "This type of credential carries no assurance level. A valid signature shows REWORK issued it and that it has not been altered; it is not a review of how good the work is.",
|
|
302
390
|
"registry_not_kept": "REWORK keeps no per-digest record for this type of credential: it is signed afresh each time it is downloaded, so no two copies share a digest, and this lookup can neither confirm nor deny it. That is not a sign of forgery. Check its signature with verify_rework_credential; what the credential says about itself here is unverified until then.",
|
|
303
391
|
"registry_newest_only": "REWORK keeps a record of only the newest repository-control challenge for each person and repository: starting the ceremony again replaces it. An older challenge missing here is not a sign of forgery. Check its signature and expiry with verify_rework_credential; what the credential says about itself here is unverified until then.",
|
|
304
|
-
"claim_not_current": "REWORK issued this challenge, but the claim it belongs to is now {status}: it does not show control of the repository today."
|
|
392
|
+
"claim_not_current": "REWORK issued this challenge, but the claim it belongs to is now {status}: it does not show control of the repository today.",
|
|
393
|
+
"certificate_active": "This is REWORK's current record of the certificate, as its public page shows it: a reviewer verified the work it lists. It is not a review of how good the work is, and a certificate can be revoked later, so check again before relying on it.",
|
|
394
|
+
"certificate_revoked": "REWORK revoked this certificate. Do not rely on it, or on any credential issued for it.",
|
|
395
|
+
"certificate_inactive": "REWORK holds this certificate, but it is not active, so its public page does not show it. Do not rely on it as it stands.",
|
|
396
|
+
"certificate_not_found": "REWORK holds no certificate under that ID or link. Check it was copied in full: this lookup cannot tell a mistyped ID from one that never existed.",
|
|
397
|
+
"certificate_unreadable": "REWORK's records could not be read just now, so nothing is known about this certificate either way. Try again shortly."
|
|
305
398
|
},
|
|
306
399
|
"errors": {
|
|
307
400
|
"credential_required": "credential is required: pass the compact VC-JWT (three base64url segments separated by dots)",
|
|
308
|
-
"digest_required": "pass either `credential` (the VC-JWT) or `digest` (64 hex chars)"
|
|
401
|
+
"digest_required": "pass either `credential` (the VC-JWT) or `digest` (64 hex chars)",
|
|
402
|
+
"certificate_required": "certificate is required: pass a certificate ID (such as RW-CERT-...) or a link to a REWORK certificate page",
|
|
403
|
+
"certificate_unrecognised": "That is not a certificate ID or a REWORK certificate link. Pass the ID printed on the certificate, or its link (/verify/<id> or /certificates/share/<token>)."
|
|
309
404
|
},
|
|
310
405
|
"site": "https://reworkio.com",
|
|
311
406
|
"registry": {
|