Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

ship_address

Retrieve a physical shipping address by verifying a cryptographic signature linked to a public key identity, enabling anonymous address lookup for order fulfillment.

Instructions

Securely retrieve a physical address using a public key and a timed cryptographic signature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publicKeyYesThe hex-encoded public key to lookup.
signatureYesThe hex-encoded signature of the timestamp.
timestampYesThe current Unix timestamp in milliseconds.

Implementation Reference

  • The tool 'ship_address' forwards an identity lookup request to the centralized W3Ship API for verification and address retrieval.
    case "ship_address": {
        // Forward the identity lookup to the centralized W3Ship API.
        // Signature verification and DB lookup happen server-side.
        const { publicKey, signature, timestamp } = args as any;
    
        if (!publicKey || !signature || !timestamp) {
            return { content: [{ type: 'text', text: 'Error: publicKey, signature, and timestamp are all required.' }], isError: true };
        }
    
        const identityRes = await fetch(`${W3SHIP_API}/api/identity`, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ publicKey, signature, timestamp }),
        });
    
        const identityData = await identityRes.json();
    
        if (!identityRes.ok) {
            return {
                content: [{ type: 'text', text: `Error: ${identityData.error || 'Identity lookup failed'}${identityData.details ? ' — ' + identityData.details : ''}` }],
                isError: true,
            };
        }
    
        return {
            content: [{ type: 'text', text: JSON.stringify(identityData, null, 2) }],
        };
    }
  • src/index.ts:51-63 (registration)
    Tool registration for 'ship_address' in the listTools handler.
    {
        name: "ship_address",
        description: "Securely retrieve a physical address using a public key and a timed cryptographic signature.",
        inputSchema: {
            type: "object",
            properties: {
                publicKey: { type: "string", description: "The hex-encoded public key to lookup." },
                signature: { type: "string", description: "The hex-encoded signature of the timestamp." },
                timestamp: { type: "number", description: "The current Unix timestamp in milliseconds." },
            },
            required: ["publicKey", "signature", "timestamp"],
        },
    },

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