Supports LangChain as an MCP-aware client for accessing the securities analysis tools and data
Supports OpenAI-Function calling as an MCP-aware client for accessing securities analysis tools
Uses pandas_ta for technical analysis with hundreds of indicators for securities analysis
Provides tools to query Perplexity for securities research and company information
Generates high-quality interactive charts for securities data visualization, exportable as static PNG or interactive HTML
Offers Reddit scraping utilities for social sentiment analysis related to securities
Provides tools to query Wikipedia for background information on companies and securities
MCP Securities Analysis
A Python-based flow for securities analysis using the Model Context Protocol (MCP). The repository bundles market data, parsing, analytics and visualisation tools behind a FastMCP server so that they can be consumed locally or remotely by any MCP-aware client (e.g. Claude Desktop, LangChain).
Example deep research report for Tesla.
This report was generated semi-autonomously by the following steps:
- connect MCP tools to Claude Desktop, including web search, Perplexity, Wikipedia. (see
claude_desktop_config.json
for details). You can think of the Wikipedia tool as a friend you invite into the chat conversation who knows how to search and navigate Wikipedia, and bring articles, sections, summaries into the chat context, for further discussion with the user and the AI. - connect
server.py
MCP server to Claude Desktop. Think of this as writing your own bots in Python that can bring stuff into the chat context: market data, SEC filings, or anything else you can retrieve or compute. - prompt Claude Desktop to query Perplexity, Wikipedia, and the 10-K to bring information about Tesla into the context.
- prompt Claude Desktop to query market data tools for up-to-date info on Tesla
- finally, enable deep research and prompt Claude Desktop to write a deep report in 8 sections with details on what each section should cover, using the information retrieved from the chat context, additional web searches and tool calls.
- see
prompts.txt
for prompts used in the example.
While it's not a fully autonomous agent and at an early POC level, it shows the way toward a fully autonomous agent. Create an MCP client that autonomously goes through the steps above and generates a deep report on Tesla in a structured format with graphs and tables. Or create an even more advanced multi-agent workflow with a set of parallel agents for each section, and a critic-optimizer workflow, and a final report generator.
server.py Features
- FastMCP server –
server.py
exposes a few MCP tools to get market data, news, charts, SEC filings, fundamental, technical data, research from public web sites, subscription services, and REST APIs. - Market data
yfinance
OpenBB
. via the OpenBB platform API, we can call just about any market data REST API via a unified API.
- SEC filings - a tool gets 10-K Item 1 via
sec_downloader
and parses it withsec_parser
. - Technical analysis - computes a few technical indicators with
pandas_ta
&TA-Lib
. - Interactive plots - Make a plot with plotly
- News & Social sentiment - Reddit scraping utilities. At startup we launch a browser context and keep it open for the duration of the session. By pointing the browser at your profile, you can access saved credentials. Then you can open any URL and scrape the links or text or full HTML by prompting the LLM to generate the appropriate tool call.
Quick Start
Project Structure
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Python-based FastMCP server that provides financial tools for securities analysis, including market data, news, fundamental/technical analysis, and visualization capabilities that can be consumed by any MCP-aware client.
Related MCP Servers
- -securityAlicense-qualityMCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.Last updated -322PythonMIT License
- -securityAlicense-qualityAn MCP server that integrates with the AlphaVantage financial data API, providing access to stock market data, technical indicators, and fundamental financial information.Last updated -PythonMIT License
- -securityFlicense-qualityA FastMCP-based service that provides stock data including historical prices, fundamental information, and financial news.Last updated -1Python
- AsecurityAlicenseAqualityAn MCP server that provides comprehensive financial insights and analysis by leveraging real-time market data, news, and advanced analytics for stocks, options, financial statements, and economic indicators.Last updated -1740PythonMIT License