Financial AI Agent
An AI agent providing unified access to financial market data and news articles.
π Model Context Protocol(MCP) Agent App
A TypeScript-based Ai agent with MCP integration. This project provides a unified interface to access financial market information and relevant news articles through MCP servers with tool calling.
DEMO
Terminal
https://github.com/user-attachments/assets/47150b98-0663-43f6-927e-f09abb796fe6
Cursor
https://github.com/user-attachments/assets/72210b49-dc23-4bef-b7ee-6d289ede59e1
β¨ Features
- π Stock Market Data:
- Company Information
- Quarterly Financials
- Annual Financial Reports
- π° News Integration:
- Real-time News Articles
- Query-based News Search
- π οΈ Architecture Components:
- Client-Server Architecture
- TypeScript Implementation
- Modular Design Pattern
- LangChain agent
π§ Prerequisites
- Node.js 16.x or higher
- TypeScript 4.x or higher
- API keys for stock services and OpenAi
π Quick Start
1. Installation
Clone and set up the project:
git clone https://github.com/extrawest/financial-ai-agent-mcp-servers
cd financial-ai-agent-mcp-servers
# Install dependencies
npm install
2. Environment Configuration
Create a .env file in the project root:
# API Configuration
STOCK_API_KEY=your_stock_api_key
OPENAI_API_KEY=your_open_ai_key
3. Build and Run
# Build the project
npm run build
# Start the server
npm start
ποΈ Project Structure
src/
βββ agent/
β βββ agent.ts # Agent implementation
βββ client/
β βββ client.ts # API client implementation
βββ config/
β βββ configs.ts # Configuration management
βββ logger/
β βββ logger.ts # Logging functionality
βββ server/
β βββ news-server.ts # News API server
β βββ stocks-server.ts # Stock market API server
βββ types/
β βββ newsapi.d.ts # Type definitions
βββ index.ts # Application entry point
π¦ Core Components
Stock Server
Handles all stock market related operations:
- Company information retrieval
- Financial reports access
- Market data processing
News Server
Manages news-related functionality:
- Article search and retrieval
- Query processing
- News data formatting
Client
Provides a unified interface to interact with both servers:
- API request handling
- Response processing
- Error management
Start an app
In separate terminal tabs run
# Start Stocks server
npm run stocks:built
# Start News server
npm npm run news:built
# Run agent
npm run agent:built
Add mcp to Cursor IDE
- Open Cursor IDE, go to Settings -> Cursor Settings
- Go to Tools & Integrations section
- Find MCP tools, click New MCP Server
- Add this to mcp.json file
{
"mcpServers": {
"stocks-mcp-server": {
"url": "http://127.0.0.1:3000/sse"
},
"news-mcp-server": {
"url": "http://127.0.0.1:3001/sse"
}
}
}
- Run commands in separte terminal tabs
# Start Stocks server
npm run stocks:built
# Start News server
npm npm run news:built
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Oleksandr Samoilenko
Extrawest.com, 2025
Related Servers
arXiv LaTeX
Fetches and processes arXiv papers using LaTeX source for accurate equation handling.
BigGo MCP Server
A server for product search, price history tracking, and specification search using the BigGo API.
Legislative Yuan API
Search for bills, documents, and meeting records from Taiwan's Legislative Yuan API.
Google Maps MCP Server
Integrates Google Maps for route planning, traffic analysis, and cost estimation.
YouTube Toolbox
A set of tools to interact with YouTube, including video search, transcript extraction, and comment retrieval.
Amazon Product Advertising API
Integrate with the Amazon Product Advertising API to search for products and access product information.
Search MCP Server
A server providing web and similarity search functionalities, designed for Claude Desktop. It requires external embedding and API services.
SelfMemory
Let your memories live forever by passing your knowledge to the next generation with SelfMemory.
Tripitaka MCP
Search and cite the full PΔli Canon (TipiαΉaka, ~444K segments) β Sutta, Vinaya, Abhidhamma at parity with SuttaCentral. Hybrid search, full-sutta fetch, translation comparison, PΔli word lookup. Free, non-commercial, offered as Dhamma DΔna.
YouTube
Search YouTube videos and retrieve their transcripts using the YouTube API.