Metadata-Version: 2.4
Name: datacore-mcp
Version: 0.1.0
Summary: Model Context Protocol server exposing the DataCore web-data API
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.2
Requires-Dist: httpx>=0.27

# datacore-mcp

[Model Context Protocol](https://modelcontextprotocol.io) server that exposes
the [DataCore](https://data.dataleads.pro) web-data API as MCP tools: page
fetching, Markdown conversion, metadata extraction, crawling, Google SERP
(search / news / local), product and Amazon data, price tracking, technology
detection, company intelligence, page diffing, job searches, and real-estate
listings.

## Install

```bash
pip install -e /path/to/datacore-mcp
```

Python 3.10+ is required. This installs the `datacore-mcp` console command
(equivalent to `python -m datacore_mcp.server`).

## Configuration

| Env var | Required | Description |
|---|---|---|
| `DATACORE_KEY` | yes | DataCore client key. Sent as `clientKey` in the JSON body of POST endpoints and as `X-RapidAPI-Proxy-Secret` for `/v1/usage`. |
| `DATACORE_BASE_URL` | no | API base URL, defaults to `https://data.dataleads.pro`. |

## Tools

| Tool | Description |
|---|---|
| `fetch_page(url)` | Raw HTML, metadata, cookies, timing |
| `page_markdown(url)` | Page content as Markdown |
| `extract_metadata(url)` | Title, description, links, language |
| `crawl_site(url, max_pages=5)` | Crawl a site (1-10 pages) |
| `serp_search(query, country='', language='')` | Google organic results |
| `serp_news(query, country='', language='')` | Google News results |
| `serp_local(query, country='', language='')` | Google local results |
| `get_product(url)` | Product name, price, currency, stock |
| `amazon_search(query)` | Amazon product search |
| `amazon_product(url)` | Amazon product details |
| `track_price(url)` | Price + change since previous check |
| `detect_tech(url)` | Technologies used by a site |
| `company_profile(url)` | Name, emails, social links, technologies |
| `page_diff(url)` | Changed flag, content hash, previous check |
| `get_jobs(url)` | Jobs on a careers page |
| `search_indeed(query)` | Indeed job search |
| `search_linkedin(query)` | LinkedIn job search |
| `real_estate(url)` | Real-estate listings |
| `usage_stats()` | Per-key/endpoint API usage |
| `health()` | Service health (no key needed) |

## Claude Desktop configuration

Add to `claude_desktop_config.json` (Settings → Developer → Edit Config),
setting `DATACORE_KEY` to your client key:

```json
{
  "mcpServers": {
    "datacore": {
      "command": "python",
      "args": ["-m", "datacore_mcp.server"],
      "env": {
        "DATACORE_KEY": "your-client-key",
        "DATACORE_BASE_URL": "https://data.dataleads.pro"
      }
    }
  }
}
```

If the package lives in a specific interpreter, point `command` at that
`python` (or a venv binary) where `datacore-mcp` is installed.

### Quick check

```bash
DATACORE_KEY=your-key python -c "import datacore_mcp.server as s; print(s.mcp)"
```

## License

MIT
