npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

competitive-intel-mcp

v0.1.2

Published

Competitive Intelligence MCP Server — track competitors, monitor SERP rankings, scrape pages, and build knowledge graphs

Readme

🎯 Competitive Intelligence MCP

Track competitors. Monitor SERP rankings. Scrape pages. Build knowledge graphs.

npm version npm downloads License: MIT Node.js TypeScript

A production-ready Model Context Protocol (MCP) server that gives AI agents real-time competitive intelligence superpowers. Built for marketers, e-commerce teams, and growth hackers who want to automate competitor tracking at scale.

🚀 Quick Start · 📖 Documentation · 🔧 API Reference · 💡 Examples


✨ Features

| Feature | Description | Status | |---------|-------------|--------| | 🏢 Competitor Tracking | Register competitors by domain and build rich profiles | ✅ Ready | | 🔍 SERP Monitoring | Check Google rankings via scraping APIs | ✅ Ready | | 🕷️ Page Scraping | Extract content from competitor pages with bot protection bypass | ✅ Ready | | 🧠 Knowledge Graphs | Store entities and relationships per competitor (products, tech, people) | ✅ Ready | | 📈 Ranking History | Track position changes over time with trend analysis | ✅ Ready | | 📊 Competitive Reports | Generate comprehensive snapshots of your competitive landscape | ✅ Ready | | 🤖 MCP Native | Works with Claude, Cursor, Windsurf, and any MCP client | ✅ Ready | | 🔌 Programmatic API | Use as a library in your own Node.js applications | ✅ Ready | | 🖥️ CLI Tool | Command-line interface for quick operations | ✅ Ready | | 💾 Local Storage | All data stored locally in JSON — no cloud required | ✅ Ready |


🚀 Quick Start

Installation

# Global install (recommended for CLI usage)
npm install -g competitive-intel-mcp

# Or use npx directly
npx competitive-intel-mcp <command>

As an MCP Server

Add to your Claude Desktop, Cursor, Windsurf, or any MCP client:

{
  "mcpServers": {
    "competitive-intel": {
      "command": "npx",
      "args": ["competitive-intel-mcp", "server"]
    }
  }
}

That's it. Your AI assistant now has 13 competitive intelligence tools available.

CLI Usage

# Add your first competitor
competitive-intel-mcp add-competitor -n "Shopify" -d shopify.com --notes "E-commerce platform leader"

# Track a keyword
competitive-intel-mcp add-topic -k "best ecommerce platform"

# Check live SERP rankings
competitive-intel-mcp check-serp -k "best ecommerce platform" --depth 10

# Generate a full report
competitive-intel-mcp report

Programmatic API

import { GraphStore, SerpEngine, Scraper, createServer } from 'competitive-intel-mcp';

// Track competitors
const store = new GraphStore();
const competitor = store.addCompetitor('Shopify', 'shopify.com', 'E-commerce platform');

// Check SERP rankings
const serp = new SerpEngine();
const results = await serp.checkSerp('best ecommerce platform', 10);

// Scrape competitor pages
const scraper = new Scraper();
const page = await scraper.scrapePage('https://shopify.com/pricing');

// Build knowledge graph
store.storeEntities(competitor.id, [
  { name: 'Shopify Plus', type: 'product' },
  { name: 'Ruby on Rails', type: 'technology' },
]);

store.linkEntities(competitor.id, [
  { source: 'Shopify Plus', target: 'Ruby on Rails', type: 'built_on' },
]);

// Start MCP server
await createServer();

🔧 Configuration

Configuration

Add your credentials directly in your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "competitive-intel": {
      "command": "npx",
      "args": ["-y", "competitive-intel-mcp"],
      "env": {
        "BRIGHTDATA_API_KEY": "your-api-key",
        "BRIGHTDATA_GEO_LOCATION": "us"
      }
    }
  }
}

| Variable | Description | |----------|-------------| | BRIGHTDATA_API_KEY | Bright Data API key for live SERP and scraping | | BRIGHTDATA_GEO_LOCATION | Geo for SERP results (default: us) |

Note: Without an API key the server runs in demo mode with simulated results — useful for testing.

Data Storage

All data is stored locally in:

~/.competitive-intel-mcp/store.json

No cloud, no database, no dependencies. Your competitive intelligence stays on your machine.


