
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@deshartman/mcp-status-callback
Advanced tools
A utility for handling API callbacks via Ngrok tunnels. Especially useful for MCP status callbacks.
A utility for handling API callbacks via Ngrok tunnels. Especially useful for MCP (Model Context Protocol) status callbacks.
This module creates a local Express server and establishes an Ngrok tunnel to it, allowing external services to send callbacks to your local development environment.
npm install mcp-status-callback
import { CallbackHandler } from 'mcp-status-callback';
// Create a new instance
const callbackHandler = new CallbackHandler({ port: 4000 });
// Set up event listeners
callbackHandler.on('log', (data) => {
console.log(`${data.level}: ${data.message}`);
});
callbackHandler.on('callback', (data) => {
console.log('Received callback:', data.message);
// Process the callback data here
});
callbackHandler.on('tunnelStatus', (data) => {
if (data.level === 'error') {
console.error('Tunnel error:', data.message);
} else {
console.log('Callback URL:', data.message);
// Use this URL in your API requests
}
});
// Start the server with your Ngrok auth token
const ngrokAuthToken = 'your-ngrok-auth-token';
callbackHandler.start(ngrokAuthToken);
// Optional: Use a custom domain (requires Ngrok paid plan)
// callbackHandler.start(ngrokAuthToken, 'your-custom-domain.ngrok.io');
// When you're done, stop the server
// await callbackHandler.stop();
import { CallbackHandler, CallbackEventData } from 'mcp-status-callback';
const callbackHandler = new CallbackHandler({ port: 4000 });
callbackHandler.on('callback', (data: CallbackEventData) => {
const payload = data.message;
// Process the strongly-typed payload
});
// Start the server
callbackHandler.start('your-ngrok-auth-token');
CallbackHandler
The main class for handling callbacks.
new CallbackHandler(options?: CallbackHandlerOptions)
options.port
(optional): The port to run the Express server on (default: 4000)start(ngrokAuthToken: string, customDomain?: string): void
- Starts the callback server and establishes an Ngrok tunnelgetPublicUrl(): string | null
- Returns the public Ngrok URL if availablestop(): Promise<void>
- Stops the callback server and closes the Ngrok tunnel'log'
- Emitted for general log messages
level
: 'info' | 'warn' | 'error'message
: string | Error'callback'
- Emitted when a callback is received
level
: 'info'message
: any (the callback payload)'tunnelStatus'
- Emitted when the tunnel status changes
level
: 'info' | 'error'message
: string | ErrorThis utility is particularly useful for MCP (Model Context Protocol) servers that need to receive callbacks from external services.
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { CallbackHandler } from 'mcp-status-callback';
// Set up the callback handler
const callbackHandler = new CallbackHandler();
let callbackUrl = '';
callbackHandler.on('tunnelStatus', (data) => {
if (data.level === 'info') {
callbackUrl = data.message;
console.log(`Callback URL ready: ${callbackUrl}`);
}
});
// Start the callback handler
callbackHandler.start('your-ngrok-auth-token');
// Use the callback URL in your MCP server tools
// ...
MIT
FAQs
A utility for handling API callbacks via Ngrok tunnels. Especially useful for MCP status callbacks.
The npm package @deshartman/mcp-status-callback receives a total of 5 weekly downloads. As such, @deshartman/mcp-status-callback popularity was classified as not popular.
We found that @deshartman/mcp-status-callback demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.