MCP Research Server

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.

Category
Visit Server

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 information
  • find_competitors() - Find competitor companies
  • analyze_company_business() - Analyze business model and activities
  • extract_market_keywords() - Extract market and industry keywords
  • generate_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

Installation

  1. Clone or download this repository

  2. Run the setup script:

    chmod +x setup.sh
    ./setup.sh
    
  3. 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

  1. Enter a company name (e.g., "Apple", "Tesla", "Netflix")
  2. Enter your OpenAI API key (required for AI analysis)
  3. Click "Research Company" to start the analysis
  4. 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

  1. User Input: User enters company name in Gradio interface
  2. 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
  3. AI Synthesis: OpenAI GPT-4 processes all research data and generates:
    • Executive summary
    • Key insights
    • Market positioning analysis
  4. 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 .env file or expose your OpenAI API key
  • Use environment variables for sensitive information
  • The .env.example file 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured