Skip to main content
Glama
akumar1903

MarketIntel MCP Server

by akumar1903
README.md
# šŸš€ MarketIntel MCP Server

An AI-powered **Market Research MCP (Model Context Protocol) Server** built using **FastMCP**, **Python**, **Tavily Search API**, and **Cursor AI**. This project enables Large Language Models (LLMs) to access real-time market intelligence through reusable MCP tools, providing structured competitor analysis, pricing insights, product portfolio mapping, and company research.

---

## šŸ“Œ Project Overview

MarketIntel is a custom MCP server that exposes market research capabilities as reusable tools. It integrates with the **Tavily Search API** to retrieve live web data and allows AI assistants (such as Cursor AI) to generate structured market intelligence reports.

The project demonstrates how **Model Context Protocol (MCP)** enables AI applications to securely interact with external services while maintaining a standardized interface.

---

## ✨ Features

- šŸ“Š Company Overview
- šŸ¢ Competitor Analysis
- šŸ“¦ Product Portfolio Mapping
- šŸ’° Pricing Intelligence
- šŸ“° Recent News Monitoring
- šŸ“ˆ SWOT & Porter's Five Forces Prompt
- 🌐 Live Web Search using Tavily
- šŸ¤– Cursor AI MCP Integration
- ⚔ FastMCP Server using SSE Transport

---

# Architecture

```
                    Cursor AI
                        │
                        │ MCP
                        ā–¼
              MarketIntel MCP Server
                        │
         ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
         │              │              │
         ā–¼              ā–¼              ā–¼
 Company Overview   Competitor     Pricing
                     Analysis      Intelligence
         │              │              │
         ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                        ā–¼
                  Tavily Search API
                        │
                        ā–¼
                 Live Web Search Results
```

---

# Tech Stack

- Python 3.12+
- FastMCP
- Tavily Search API
- Cursor AI
- uv Package Manager
- Server-Sent Events (SSE)

---

# Project Structure

```
MarketIntel-MCP/
│
ā”œā”€ā”€ server.py
ā”œā”€ā”€ .env
ā”œā”€ā”€ pyproject.toml
ā”œā”€ā”€ uv.lock
ā”œā”€ā”€ README.md
└── .gitignore
```

---

# MCP Tools

## Company Overview

Returns:

- Company background
- Headquarters
- Products
- Business model
- Recent developments

---

## Competitor Analysis

Returns:

- Major competitors
- Emerging competitors
- Regional competitors
- Market positioning

---

## Product Portfolio

Maps:

- Products
- Solutions
- Pricing tiers
- Product categories

---

## Pricing Snapshot

Retrieves:

- Pricing
- Billing models
- Discounts
- Regional pricing

---

## Recent News Pulse

Returns latest news including:

- Product launches
- Acquisitions
- Funding
- Leadership changes

---

# Prerequisites

Install:

- Python 3.12+
- Cursor AI
- uv
- Tavily API Account

---

# Installation

Clone the repository

```bash
git clone https://github.com/<yourusername>/MarketIntel-MCP.git

cd MarketIntel-MCP
```

Install dependencies

```bash
uv sync
```

or

```bash
uv add fastmcp
uv add tavily-python
uv add python-dotenv
```

---

# Configure Environment Variables

Create a `.env` file.

```text
TAVILY_API_KEY=your_api_key_here
```

---

# Run the MCP Server

```bash
uv run server.py
```

Expected output

```
šŸš€ Starting MarketIntel MCP Server...

FastMCP Server running on

http://127.0.0.1:8000/sse
```

---

# Configure Cursor AI

Open

```
Settings
→ Tools & Integrations
→ Add Custom MCP
```

Use

```json
{
  "mcpServers": {
    "MarketIntel": {
      "url": "http://127.0.0.1:8000/sse"
    }
  }
}
```

Restart Cursor AI.

---

# Example Prompt

```
Create a market research report comparing NVIDIA and AMD.

Cover:

• Company Overview
• Product Portfolio
• Pricing
• Competitors
• Recent News
• Future Outlook

Keep the report under 300 words.
```

---

# Example Workflow

```
User Prompt
      │
      ā–¼
Cursor AI
      │
      ā–¼
MarketIntel MCP Server
      │
      ā–¼
FastMCP Tool
      │
      ā–¼
Tavily Search API
      │
      ā–¼
Live Market Data
      │
      ā–¼
Structured AI Report
```

---

# Skills Demonstrated

- Model Context Protocol (MCP)
- FastMCP Framework
- AI Tool Development
- Prompt Engineering
- REST API Integration
- AI Agent Development
- Market Research Automation
- Python Development
- Cursor AI Integration
- Server-Sent Events (SSE)

---

# Future Enhancements

- OpenAI integration
- Azure AI Foundry integration
- Multi-agent orchestration
- Financial data connectors
- Vector database integration
- RAG-based document search
- Authentication & Authorization
- Docker support
- Kubernetes deployment
- CI/CD with GitHub Actions

---

# Learning Outcomes

This project demonstrates how to:

- Build custom MCP servers
- Expose reusable AI tools
- Connect LLMs to external APIs
- Generate structured market intelligence
- Develop AI-powered business applications
- Integrate Cursor AI with MCP

---

# References

- FastMCP Documentation
- Tavily API Documentation
- Cursor AI Documentation
- Model Context Protocol Specification

---

## Author

**Arun Kumar**

Principal Data & AI Architect

Specializing in:

- AI Agents
- Azure AI
- Data Engineering
- Cloud Architecture
- Generative AI
- Enterprise AI Solutions

---

## License

This project is intended for educational and learning purposes.

Maintenance

ActivityStale
ResponsivenessNo issues