MCP Research Server
Provides tools for automated company research, competitor identification, and business model analysis to generate comprehensive business intelligence. It enables users to extract market keywords and synthesize competitive insights via AI-powered research capabilities.
README
🔍 Company Research Agent with MCP + OpenAI + Gradio
An intelligent company research and competitive analysis tool that combines the power of Model Context Protocol (MCP), OpenAI GPT-4, and Gradio to deliver comprehensive business intelligence.
🌟 Features
- Automated Company Research: Search for company information using MCP tools
- Competitor Analysis: Automatically identify and analyze competitors
- Business Model Analysis: Understand company operations and revenue streams
- Market Keywords Extraction: Extract relevant keywords describing the competitive landscape
- AI-Powered Insights: OpenAI synthesizes research into actionable executive summaries
- Interactive UI: Beautiful Gradio interface for easy interaction
🏗️ Architecture
┌─────────────────┐
│ Gradio UI │
│ (Frontend) │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌──────────────────┐
│ OpenAI GPT-4 │◄────►│ MCP Server │
│ (AI Analysis) │ │ (Research Tools)│
└─────────────────┘ └──────────────────┘
│
┌─────────┴─────────┐
│ Research Tools: │
│ • Company Info │
│ • Competitors │
│ • Business Model │
│ • Keywords │
└───────────────────┘
📋 Components
1. MCP Research Server (mcp_research_server.py)
FastMCP server providing research tools:
search_company_info()- Search for basic company informationfind_competitors()- Find competitor companiesanalyze_company_business()- Analyze business model and activitiesextract_market_keywords()- Extract market and industry keywordsgenerate_competitive_report()- Generate full competitive analysis
2. Gradio Application (gradio_app.py)
Interactive web interface that:
- Accepts company name and OpenAI API key as inputs
- Orchestrates MCP tool calls for data gathering
- Uses OpenAI to generate intelligent summaries
- Displays results in an organized, user-friendly format
🚀 Quick Start
Prerequisites
- Python 3.8 or higher
- OpenAI API key (Get one here)
Installation
-
Clone or download this repository
-
Run the setup script:
chmod +x setup.sh ./setup.sh -
Configure your API key:
cp .env.example .env # Edit .env and add your OpenAI API key
Manual Installation
If you prefer manual setup:
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
💻 Usage
Start the Application
# Activate virtual environment (if not already active)
source venv/bin/activate
# Run the Gradio app
python gradio_app.py
The application will start on http://localhost:7860
Using the Interface
- Enter a company name (e.g., "Apple", "Tesla", "Netflix")
- Enter your OpenAI API key (required for AI analysis)
- Click "Research Company" to start the analysis
- View results:
- Executive Summary (AI-generated)
- Full Report (expand accordion)
- Market Keywords (expand accordion)
Example Companies to Try
- Technology: Apple, Microsoft, Google, Amazon, Meta
- Automotive: Tesla, Ford, General Motors
- Entertainment: Netflix, Disney
- Consumer Goods: Nike, Coca-Cola, Starbucks
📦 Dependencies
- fastmcp - Model Context Protocol server framework
- gradio - Web UI framework
- openai - OpenAI API client
- requests - HTTP library for web requests
- beautifulsoup4 - HTML parsing (for future web scraping)
- python-dotenv - Environment variable management
🔧 How It Works
- User Input: User enters company name in Gradio interface
- MCP Tools: Application calls MCP research tools to gather data:
- Company information from Wikipedia API
- Competitor identification from database
- Business model analysis
- Market keyword extraction
- AI Synthesis: OpenAI GPT-4 processes all research data and generates:
- Executive summary
- Key insights
- Market positioning analysis
- Results Display: Formatted report shown in Gradio UI
🎯 Use Cases
- Competitive Intelligence: Understand your competitors quickly
- Market Research: Identify market trends and keywords
- Investment Analysis: Research companies for investment decisions
- Business Strategy: Inform strategic planning with competitive data
- Sales Enablement: Prepare for sales conversations with prospect research
🔐 Security Notes
- Never commit your
.envfile or expose your OpenAI API key - Use environment variables for sensitive information
- The
.env.examplefile is provided as a template
🛠️ Customization
Adding More Companies
Edit mcp_research_server.py and add entries to the data dictionaries:
competitors_db(line ~70)business_data(line ~100)industry_keywords(line ~140)
Using Real APIs
For production use, replace the sample data with real API calls:
- Business data APIs (Crunchbase, PitchBook)
- Financial APIs (Alpha Vantage, Yahoo Finance)
- News APIs (NewsAPI, Google News)
- Web scraping (requests + BeautifulSoup)
Changing OpenAI Model
In gradio_app.py, modify the model parameter:
model="gpt-4o-mini" # Change to "gpt-4o", "gpt-4-turbo", etc.
📊 Project Structure
mcp2_test/
├── README.md # This file
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── setup.sh # Setup script
├── mcp_research_server.py # MCP server with research tools
└── gradio_app.py # Gradio web application
🐛 Troubleshooting
"Module not found" errors
pip install -r requirements.txt
"Invalid API key" error
- Check your OpenAI API key in the input field
- Ensure you have credits in your OpenAI account
- Verify the key starts with
sk-
Port already in use
Change the port in gradio_app.py:
demo.launch(server_port=7861) # Use different port
🚀 Future Enhancements
- [ ] Real-time web scraping for live data
- [ ] Integration with business intelligence APIs
- [ ] Export reports to PDF/CSV
- [ ] Historical trend analysis
- [ ] Multi-company comparison view
- [ ] Financial metrics integration
- [ ] News sentiment analysis
- [ ] Custom report templates
📝 License
This project is provided as-is for educational and research purposes.
🤝 Contributing
Contributions welcome! Feel free to:
- Add more MCP tools
- Improve the UI/UX
- Integrate additional APIs
- Enhance the AI prompts
- Add export functionality
💡 Learn More
Built with ❤️ using FastMCP, OpenAI, and Gradio
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。