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.
Before installing the jcrawl4ai-mcp-server, ensure you have:
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.
Build and run the project using Maven:
mvn clean install
java -jar target/jcawl4ai-mcp-server-1.0.0.jar
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.
The server provides two main functions:
Used to crawl specified URLs with customizable parameters:
Parameters:
urls
: Array of target website URLsstrategy
: Crawling strategymax_depth
: Maximum depth for crawlingoutput_format
: Output format for the resultsReturn Value: JSON string with the crawl result
Retrieves crawling results for a previously initiated crawling task:
Parameters:
taskId
: The ID of the task whose results you want to retrieveReturn Value: JSON string with the crawl result
The server logs information to ./target/mcp-stdio-server.log
, which can be useful for troubleshooting.
For questions or suggestions, contact Ken Ye.
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.
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"
]
}
}
}
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.
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.