ccs-mcp-server 1.2.13 → 1.2.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +71 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccs-mcp-server",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "CCS Runtime Evidence MCP Server — 7-dimension runtime verification for AI agent tool calls. Ed25519 receipts, sub-ms OOP, zero deps. For Claude Desktop, Cursor, Windsurf.",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -431,10 +431,31 @@ function verifyIntentBinding(intent, toolName, toolArgs, now = Date.now()) {
431
431
  const PROTOCOL_VERSION = "2024-11-05";
432
432
  const SERVER_INFO = { name: "ccs-runtime-evidence", version: CCS_VERSION, title: "CCS Runtime Evidence" };
433
433
 
434
+ // MCP tool annotations (spec 2024-11-05+). Hints describe the tool's real
435
+ // runtime behaviour so clients/registries can drive consent, UI gating and
436
+ // safety review. All five tools are local, pure verification/analysis
437
+ // operations: no network calls, no writes to caller-owned resources. The
438
+ // only filesystem activity in this process is one-time Ed25519 keypair
439
+ // provisioning under ~/.ccs at first sign (never overwrites existing keys),
440
+ // which is local bootstrap plumbing, not a tool effect on external state.
434
441
  const TOOLS = [
435
442
  {
436
443
  name: "verify_tool_call",
444
+ title: "Verify tool call (CCS 7-dimension)",
437
445
  description: "Verify an AI agent tool call against CCS 7 dimensions (Structure, Schema, Security, Identity, Integrity, Latency, Cost) plus semantic attack-chain analysis and math overflow detection. Returns verdict (allowed/denied) with detailed findings. DEFAULT MODE BLOCKS UNSAFE CALLS.",
446
+ // readOnly: pure local computation (regex/structural checks, hashing,
447
+ // Ed25519 signing of a returned object); mutates no external state.
448
+ // destructive: never deletes/overwrites anything.
449
+ // idempotent: verdict/dimensions are deterministic for given input+policy;
450
+ // safe to retry (only receipt id/timestamp differ, no side effects).
451
+ // openWorld: fully offline; stdio-local crypto, no network or external
452
+ // entities are contacted.
453
+ annotations: {
454
+ readOnlyHint: true,
455
+ destructiveHint: false,
456
+ idempotentHint: true,
457
+ openWorldHint: false,
458
+ },
438
459
  inputSchema: {
439
460
  type: "object",
440
461
  properties: {
@@ -450,7 +471,22 @@ const TOOLS = [
450
471
  },
451
472
  {
452
473
  name: "issue_evidence",
474
+ title: "Issue signed CCS evidence receipt",
453
475
  description: "Issue a CCS evidence record for a tool call. Evidence is cryptographically bound (content_hash + evidence_hash), tamper-evident, independently verifiable. Issued for allowed AND denied calls.",
476
+ // readOnly: false — first call provisions a new Ed25519 keypair under
477
+ // ~/.ccs (persistent state write), which modifies the local environment;
478
+ // we mark this conservatively even though the write is one-time.
479
+ // destructive: false — keypair bootstrap never overwrites or deletes
480
+ // existing state; receipts are returned, never appended to a store.
481
+ // idempotent: false — each issuance carries a fresh receipt id and
482
+ // issued_at timestamp, so repeated calls produce distinct records.
483
+ // openWorld: false — offline signing, no network access.
484
+ annotations: {
485
+ readOnlyHint: false,
486
+ destructiveHint: false,
487
+ idempotentHint: false,
488
+ openWorldHint: false,
489
+ },
454
490
  inputSchema: {
455
491
  type: "object",
456
492
  properties: {
@@ -465,7 +501,19 @@ const TOOLS = [
465
501
  },
466
502
  {
467
503
  name: "audit_mcp_config",
504
+ title: "Audit MCP configuration for security risks",
468
505
  description: "Audit an MCP client/server configuration JSON for security risks: plain HTTP, weak secrets, disabled TLS, missing commands. Returns structured issues with severity.",
506
+ // readOnly: purely static analysis of the passed-in config object;
507
+ // nothing is executed, connected to, or written.
508
+ // destructive: false. idempotent: same config -> identical report.
509
+ // openWorld: the server never fetches the configured URLs; it inspects
510
+ // the JSON text offline, so it is closed-world.
511
+ annotations: {
512
+ readOnlyHint: true,
513
+ destructiveHint: false,
514
+ idempotentHint: true,
515
+ openWorldHint: false,
516
+ },
469
517
  inputSchema: {
470
518
  type: "object",
471
519
  properties: {
@@ -476,7 +524,18 @@ const TOOLS = [
476
524
  },
477
525
  {
478
526
  name: "verify_intent_binding",
527
+ title: "Verify intent-to-arguments binding (L4)",
479
528
  description: "Verify that actual tool call arguments match a declared intent with zero tolerance. Catches cross-model parameter drift (planner says amount=100, executor writes amount=10000). No LLM needed — pure deterministic comparison. Supports exact match, numeric tolerance, and regex pattern binding modes.",
529
+ // readOnly: deterministic field-by-field comparison + hashing + signing;
530
+ // returns the binding verdict without touching any resource.
531
+ // destructive: false. idempotent: deterministic verdict, safe to retry.
532
+ // openWorld: fully offline local crypto and comparison.
533
+ annotations: {
534
+ readOnlyHint: true,
535
+ destructiveHint: false,
536
+ idempotentHint: true,
537
+ openWorldHint: false,
538
+ },
480
539
  inputSchema: {
481
540
  type: "object",
482
541
  properties: {
@@ -514,7 +573,19 @@ const TOOLS = [
514
573
  },
515
574
  {
516
575
  name: "verify_receipt",
576
+ title: "Offline-verify a CCS signed receipt",
517
577
  description: "Offline-verify a CCS Ed25519-signed receipt. Auditors call this with a receipt JSON produced by issue_evidence or verify_intent_binding; it checks the signature against the embedded signer_public_key and reports whether the body was tampered with. Optionally pin an expected signer public key (PEM string or sha256: fingerprint) to reject receipts from untrusted signers.",
578
+ // readOnly: cryptographic verification only (crypto.verify on in-memory
579
+ // data); no state change.
580
+ // destructive: false. idempotent: same receipt/pin -> same verdict.
581
+ // openWorld: explicitly offline verification; trusts only the embedded
582
+ // public key (or a caller-pinned key), fetches nothing.
583
+ annotations: {
584
+ readOnlyHint: true,
585
+ destructiveHint: false,
586
+ idempotentHint: true,
587
+ openWorldHint: false,
588
+ },
518
589
  inputSchema: {
519
590
  type: "object",
520
591
  properties: {