@signet-auth/mcp-tools 0.4.5 → 0.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/dist/server.js CHANGED
@@ -2,10 +2,8 @@
2
2
  /**
3
3
  * @signet-auth/mcp-tools — Standalone MCP server exposing Signet crypto tools.
4
4
  *
5
- * Security note: signet_sign requires a secret key as input. This is inherent
6
- * to the signing operation. In production, use SIGNET_SECRET_KEY env var instead
7
- * of passing keys through tool arguments. The generate_keypair tool only returns
8
- * the public key — secret keys should be managed via the Signet CLI keystore.
5
+ * signet_sign reads the secret key from the SIGNET_SECRET_KEY environment
6
+ * variable. Keys are never accepted as tool arguments.
9
7
  */
10
8
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
11
9
  import { createSignetToolsServer } from './tools.js';
package/dist/tools.js CHANGED
@@ -8,49 +8,48 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
8
8
  import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
9
9
  import { generateKeypair, sign, verifyAny, contentHash, } from '@signet-auth/core';
10
10
  export function createSignetToolsServer() {
11
- const server = new Server({ name: 'signet-mcp-tools', version: '0.4.0' }, { capabilities: { tools: {} } });
11
+ const server = new Server({ name: 'signet-mcp-tools', version: '0.5.0' }, { capabilities: { tools: {} } });
12
12
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
13
13
  tools: [
14
14
  {
15
15
  name: 'signet_generate_keypair',
16
- description: 'Generate a new Ed25519 keypair. Returns only the public key. Use Signet CLI to manage secret keys securely.',
16
+ description: 'Create a fresh Ed25519 identity for demos, tests, or agent bootstrapping. Returns JSON with {public_key, note}. The secret key is intentionally not returned by this MCP tool, so use Signet CLI or your own secure key storage for long-lived identities.',
17
17
  inputSchema: { type: 'object', properties: {} },
18
18
  },
19
19
  {
20
20
  name: 'signet_sign',
21
- description: 'Sign an action (tool call) with an Ed25519 key, producing a cryptographic receipt. Uses SIGNET_SECRET_KEY env var if set, otherwise requires secret_key argument.',
21
+ description: 'Create a Signet receipt for a tool call before execution. The secret key is read from the SIGNET_SECRET_KEY environment variable (never passed as an argument). Returns the full signed receipt JSON.',
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
25
- secret_key: { type: 'string', description: 'Base64 secret key (optional if SIGNET_SECRET_KEY env is set)' },
26
- tool: { type: 'string', description: 'Tool name being called' },
27
- params: { description: 'Tool parameters (any JSON value)' },
28
- signer_name: { type: 'string', description: 'Agent name' },
29
- signer_owner: { type: 'string', description: 'Agent owner (optional)' },
30
- target: { type: 'string', description: 'Target MCP server URI' },
25
+ tool: { type: 'string', description: 'Name of the tool or action being attested, for example github_create_issue or file_write.' },
26
+ params: { description: 'Exact JSON arguments to bind into the receipt. Changing this JSON later will change the params hash and invalidate verification expectations.' },
27
+ signer_name: { type: 'string', description: 'Stable signer or agent name that will appear in the receipt, such as ci-agent or research-bot.' },
28
+ signer_owner: { type: 'string', description: 'Optional human, team, or org that owns the signer identity.' },
29
+ target: { type: 'string', description: 'Optional target URI for the system where the action will run, such as mcp://github.local.' },
31
30
  },
32
31
  required: ['tool', 'signer_name'],
33
32
  },
34
33
  },
35
34
  {
36
35
  name: 'signet_verify',
37
- description: 'Verify a Signet receipt signature. Returns {valid: true/false}. Accepts both bare base64 and ed25519:-prefixed public keys.',
36
+ description: 'Verify that a receipt was signed by the expected public key. Use this to validate receipts from agents, logs, tests, or exchanged MCP metadata. Returns JSON {valid: boolean}. This checks signature validity against the supplied key; it does not enforce freshness, authorization, or policy decisions.',
38
37
  inputSchema: {
39
38
  type: 'object',
40
39
  properties: {
41
- receipt_json: { type: 'string', description: 'Receipt JSON string' },
42
- public_key: { type: 'string', description: 'Public key (base64 or ed25519:base64)' },
40
+ receipt_json: { type: 'string', description: 'Serialized receipt JSON to verify. This should be the full receipt object as a string.' },
41
+ public_key: { type: 'string', description: 'Expected signer public key, either bare base64 or ed25519:base64.' },
43
42
  },
44
43
  required: ['receipt_json', 'public_key'],
45
44
  },
46
45
  },
