Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

generate_demo_key

Create test ECDSA key pairs for commerce flow trials. Provides public key hex for cart creation without requiring real wallet integration.

Instructions

Generate a demo ECDSA key pair for testing. Returns a public key hex that can be used with create_cart and other tools. Useful for trying out the commerce flow without a real wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'generate_demo_key' uses the built-in 'crypto' library to generate a random 65-byte uncompressed ECDSA public key, which is returned in the response as hex.
    case 'generate_demo_key': {
        const crypto = await import('crypto');
        // Generate a random 65-byte uncompressed ECDSA public key (04 prefix + 64 random bytes)
        const randomBytes = crypto.randomBytes(64);
        const publicKeyHex = '04' + randomBytes.toString('hex'); // 130 hex chars = 65 bytes uncompressed ECDSA
        return {
            content: [{
                type: 'text',
                text: JSON.stringify({
                    publicKey: publicKeyHex,
                    keyType: 'ECDSA (uncompressed, 65 bytes)',
                    note: 'This is a demo key for testing. Use it with create_cart to start shopping. For production, connect your MetaMask wallet or Dah.mx app at w3ship.com/setup-mcp to get your real key.',
                    usage: 'Call create_cart — the key will be used automatically, or pass it as the id parameter.',
                }, null, 2)
            }]
        };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baskcart/w3ship-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server