Skip to main content
Glama
deepsuthar496

Alpha Vantage MCP Server

get_crypto_price

Retrieve current cryptocurrency prices in specified markets to monitor digital asset values and support financial analysis.

Instructions

Get cryptocurrency prices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesThe crypto symbol (e.g., BTC)
marketYesMarket currency (e.g., USD)

Implementation Reference

  • The main handler function that executes the 'get_crypto_price' tool by querying the Alpha Vantage API with the CRYPTO_INTRADAY function and returning the JSON response.
    private async getCryptoPrice(args: any) { const response = await this.axiosInstance.get('', { params: { function: 'CRYPTO_INTRADAY', symbol: args.symbol, market: args.market, }, }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • src/index.ts:173-190 (registration)
    Registers the 'get_crypto_price' tool in the ListTools response, including its name, description, and input schema.
    { name: 'get_crypto_price', description: 'Get cryptocurrency prices', inputSchema: { type: 'object', properties: { symbol: { type: 'string', description: 'The crypto symbol (e.g., BTC)', }, market: { type: 'string', description: 'Market currency (e.g., USD)', }, }, required: ['symbol', 'market'], }, },
  • Defines the input schema for the 'get_crypto_price' tool, specifying required 'symbol' and 'market' string parameters.
    inputSchema: { type: 'object', properties: { symbol: { type: 'string', description: 'The crypto symbol (e.g., BTC)', }, market: { type: 'string', description: 'Market currency (e.g., USD)', }, }, required: ['symbol', 'market'], },
  • Switch case in the CallTool request handler that dispatches 'get_crypto_price' calls to the getCryptoPrice method.
    case 'get_crypto_price': return await this.getCryptoPrice(request.params.arguments);

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/deepsuthar496/alpha-ventage-mcp'

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