Crawl4ai Web Crawler MCP server

Provides a bridge to the Crawl4ai web crawling service, enabling extraction of website content with configurable parameters like depth and strategy for research, data collection, or content analysis.
Back to servers
Provider
Ken Ye
Release date
Apr 21, 2025
Language
Java
Stats
1 star

jcrawl4ai-mcp-server is a Spring Boot application that serves as an MCP (Model Context Protocol) server for interacting with the Crawl4ai API. It enables web crawling functionality by providing a standardized interface to crawl specified URLs and retrieve crawling results.

Installation

Prerequisites

Before installing the jcrawl4ai-mcp-server, ensure you have:

  • Java Development Kit (JDK) installed
  • Maven for building the project

Configuration

Configure the server by updating the application.properties file located in src/main/resources/:

cawl4ai.base-url=http://your-cral4ai-server-url:11235
cawl4ai.api-token=your-api-token

Replace the placeholder values with your actual Crawl4ai server URL and API token.

Building and Running

Build and run the project using Maven:

mvn clean install
java -jar target/jcawl4ai-mcp-server-1.0.0.jar

Usage

MCP Server Configuration

To configure the server in your MCP environment, use the following configuration:

{
  "mcpServers": {
    "jcawl4ai-mcp-server": {
      "autoApprove": [
        "crawl",
        "task"
      ],
      "disabled": false,
      "timeout": 60,
      "command": "java",
      "args": [
        "-jar",
        "/path/to/your/jar/file/jcawl4ai-mcp-server-1.0.0.jar"
      ],
      "transportType": "stdio"
    }
  }
}

Replace /path/to/your/jar/file/ with the actual path to the JAR file on your system.

API Functions

The server provides two main functions:

Crawl Function

Used to crawl specified URLs with customizable parameters:

  • Parameters:

    • urls: Array of target website URLs
    • strategy: Crawling strategy
    • max_depth: Maximum depth for crawling
    • output_format: Output format for the results
  • Return Value: JSON string with the crawl result

Task Function

Retrieves crawling results for a previously initiated crawling task:

  • Parameters:

    • taskId: The ID of the task whose results you want to retrieve
  • Return Value: JSON string with the crawl result

Logging

The server logs information to ./target/mcp-stdio-server.log, which can be useful for troubleshooting.

Support

For questions or suggestions, contact Ken Ye.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later