MarketIntel MCP Server
by dhirajpatra
README.md
# MarketIntel MCP Server
A minimal MCP server for market research built with FastMCP and the Tavily API with n8n automation.
## Overview
This repository includes:
- `server.py` — MCP server implementation using `FastMCP`
- `client.py` — example client that compares two companies using the MCP server
- `main.py` — placeholder entrypoint
- `MCP-Market-Research Agent.json` — optional integration configuration
- `requirements.txt` / `pyproject.toml` — Python dependencies
## Steps
1. Clone or download this repository.
2. Create a Python virtual environment in the repository root:
```bash
python -m venv .venv
source .venv/bin/activate
```
3. Install the dependencies:
```bash
pip install -r requirements.txt
```
4. Copy env-example file to a `.env` file in the repository root with your Tavily API key:
```bash
TAVILY_API_KEY=your_api_key_here
N8N_API_KEY=your_api_key_here
```
5. Start the MCP server:
```bash
python server.py
```
6. In a separate terminal, run the example client to compare two companies:
```bash
python client.py "openai vs anthropic"
```
7. To use a custom server endpoint, set `MARKETINTEL_ENDPOINT` and rerun the client:
```bash
MARKETINTEL_ENDPOINT=http://127.0.0.1:8000/mcp python client.py "openai vs anthropic"
```
## Prerequisites
- Python 3.13+
- A valid Tavily API key
## Setup
1. Create and activate a virtual environment:
```bash
python -m venv .venv
source .venv/bin/activate
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Create a `.env` file containing:
```bash
TAVILY_API_KEY=your_api_key_here
```
## Running the server
Start the server with:
```bash
python server.py
```
The server listens on `http://0.0.0.0:8000` and exposes the MCP endpoint at `http://127.0.0.1:8000/mcp`.
## Using the client
Run the example client to compare two companies:
```bash
python client.py "openai vs anthropic"
```
To override the endpoint:
```bash
MARKETINTEL_ENDPOINT=http://127.0.0.1:8000/mcp python client.py "simplilearn vs edureka"
```
## Project structure
```
.env # local environment variables
README.md # project documentation
server.py # MCP server implementation
client.py # example FastMCP client
main.py # placeholder entrypoint
MCP-Market-Research Agent.json # optional integration config
pyproject.toml # project metadata
requirements.txt # dependency list
python-version # pinned Python version
uv.lock # dependency lockfile
.venv/ # virtual environment (ignored)
```
## Server capabilities
The server exposes the following tools:
- `company_overview`
- `list_competitors`
- `product_portfolio`
- `pricing_snapshot`
- `recent_news_pulse`
It also defines a market topics resource and a competitor analysis prompt.
## Environment variables
- `TAVILY_API_KEY` — required for Tavily access
- `MARKETINTEL_ENDPOINT` — optional client override
## Notes
- This repository does not include an `mcp_server/` package or `tests/` directory.
- The current implementation is centered on the `server.py` and `client.py` examples.
## Development
To install optional dev tooling:
```bash
pip install flake8
flake8 .
```
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues