Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

create-card

Generate a digital card for secure transactions by providing a valid token, enabling streamlined interaction with Terminal.shop’s API for shopping 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 /card endpoint via terminalApi, extracts the card ID from the response, and returns a success message with the 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, }; } },
  • Zod schema defining the input parameters for the 'create-card' tool: a required 'token' string (likely a Stripe token).
    { token: z.string(), },
  • server.js:958-992 (registration)
    Registration of the 'create-card' MCP tool using server.tool(), specifying the name, input schema, and handler function.
    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