47
46
  {
48
47
  name: 'signet_content_hash',
49
- description: 'Compute SHA-256 hash of canonical JSON (RFC 8785 JCS). Accepts any JSON value.',
48
+ description: 'Compute a deterministic SHA-256 hash over canonical JSON using RFC 8785 JCS. Use this when you need a stable digest for receipt params, audit records, or comparing semantically identical JSON with different formatting or key order. Returns JSON {hash: string}.',
50
49
  inputSchema: {
51
50
  type: 'object',
52
51
  properties: {
53
- content: { description: 'JSON content to hash (object, array, string, number, boolean, or null)' },
52
+ content: { description: 'Any JSON value to hash: object, array, string, number, boolean, or null.' },
54
53
  },
55
54
  required: ['content'],
56
55
  },
@@ -65,14 +64,14 @@ export function createSignetToolsServer() {
65
64
  const kp = generateKeypair();
66
65
  // Only return public key — secret key management via CLI/env
67
66
  return {
68
- content: [{ type: 'text', text: JSON.stringify({ public_key: kp.publicKey, note: 'Secret key generated but not returned. Use Signet CLI for key management.' }) }],
67
+ content: [{ type: 'text', text: JSON.stringify({ public_key: kp.publicKey, note: 'This is an ephemeral keypair for demos/tests. The secret key was not returned for security. For persistent identities, use: signet identity generate --name <name>' }) }],
69
68
  };
70
69
  }
71
70
  case 'signet_sign': {
72
- const secretKey = args?.secret_key ?? process.env.SIGNET_SECRET_KEY;
71
+ const secretKey = process.env.SIGNET_SECRET_KEY;
73
72
  if (!secretKey) {
74
73
  return {
75
- content: [{ type: 'text', text: 'Error: no secret key. Set SIGNET_SECRET_KEY env var or pass secret_key argument.' }],
74
+ content: [{ type: 'text', text: 'Error: SIGNET_SECRET_KEY environment variable is not set. Set it before starting the server.' }],
76
75
  isError: true,
77
76
  };
78
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signet-auth/mcp-tools",
3
- "version": "0.4.5",
3
+ "version": "0.5.0",
4
4
  "description": "Standalone MCP server exposing Signet signing, verification, and content hash tools",
5
5
  "keywords": [
6
6
  "mcp",
@@ -20,12 +20,16 @@
20
20
  "url": "git+https://github.com/Prismer-AI/signet.git",
21
21
  "directory": "packages/signet-mcp-tools"
22
22
  },
23
- "mcpName": "io.github.Prismer-AI/signet-mcp-tools",
23
+ "mcpName": "io.github.prismer-ai/signet-mcp-tools",
24
24
  "type": "module",
25
25
  "bin": {
26
26
  "signet-mcp-tools": "dist/server.js"
27
27
  },
28
- "files": ["dist/"],
28
+ "files": [
29
+ "dist/",
30
+ "server.json",
31
+ "README.md"
32
+ ],
29
33
  "scripts": {
30
34
  "build": "npx tsc",
31
35
  "test": "npx tsc -p tsconfig.test.json && node --test dist-test/tests/tools.test.js",
@@ -36,7 +40,7 @@
36
40
  },
37
41
  "dependencies": {
38
42
  "@modelcontextprotocol/sdk": "^1.10.0",
39
- "@signet-auth/core": "^0.4.5"
43
+ "@signet-auth/core": "^0.5.0"
40
44
  },
41
45
  "devDependencies": {
42
46
  "@types/node": "^22",
package/server.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
3
+ "name": "io.github.prismer-ai/signet-mcp-tools",
4
+ "title": "Signet MCP Tools",
5
+ "description": "MCP server exposing Signet cryptographic signing, verification, and content hash tools over stdio.",
6
+ "version": "0.5.0",
7
+ "repository": {
8
+ "url": "https://github.com/Prismer-AI/signet",
9
+ "source": "github"
10
+ },
11
+ "packages": [
12
+ {
13
+ "registryType": "npm",
14
+ "identifier": "@signet-auth/mcp-tools",
15
+ "version": "0.5.0",
16
+ "transport": {
17
+ "type": "stdio"
18
+ }
19
+ }
20
+ ]
21
+ }