@reworkdigital.io/rework-proof-mcp 1.3.2 → 1.4.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/README.md +1 -0
- package/package.json +1 -1
- package/src/index.js +46 -0
- package/src/mcp-spec.json +98 -3
package/README.md
CHANGED
|
@@ -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.4.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",
|
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);
|
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": {
|