📖 Documentation

Available MCP Tools

When connected to an MCP client, these tools become available to your AI assistant:

Competitor Management

| Tool | Description | |------|-------------| | competitive-intel_add_competitor | Register a new competitor to track | | competitive-intel_list_competitors | List all tracked competitors |

Topic & Keyword Tracking

| Tool | Description | |------|-------------| | competitive-intel_add_topic | Add a keyword/topic to monitor in SERP | | competitive-intel_list_topics | List all tracked keywords |

SERP & Scraping

| Tool | Description | |------|-------------| | competitive-intel_check_serp | Fetch live Google SERP rankings for a keyword | | competitive-intel_scrape_page | Scrape a competitor page for content extraction |

Knowledge Graph

| Tool | Description | |------|-------------| | competitive-intel_store_entities | Store extracted entities (products, tech, people, etc.) | | competitive-intel_link_entities | Create relationships between entities | | competitive-intel_query_graph | Search the competitive intelligence graph | | competitive-intel_entity_neighbors | Get all entities connected to a given entity |

Analytics & Reporting

| Tool | Description | |------|-------------| | competitive-intel_ranking_history | Get historical ranking data for a competitor | | competitive-intel_recent_changes | Get recent ranking changes across all competitors | | competitive-intel_competitive_report | Generate a comprehensive competitive snapshot |


💡 Examples

Example 1: Track a New Competitor

competitive-intel-mcp add-competitor \
  -n "BigCommerce" \
  -d bigcommerce.com \
  --notes "E-commerce platform competitor, strong B2B features"

Example 2: Monitor SERP for Multiple Keywords

# Add keywords
competitive-intel-mcp add-topic -k "best ecommerce platform"
competitive-intel-mcp add-topic -k "online store builder"
competitive-intel-mcp add-topic -k "dropshipping tools"

# Check rankings
competitive-intel-mcp check-serp -k "best ecommerce platform" --depth 20
competitive-intel-mcp check-serp -k "online store builder" --depth 20

Example 3: Build a Knowledge Graph

After scraping a competitor's page, store what you learned:

# First, scrape the page
competitive-intel-mcp scrape -u https://example-competitor.com/products

# Then add the competitor
competitive-intel-mcp add-competitor -n "Example Store" -d example-competitor.com

# Store entities (via MCP tool or programmatic API)

Example 4: Weekly Competitive Report

# Run this every Monday
competitive-intel-mcp check-serp -k "best ecommerce platform"
competitive-intel-mcp check-serp -k "online store builder"
competitive-intel-mcp check-serp -k "dropshipping tools"

# Generate report
competitive-intel-mcp report

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                    MCP Client (Claude/Cursor)               │
└──────────────────────┬──────────────────────────────────────┘
                       │ stdio
┌──────────────────────▼──────────────────────────────────────┐
│              competitive-intel-mcp Server                   │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │
│  │  GraphStore │  │ SerpEngine  │  │      Scraper        │ │
│  │  (JSON)     │  │ (API/Demo)  │  │  (API/Demo)         │ │
│  │             │  │             │  │                     │ │
│  └─────────────┘  └─────────────┘  └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Tech Stack:

  • Runtime: Node.js 18+
  • Language: TypeScript 5.0+
  • Protocol: Model Context Protocol (MCP) SDK
  • Storage: Local JSON files
  • APIs: Optional external scraping APIs

🧪 Development

# Clone the repo
git clone https://github.com/danishashko/competitive-intel-mcp.git
cd competitive-intel-mcp

# Install dependencies
npm install

# Build
npm run build

# Dev mode (watch)
npm run dev

# Test CLI
npm test

🗺️ Roadmap

  • [x] Core MCP server with 13 tools
  • [x] CLI interface
  • [x] Programmatic API
  • [x] External API integration
  • [x] Local JSON storage
  • [ ] SQLite backend option
  • [ ] Scheduled monitoring (cron)
  • [ ] Slack/Discord alerts for ranking changes
  • [ ] Export to CSV/JSON
  • [ ] Web dashboard
  • [ ] Multi-location SERP tracking
  • [ ] Mobile vs desktop rankings

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure to update tests as appropriate.


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


By Daniel Shashko


Made with ❤️ by Daniel Shashko