# Mavi Firecrawl - MCP Server

A Model Context Protocol (MCP) server for web search and scraping using Firecrawl API.

## Features

- **Search**: Search the web using Firecrawl's powerful search API
- **Scrape**: Extract content from any URL in markdown or HTML format

## Installation
```bash
pip install mavi-firecrawl
```

## Setup

### 1. Get Firecrawl API Key

1. Visit https://firecrawl.dev
2. Sign up for an account
3. Get your API key from the dashboard

### 2. Set Environment Variable

**On Mac/Linux:**
```bash
export FIRECRAWL_API_KEY="your-api-key-here"
```

**On Windows:**
```cmd
set FIRECRAWL_API_KEY=your-api-key-here
```

**Permanently (add to ~/.bashrc or ~/.zshrc):**
```bash
echo 'export FIRECRAWL_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrc
```

## Usage

Run the server:
```bash
mavi-firecrawl
```

## Available Tools

### 1. search
Search the web using Firecrawl API.

**Parameters:**
- `query` (string, required): Search query
- `limit` (number, optional): Maximum results to return (default: 5)

**Example:**
```python
{
  "query": "Python programming",
  "limit": 5
}
```

### 2. scrape
Extract content from a URL using Firecrawl API.

**Parameters:**
- `url` (string, required): URL to scrape
- `formats` (array, optional): Output formats like ["markdown", "html"] (default: ["markdown"])

**Example:**
```python
{
  "url": "https://example.com",
  "formats": ["markdown"]
}
```

## Use with Claude Desktop

### 1. Set API Key
First, make sure your API key is set in the environment.

### 2. Configure Claude Desktop

Edit `claude_desktop_config.json`:

**macOS:**
```bash
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
```

**Add this configuration:**
```json
{
  "mcpServers": {
    "mavi-firecrawl": {
      "command": "mavi-firecrawl",
      "env": {
        "FIRECRAWL_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

### 3. Restart Claude Desktop

### 4. Test
Ask Claude:
- "Search for information about Python programming"
- "Scrape the content from https://example.com"

## Requirements

- Python 3.10+
- Firecrawl API key
- requests library
- mcp library

## API Documentation

For more information about Firecrawl API, visit: https://docs.firecrawl.dev

## Version

1.0.0

## License

MIT
