# Cheerio MCP Server

A Model Context Protocol (MCP) server that provides web scraping capabilities using Cheerio. This server allows AI assistants to download and parse web pages into clean DOM structures with CSS class information.

## Features

- **Web Scraping**: Download and parse any webpage using the `scrape-url` tool
- **Clean DOM Output**: Returns structured HTML content with CSS classes preserved
- **MCP Compatible**: Works with any MCP-compatible AI assistant or application

## Installation

### Using npx (Recommended)

Install and run directly using npx:

```bash
npx cheerio-mcp
```

### Manual Installation

1. Install globally:
```bash
npm install -g cheerio-mcp
```

2. Run the server:
```bash
cheerio-mcp
```

## Usage

This MCP server provides the following tool:

- `scrape-url`: Downloads a webpage and parses it into a clean DOM structure with CSS class information

### Configuration

Add this server to your MCP client configuration. For example, in Claude Desktop:

```json
{
  "mcpServers": {
    "cheerio": {
      "command": "npx",
      "args": ["cheerio-mcp"]
    }
  }
}
```

## Development

To develop this package locally:

```bash
# Install dependencies
bun install

# Run in development mode
bun run src/index.ts

# Build for production
bun run build
```

## License

MIT
