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

xcrawl-mcp

v1.0.6

Published

Model Context Protocol (MCP) server for XCrawl. It exposes scraping, search, map, and crawl tools to MCP clients.

Downloads

487

Readme

XCrawl MCP Server

Model Context Protocol (MCP) server for XCrawl. It exposes scraping, search, map, and crawl tools to MCP clients.

Table of Contents

Prerequisites

Remote Hosted URL

Use the hosted MCP endpoint:

https://mcp.xcrawl.com/{XCRAWL_API_KEY}/mcp

You can pass the API key in the URL path:

https://mcp.xcrawl.com/{XCRAWL_API_KEY}/mcp

Or via headers. Supported methods:

Authorization: Bearer {XCRAWL_API_KEY}
x-api-key: {XCRAWL_API_KEY}
x-xcrawl-api-key: {XCRAWL_API_KEY}

Quick Start (Stdio)

Run directly with npx:

XCRAWL_API_KEY=YOUR_API_KEY npx -y xcrawl-mcp

Or install globally:

npm install -g xcrawl-mcp
XCRAWL_API_KEY=YOUR_API_KEY xcrawl-mcp

Claude Desktop Configuration

Add to Claude Desktop config:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Use the hosted MCP endpoint:

{
  "mcpServers": {
    "xcrawl": {
      "url": "https://mcp.xcrawl.com/{XCRAWL_API_KEY}/mcp"
    }
  }
}

Or run locally:

{
  "mcpServers": {
    "xcrawl": {
      "command": "npx",
      "args": ["-y", "xcrawl-mcp"],
      "env": {
        "XCRAWL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Authentication

Stdio mode

Use environment variable:

  • XCRAWL_API_KEY (required)

Hosted / Workers mode

Pass API key using one of these methods:

  1. URL path: https://mcp.xcrawl.com/{XCRAWL_API_KEY}/mcp
  2. Authorization: Bearer {XCRAWL_API_KEY}
  3. x-api-key: {XCRAWL_API_KEY}
  4. x-xcrawl-api-key: {XCRAWL_API_KEY}

Available Tools

| Tool | Purpose | |------|---------| | xcrawl_scrape | Scrape a single page | | xcrawl_check_status | Check async scrape status | | xcrawl_search | Google SERP search | | xcrawl_map | Discover URLs from a site | | xcrawl_crawl | Async multi-page crawl | | xcrawl_check_crawl_status | Check async crawl status | | xcrawl_key_status | Check whether the current API key is valid and has remaining credits |

xcrawl_scrape

Basic request:

{
  "url": "https://example.com"
}

With extraction (json.prompt and json.json_schema are optional):

{
  "url": "https://example.com",
  "output": {
    "formats": ["json"],
    "json": {
      "prompt": "Extract product name and price",
      "json_schema": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "price": { "type": "number" }
        }
      }
    }
  }
}

xcrawl_check_status

{
  "scrape_id": "abc-123-def-456"
}

Possible values: pending, crawling, completed, failed.

xcrawl_search

{
  "query": "latest AI news",
  "location": "New York",
  "language": "en",
  "limit": 10
}

xcrawl_map

{
  "url": "https://example.com",
  "filter": "blog/.*",
  "limit": 1000,
  "include_subdomains": true,
  "ignore_query_parameters": true
}

xcrawl_crawl

{
  "url": "https://example.com",
  "crawler": {
    "limit": 100,
    "include": ["products/.*"],
    "exclude": ["admin/.*", "login/.*"],
    "max_depth": 3
  },
  "output": {
    "formats": ["markdown"]
  }
}

xcrawl_check_crawl_status

{
  "crawl_id": "xyz-789-abc-012"
}

Possible values: pending, crawling, completed, failed.

xcrawl_key_status

{}

Returns key validity and current credit status, including:

  • status
  • valid
  • authorized
  • has_credits
  • remain_credits
  • expire_at
  • expired_at (UTC ISO-8601)
  • uid
  • username
  • concurrent
  • message

Request Defaults

Common defaults: Defaults may vary by API version.

| Parameter | Default | Notes | |-----------|---------|-------| | mode | "sync" | Scrape only | | proxy.location | "US" | ISO-3166-1 alpha-2 | | location | "US" | Search only | | request.device | "desktop" | desktop or mobile | | request.only_main_content | true | Main content filtering | | request.block_ads | true | Ad blocking | | request.skip_tls_verification | true | Skip TLS verification | | js_render.enabled | true | JavaScript rendering | | js_render.wait_until | "load" | load, domcontentloaded, networkidle | | output.formats | [] | If omitted or [], returns metadata only | | output.screenshot | "viewport" | viewport or full_page | | output.json.prompt | - | Optional | | output.json.json_schema | - | Optional | | webhook.events | ["started","completed","failed"] | Optional callback events |

Preflight Checks

Before executing high-cost tools, the MCP server performs a key and credits preflight check.

Current tools with preflight checks:

  • xcrawl_scrape
  • xcrawl_search
  • xcrawl_map
  • xcrawl_crawl

The preflight check verifies:

  • the current API key is valid
  • the current API key is authorized
  • the account still has remaining credits

Error Format

Errors are returned in MCP format:

{
  "content": [
    {
      "type": "text",
      "text": "Error: XCrawl API error: 401 Unauthorized - Invalid API key"
    }
  ],
  "isError": true
}

Development

npm install
npm run build
XCRAWL_API_KEY=YOUR_API_KEY npm run start:stdio:dev

npm run dev
curl http://localhost:8787/health

License

MIT

Support

  • XCrawl API: xcrawl.com
  • MCP Server: Open an issue in this repository