set-api-key
Configure the Payman API key for authentication to access Payman AI's APIs, enabling operations like creating payees, sending payments, and checking balances.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"apiKey": "<apiKey>"
},
"name": "set-api-key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | The Payman API key to use for authentication |
Implementation Reference
- payman-server.ts:23-33 (handler)Handler function for set-api-key tool that stores the provided API key in the global paymanApiKey variable and returns a success message.
async ({ apiKey }) => { paymanApiKey = apiKey; return { content: [ { type: "text", text: "Payman API key has been set successfully.", }, ], }; } - payman-server.ts:20-22 (schema)Input schema for set-api-key tool using Zod, defining apiKey as string.
{ apiKey: z.string().describe("The Payman API key to use for authentication"), }, - payman-server.ts:18-34 (registration)Registration of the set-api-key tool on the MCP server.
server.tool( "set-api-key", { apiKey: z.string().describe("The Payman API key to use for authentication"), }, async ({ apiKey }) => { paymanApiKey = apiKey; return { content: [ { type: "text", text: "Payman API key has been set successfully.", }, ], }; } ); - payman-server.ts:15-15 (helper)Global variable to store the Payman API key, used by set-api-key and other tools.
let paymanApiKey = "";