list_interactsh_sessions
View cached interactsh sessions for security testing workflows. Enables monitoring of DNS/HTTP interactions captured during out-of-band testing with the MCP Interactsh Bridge server.
Instructions
Lists interactsh sessions cached in memory.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.js:333-340 (registration)Registers the 'list_interactsh_sessions' MCP tool with a simple handler that invokes service.listSessions() and wraps the result.server.registerTool( 'list_interactsh_sessions', { title: 'List sessions', description: 'Lists interactsh sessions cached in memory.', }, async () => result(service.listSessions()), );
- src/server.js:65-70 (handler)The core handler logic within InteractshService that lists all cached sessions by iterating over the sessions Map and converting each to JSON.listSessions() { const result = {}; for (const [key, session] of this.sessions.entries()) { result[key] = session.toJSON(); } return result;
- src/server.js:276-286 (helper)Helper function used by the tool handler to format the output with both text and structured content.function result(structured) { return { content: [ { type: 'text', text: JSON.stringify(structured, null, 2), }, ], structuredContent: structured, }; }
- src/server.js:10-29 (helper)InteractshSession class providing toJSON() method used by listSessions() to serialize session data.export class InteractshSession { constructor({ correlationId, secretKey, privateKey, publicKeyB64, callbackDomain, serverUrl }) { this.correlationId = correlationId; this.secretKey = secretKey; this.privateKey = privateKey; this.publicKeyB64 = publicKeyB64; this.callbackDomain = callbackDomain; this.serverUrl = serverUrl; } toJSON() { return { correlation_id: this.correlationId, secret_key: this.secretKey, private_key_pem: this.privateKey.export({ type: 'pkcs8', format: 'pem' }), callback_domain: this.callbackDomain, server_url: this.serverUrl, }; } }