financial-analysis
An Anthropic Model Context Protocol (MCP) server for financial analysis with alphavantage.com and financialmodellingprep.com API integration.
claude mcp add --transport stdio kablewy-financial-analysis-mcp-server node path/to/server.js \ --env FMP_API_KEY="your_fmp_api_key_here" \ --env ALPHA_VANTAGE_API_KEY="your_alpha_vantage_api_key_here"
How to use
This MCP server provides access to financial data through two tools: stock_price and company_fundamentals. The stock_price tool fetches real-time and historical stock price data by leveraging the Alpha Vantage API, returning data such as current price, intraday intervals, and historical price series depending on the requested interval and output size. The company_fundamentals tool retrieves fundamental company data from Financial Modeling Prep, including an overview, income statements, balance sheets, cash flow statements, and financial ratios. You can combine these tools to build richer financial analyses, charts, and dashboards that require both price data and fundamental metrics.
To use a tool, call stock_price with parameters like symbol, interval, outputSize, and dataType to control the granularity and format of the response. For company_fundamentals, specify the symbol and the metrics you want (overview, income, balance, cash, ratios). Ensure your environment variables are set with valid API keys to authorize requests to the respective third-party services.
How to install
Prerequisites:
- Node.js installed (recommended LTS version)
- Access to a functioning internet connection to retrieve dependencies and API data
Step-by-step installation:
- Clone the repository or download the package
- Install dependencies
npm install
- Configure environment variables in a .env file (or your runtime environment)
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_api_key_here
FMP_API_KEY=your_fmp_api_key_here
- Build the server (if a build step exists)
npm run build
- Start the MCP server
npm start
Notes:
- If your deployment requires a different command to start (for example, a production build folder), adjust the start script accordingly.
- Ensure your environment variables are loaded by the runtime (dotenv or environment config in your hosting platform).
Additional notes
Tips and common issues:
- Ensure API keys have the necessary permissions and are not expired.
- If you encounter rate limiting from Alpha Vantage or FMP, consider adding caching at the client level or upgrading API plans.
- The server expects the following environment variables: ALPHA_VANTAGE_API_KEY and FMP_API_KEY. If using a container, pass them as environment variables at runtime.
- Verify that the path in the mcp_config (path/to/server.js) points to the actual server entry file in your deployment. If you move files, update this path accordingly.
- When querying company fundamentals, you may request multiple metrics in a single call; ensure the API key has access to all required data endpoints.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud