Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

list_asset_wallets

Retrieve all cryptocurrency wallets grouped by asset type from your Bitpanda account to view holdings and manage portfolio distribution.

Instructions

Lists all user's asset wallets grouped by asset type from the Bitpanda API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the list_asset_wallets tool. It fetches the user's asset wallets from the Bitpanda API using axios.get on /asset-wallets endpoint.
    const listAssetWalletsHandler = async (_input: Input): Promise<Output> => { try { const apiKey = getBitpandaApiKey(); const url = `${BITPANDA_API_BASE_URL}/asset-wallets`; const response = await axios.get<Output>(url, { headers: { 'X-Api-Key': apiKey, 'Content-Type': 'application/json', }, }); // Return the data received from the Bitpanda API return response.data; } catch (error: unknown) { console.error('Error fetching Bitpanda asset wallets:', error); const message = error instanceof Error ? error.message : 'An unknown error occurred while fetching asset wallets.'; // Re-throwing the error to be handled by the MCP server framework throw new Error(`Failed to fetch Bitpanda asset wallets: ${message}`); } };
  • Input schema and types for the list_asset_wallets tool (no input parameters required).
    // Define the input schema shape for the list_asset_wallets tool (no parameters) const listAssetWalletsInputSchemaShape = {}; type RawSchemaShape = typeof listAssetWalletsInputSchemaShape; type Input = z.infer<z.ZodObject<RawSchemaShape>>;
  • Tool definition export for list_asset_wallets, including name, description, schema, and handler reference.
    export const listAssetWalletsTool: BitpandaToolDefinition = { name: 'list_asset_wallets', description: "Lists all user's asset wallets grouped by asset type from the Bitpanda API.", inputSchemaShape: listAssetWalletsInputSchemaShape, handler: listAssetWalletsHandler, };
  • Function that registers all tools, including list_asset_wallets, with the MCP server by calling server.tool() for each.
    export const registerBitpandaTools = (server: McpServer): void => { bitpandaToolDefinitions.forEach((toolDef) => { try { // Pass the raw shape to the inputSchema parameter, assuming SDK handles z.object() server.tool(toolDef.name, toolDef.description, toolDef.inputSchemaShape, async (input) => { const result = await toolDef.handler(input); // Assuming the handler returns the data directly, wrap it in the MCP content format return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }); console.log(`Registered Bitpanda tool: ${toolDef.name}`); } catch (error) { console.error(`Failed to register tool ${toolDef.name}:`, error); } }); };

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/matteoantoci/mcp-bitpanda'

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