Bull Vision Agent
Cognitive-Stack/bull-vision-agent · 17 stars · Python
MCP server A FastAPI application that integrates with Telegram using webhooks and OpenAI Agents SDK for AI-powered stock trading assistance, utilizing MCPHub for multiple MCP server management.
Install
The repo has no one-line install. Follow its README.
Files
Bull Vision Agent
A FastAPI application that integrates with Telegram using webhooks and OpenAI Agents SDK for AI-powered stock trading assistance, utilizing MCPHub for multiple MCP server management.
Features
- Telegram bot integration with webhook support
- AI-powered stock analysis using OpenAI Agents SDK
- Multiple MCP server integration via MCPHub:
- Stock news analysis
- Volume wall detection
- Real-time stock data analysis
- Market news integration
- Conversation history tracking
- Trading context management
- MongoDB integration for data persistence
Project Structure
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app with MCPHub initialization
│ ├── api/
│ │ ├── __init__.py
│ │ └── telegram_webhook.py # Telegram webhook endpoint
│ ├── bot/
│ │ ├── __init__.py
│ │ ├── bot.py # Bot instance and context management
│ │ ├── agent.py # AI agent implementation with MCP servers
│ │ ├── context.py # Conversation context and history
│ │ └── telegram_handler.py # Process incoming messages
│ ├── core/
│ │ ├── __init__.py
│ │ └── settings.py # Application settings
│ ├── models/
│ │ ├── __init__.py
│ │ └── news.py # News data models
│ ├── services/
│ │ ├── __init__.py
│ │ └── mongodb_service.py # MongoDB operations
│ └── startup.py # Startup events
Setup
-
Clone the repository
-
Install dependencies:
poetry install
-
Copy
.env.exampleto.envand fill in the required values:cp .env.example .env
-
Edit
.envwith your actual values:TELEGRAM_BOT_TOKEN: Your Telegram bot token from @BotFatherTELEGRAM_WEBHOOK_URL: The public URL where your bot will receive updatesHOSTandPORT: Server configurationAZURE_OPENAI_API_KEY: Your Azure OpenAI API keyAZURE_OPENAI_ENDPOINT: Your Azure OpenAI endpointAZURE_OPENAI_DEPLOYMENT: Your Azure OpenAI deployment nameAZURE_OPENAI_API_VERSION: Azure OpenAI API versionMONGO_URI: MongoDB connection stringMONGO_DB: MongoDB database name
Running the Application
Start the server:
make run
Webhook Setup
- Make sure your server is publicly accessible
- The webhook URL should be in the format:
https://your-domain.com/api/telegram/webhook - The webhook will be automatically registered when the application starts
Available Commands
/start- Start the bot/help- Show help message
Example Queries
You can ask the bot about:
- Stock analysis (e.g., "Analyze AAPL")
- Market news (e.g., "What's the latest news about Tesla?")
- Trading strategies (e.g., "What's your view on the current market?")
- Volume analysis (e.g., "Check volume patterns for MSFT")
Development Commands
make install # Install dependencies make run # Run the application make test # Run tests make lint # Run linters make format # Format the code make clean # Clean up generated files make setup # Setup development environment make check # Run all checks
Documentation
For detailed instructions on:
- Setting up the AI Chatbot with Telegram and OpenAI Agents SDK, see init_telegram_openai_agent.md
- Using MCPHub with multiple MCP servers, see create_telegram_chatbot_multi_mcp_server.md
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 17
- Language
- Python
- Last push
- 2025-05-11
- Forks
- 8
- Topics
- agentic-ai, mcp, stock
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k