tunnel_create
Create ephemeral secrets stored only in memory with optional auto-expiration and self-destruct mechanisms to prevent persistent storage of sensitive data.
Instructions
Create an ephemeral secret that exists only in memory (quantum tunneling). Never persisted to disk. Optional TTL and max-reads for self-destruction.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The secret value | |
| ttlSeconds | No | Auto-expire after N seconds | |
| maxReads | No | Self-destruct after N reads |
Implementation Reference
- src/core/tunnel.ts:53-70 (handler)The core implementation of the tunnel creation logic.
export function tunnelCreate( value: string, opts: TunnelOptions = {}, ): string { const id = `tun_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`; const now = Date.now(); tunnelStore.set(id, { value, createdAt: now, expiresAt: opts.ttlSeconds ? now + opts.ttlSeconds * 1000 : undefined, accessCount: 0, maxReads: opts.maxReads, }); ensureCleanup(); return id; } - src/mcp/server.ts:626-641 (registration)The registration of the 'tunnel_create' MCP tool in the server.
server.tool( "tunnel_create", "Create an ephemeral secret that exists only in memory (quantum tunneling). Never persisted to disk. Optional TTL and max-reads for self-destruction.", { value: z.string().describe("The secret value"), ttlSeconds: z.number().optional().describe("Auto-expire after N seconds"), maxReads: z.number().optional().describe("Self-destruct after N reads"), }, async (params) => { const id = tunnelCreate(params.value, { ttlSeconds: params.ttlSeconds, maxReads: params.maxReads, }); return text(id); }, );