Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_technical_indicator_rsi

Calculate the Relative Strength Index (RSI) to identify overbought or oversold stock conditions based on price momentum for informed trading decisions.

Instructions

Get Relative Strength Index (RSI) technical indicator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol
timeframeYesTimeframe for technical analysis
periodNoPeriod length

Implementation Reference

  • The handler function that performs the API call to fetch RSI technical indicator data.
    async (args: z.infer<typeof TechnicalIndicatorSchema>) => {
      try {
        const period = args.period || 14;
        const data = await fetchFMP<TechnicalIndicator[]>(
          `/technical-indicators/rsi?symbol=${args.symbol.toUpperCase()}&timeframe=${args.timeframe}&periodLength=${period}`
        );
        return jsonResponse(data);
      } catch (error) {
        return errorResponse(error);
      }
    }
  • The registration of the 'get_technical_indicator_rsi' tool with the MCP server.
    server.registerTool(
      'get_technical_indicator_rsi',
      {
        description: 'Get Relative Strength Index (RSI) technical indicator',
        inputSchema: TechnicalIndicatorSchema,
      },
      async (args: z.infer<typeof TechnicalIndicatorSchema>) => {
        try {
          const period = args.period || 14;
          const data = await fetchFMP<TechnicalIndicator[]>(
            `/technical-indicators/rsi?symbol=${args.symbol.toUpperCase()}&timeframe=${args.timeframe}&periodLength=${period}`
          );
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • Input validation schema for the technical indicator tools, including RSI.
    const TechnicalIndicatorSchema = z.object({
      symbol: z.string().describe('Stock ticker symbol'),
      timeframe: TimeframeSchema.describe('Timeframe for technical analysis'),
      period: z.number().optional().describe('Period length'),
    });

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