Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_cash_flow

Retrieve cash flow statements for companies to analyze financial health and liquidity. Specify stock symbol and period (annual/quarterly) to access operating, investing, and financing activities data.

Instructions

Get company cash flow statement (annual or quarterly)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol
periodNoPeriod type (annual or quarter)
limitNoNumber of periods to return (default: 5)

Implementation Reference

  • The tool 'get_cash_flow' is registered and implemented within 'registerFinancialsTools' in 'src/tools/financials.ts'. The handler directly calls the FMP API to retrieve cash flow statements.
    // Cash Flow
    server.registerTool(
      'get_cash_flow',
      {
        description: 'Get company cash flow statement (annual or quarterly)',
        inputSchema: FinancialStatementSchema,
      },
      async (args: z.infer<typeof FinancialStatementSchema>) => {
        try {
          const period = args.period || 'annual';
          const limit = args.limit || 5;
          const data = await fetchFMP<CashFlow[]>(
            `/cash-flow-statement?symbol=${args.symbol.toUpperCase()}&period=${period}&limit=${limit}`
          );
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(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/jackdark425/aigroup-fmp-mcp'

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