investor-agent
by: ferdousbhai
A Model Context Protocol server for building an investor agent
📌Overview
Purpose: The investor-agent aims to provide comprehensive financial insights and analysis to Large Language Models through real-time market data and advanced analytics.
Overview: The investor-agent is a Model Context Protocol (MCP) server designed to facilitate detailed financial analysis and reporting. It integrates with reliable data sources to deliver critical financial information, including ticker reports, options data, historical trends, and financial statements, all formatted for user-friendly access.
Key Features:
-
Detailed Ticker Reports: Delivers extensive reports on individual ticker symbols, including company overviews, performance metrics, news, and analyst recommendations, assisting users in making informed investment decisions.
-
Options Data Retrieval: Provides information on stock options with the highest open interest, enabling users to identify potential trading opportunities.
-
Historical Price Trends: Retrieves historical stock price information, helping users analyze past performance to make future predictions.
-
Comprehensive Financial Statements: Enables access to income statements, balance sheets, and cash flow statements in millions USD, facilitating thorough financial analysis.
-
Institutional Ownership Insights: Offers details on institutional and mutual fund holdings, essential for understanding stock ownership dynamics.
-
Earnings History and Insider Trading Data: Supplies formatted data related to earnings history and recent insider trades, enhancing investment strategy development.
investor-agent: A Financial Analysis MCP Server
Overview
investor-agent is a Model Context Protocol (MCP) server providing financial insights and analysis to Large Language Models. It offers:
- Detailed ticker reports including overview, news, key metrics, performance, analyst recommendations, and upgrades/downgrades.
- Options data with high open interest.
- Historical price trends.
- Essential financial statements (income, balance sheet, cash flow) in millions USD.
- Up-to-date institutional ownership and mutual fund holdings.
- Earnings history and insider trading activity.
Prerequisites
- Python: 3.12 or higher
- Package Manager: uv
Installation
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Run the investor-agent MCP server using uvx
:
uvx investor-agent
Tools
Ticker Information
-
get_ticker_data
- Retrieves a comprehensive report for a given ticker symbol.
- Input:
ticker
(string) - Return: Formatted multi-section report.
-
get_available_options
- Lists stock options with the highest open interest.
- Inputs:
ticker_symbol
,num_options
(optional),start_date
,end_date
(optional),strike_lower
,strike_upper
(optional),option_type
(optional). - Return: Formatted table of options data.
-
get_price_history
- Retrieves historical price data for a specific ticker.
- Inputs:
ticker
,period
. - Return: Table showing price history.
Financial Data Tools
-
get_financial_statements
- Fetches financial statements formatted in millions USD.
- Inputs:
ticker
,statement_type
,frequency
. - Return: Formatted financial statement.
-
get_institutional_holders
- Retrieves details about major institutional and mutual fund holders.
- Input:
ticker
. - Return: Formatted tables listing institutional and mutual fund holders.
-
get_earnings_history
- Retrieves earnings history.
- Input:
ticker
. - Return: Table displaying historical earnings data.
-
get_insider_trades
- Fetches recent insider trading activity for a given ticker.
- Input:
ticker
. - Return: Formatted table showing insider trades.
Usage with MCP Clients
To integrate investor-agent with an MCP client (e.g., Claude Desktop), add the following configuration to your claude_desktop_config.json
:
{
"mcpServers": {
"investor": {
"command": "path/to/uvx/command/uvx",
"args": ["investor-agent"],
"env": {
"BRAVE_SEARCH_API_KEY": "your_brave_search_api_key_here"
}
}
}
}
Debugging
Use the MCP inspector to debug the server:
npx @modelcontextprotocol/inspector uvx investor-agent
Log monitoring directories:
- macOS:
~/Library/Logs/Claude/mcp*.log
- Windows:
%APPDATA%\Claude\logs\mcp*.log
Development
For local development and testing:
- Use the MCP inspector as described in the Debugging section.
- Test using Claude Desktop with the following configuration:
{
"mcpServers": {
"investor": {
"command": "path/to/uv/command/uv",
"args": ["--directory", "path/to/investor-agent", "run", "investor-agent"]
}
}
}
License
This MCP server is licensed under the MIT License. See the LICENSE file for details.