Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

collect-card

Enable AI assistants to manage payment cards securely on the Terminal.shop platform, facilitating transactions and subscription handling through its API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'collect-card' tool. It generates a secure URL for collecting card details by calling the terminalApi.post('/card/collect') endpoint and returns a message with the URL. Handles errors by returning an error message.
    server.tool("collect-card", {}, async () => { try { const response = await terminalApi.post("/card/collect"); const data = response.data.data; return { content: [ { type: "text", text: `Please use this URL to securely enter your card details: ${data.url}\nAfter completing the form, your card will be added to your account.`, }, ], }; } catch (error) { console.error("Error generating card collection URL:", error); return { content: [ { type: "text", text: `Error generating card collection URL: ${error.message}`, }, ], isError: true, }; } });
  • server.js:930-955 (registration)
    Registration of the 'collect-card' tool using server.tool(), with empty schema {} and inline handler.
    server.tool("collect-card", {}, async () => { try { const response = await terminalApi.post("/card/collect"); const data = response.data.data; return { content: [ { type: "text", text: `Please use this URL to securely enter your card details: ${data.url}\nAfter completing the form, your card will be added to your account.`, }, ], }; } catch (error) { console.error("Error generating card collection URL:", error); return { content: [ { type: "text", text: `Error generating card collection URL: ${error.message}`, }, ], isError: true, }; } });

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/pashaydev/terminal.shop.mcp'

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