Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

create-token

Generate authentication tokens for AI assistants to access Terminal.shop's API, enabling product browsing, cart management, order placement, and subscription handling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler for the "create-token" tool, registered directly in the server.tool call. It creates a personal access token by sending a POST request to the "/token" endpoint using the terminalApi client, returns a formatted success message containing the token ID and token value, and handles errors appropriately.
    // Tool to create a personal access token server.tool("create-token", {}, async () => { try { const response = await terminalApi.post("/token"); const data = response.data.data; return { content: [ { type: "text", text: `Token created successfully!\n\nToken ID: ${data.id}\nToken: ${data.token}\n\nIMPORTANT: Save this token securely. You won't be able to see the full token value again.`, }, ], }; } catch (error) { console.error("Error creating token:", error); return { content: [ { type: "text", text: `Error creating token: ${error.message}`, }, ], isError: true, }; } });
  • server.js:1105-1105 (registration)
    Registers the "create-token" tool on the MCP server with an empty input schema (no parameters required). The handler is defined inline.
    server.tool("create-token", {}, async () => {
  • Empty input schema for the create-token tool, indicating no input parameters are required.
    server.tool("create-token", {}, async () => {

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