Skip to main content
Glama

claude-mcp-server

by paybyrd
api.ts1.13 kB
import { createPaymentLink, createRefund, retrieveOrder } from './functions.js'; import type { Context } from './configuration.js'; class PaybyrdAPI { private apiKey: string; private baseUrl: string; context: Context; constructor(apiKey: string, context?: Context) { this.apiKey = apiKey; this.baseUrl = context?.baseUrl || 'https://gateway.paybyrd.com/api/v2'; this.context = context || {}; } async run(method: string, arg: any) { const authInfo = { apiKey: this.apiKey }; if (method === 'create_payment_link') { const output = JSON.stringify( await createPaymentLink(authInfo, this.baseUrl, arg) ); return output; } else if (method === 'create_refund') { const output = JSON.stringify( await createRefund(authInfo, this.baseUrl, arg) ); return output; } else if (method === 'retrieve_order') { const output = JSON.stringify( await retrieveOrder(authInfo, this.baseUrl, arg) ); return output; } else { throw new Error('Invalid method ' + method); } } } export default PaybyrdAPI;

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/paybyrd/ai-agent-toolkit-js'

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