Skip to main content
Glama
ClawyPro

Clawy MCP Server

by ClawyPro

alpha_vantage_query

Query financial market data including stock time series, forex rates, crypto prices, and economic indicators from Alpha Vantage.

Instructions

Query financial market data from Alpha Vantage. Stock time series, forex rates, crypto prices, and economic indicators.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
functionYesAPI function (e.g., TIME_SERIES_DAILY, FX_DAILY, DIGITAL_CURRENCY_DAILY, REAL_GDP)
symbolNoStock/crypto symbol (e.g., AAPL, BTC)
from_currencyNoFrom currency for forex (e.g., USD)
to_currencyNoTo currency for forex (e.g., KRW)
intervalNoInterval for intraday (1min, 5min, 15min, 30min, 60min)
outputsizeNocompact=100 points, full=all (default compact)

Implementation Reference

  • Schema definition for the alpha_vantage_query tool.
    export const alphaVantageTools: ToolDef[] = [
      {
        name: "alpha_vantage_query",
        description: "Query financial market data from Alpha Vantage. Stock time series, forex rates, crypto prices, and economic indicators.",
        inputSchema: z.object({
          function: z.string().describe("API function (e.g., TIME_SERIES_DAILY, FX_DAILY, DIGITAL_CURRENCY_DAILY, REAL_GDP)"),
          symbol: z.string().optional().describe("Stock/crypto symbol (e.g., AAPL, BTC)"),
          from_currency: z.string().optional().describe("From currency for forex (e.g., USD)"),
          to_currency: z.string().optional().describe("To currency for forex (e.g., KRW)"),
          interval: z.string().optional().describe("Interval for intraday (1min, 5min, 15min, 30min, 60min)"),
          outputsize: z.enum(["compact", "full"]).optional().describe("compact=100 points, full=all (default compact)"),
        }),
        endpoint: "/v1/alpha-vantage/query",
      },
  • Generic MCP tool registration logic that handles calling the API endpoint for alpha_vantage_query.
    for (const tool of allTools) {
      server.tool(
        tool.name,
        tool.description,
        tool.inputSchema.shape,
        async (params) => {
          const method = tool.method || "POST";
          const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>);
    
          if (result.error) {
            return {
              content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }],
              isError: true,
            };
          }
    
          const text = typeof result.data === "string"
            ? result.data
            : JSON.stringify(result.data, null, 2);
    
          return {
            content: [{ type: "text" as const, text }],
          };
        },
      );
    }

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/ClawyPro/clawy-mcp-server'

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