Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_quote

Retrieve real-time stock price data for any ticker symbol to monitor current market values and support investment decisions.

Instructions

Get real-time stock quote for a symbol (e.g., AAPL, TSLA, MSFT)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol (e.g., AAPL)

Implementation Reference

  • The 'get_quote' tool is registered within registerMarketTools, defining its schema, description, and handler function.
    // Get Quote
    server.registerTool(
      'get_quote',
      {
        description: 'Get real-time stock quote for a symbol (e.g., AAPL, TSLA, MSFT)',
        inputSchema: QuoteSchema,
      },
      async (args: z.infer<typeof QuoteSchema>) => {
        try {
          const data = await fetchFMP<StockQuote[]>(`/quote?symbol=${args.symbol.toUpperCase()}`);
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • The handler function that executes the 'get_quote' tool logic by fetching data from FMP API.
    async (args: z.infer<typeof QuoteSchema>) => {
      try {
        const data = await fetchFMP<StockQuote[]>(`/quote?symbol=${args.symbol.toUpperCase()}`);
        return jsonResponse(data);
      } catch (error) {
        return errorResponse(error);
      }
    }
  • The input schema validation for the 'get_quote' tool.
    const QuoteSchema = z.object({
      symbol: z.string().describe('Stock ticker symbol (e.g., AAPL)'),
    });

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/jackdark425/aigroup-fmp-mcp'

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