Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

create-card

Generate a secure payment token for processing transactions through the Terminal.shop MCP Server. This tool creates payment cards to facilitate purchases, order placements, and subscription management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes

Implementation Reference

  • The handler function for the 'create-card' tool. It takes a Stripe token, posts it to the Terminal API /card endpoint to create a new payment card, and returns the new card ID or an error message.
    async ({ token }) => { try { const response = await terminalApi.post("/card", { token, }); const cardID = response.data.data; return { content: [ { type: "text", text: `Card created successfully! Card ID: ${cardID}`, }, ], }; } catch (error) { console.error("Error creating card:", error); return { content: [ { type: "text", text: `Error creating card: ${error.message}`, }, ], isError: true, }; } },
  • Input schema for the 'create-card' tool, requiring a string 'token' (Stripe token).
    token: z.string(), },
  • server.js:958-992 (registration)
    Registration of the 'create-card' tool using server.tool(), including inline schema and handler.
    server.tool( "create-card", { token: z.string(), }, async ({ token }) => { try { const response = await terminalApi.post("/card", { token, }); const cardID = response.data.data; return { content: [ { type: "text", text: `Card created successfully! Card ID: ${cardID}`, }, ], }; } catch (error) { console.error("Error creating card:", error); return { content: [ { type: "text", text: `Error creating card: ${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