scraperis mcp
Enables extracting data from websites using natural language prompts, allowing users to specify exactly what content they want in plain English and returning structured JSON data.
Enables extracting data from websites using natural language prompts, allowing users to specify exactly what content they want in plain English and returning structured JSON data.
A Model Context Protocol (MCP) integration for Scraper.is - A powerful web scraping tool for AI assistants.
This package allows AI assistants to scrape web content through the MCP protocol, enabling them to access up-to-date information from the web.
npm install -g scraperis-mcp
Or with yarn:
yarn global add scraperis-mcp
You need a Scraper.is API key to use this package.
Create a .env
file with your Scraper.is API key:
SCRAPERIS_API_KEY=your_api_key_here
To use this package with Claude Desktop:
Install the package globally:
npm install -g scraperis-mcp
Add the following configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"scraperis_scraper": {
"command": "scraperis-mcp",
"args": [],
"env": {
"SCRAPERIS_API_KEY": "your-api-key-here",
"DEBUG": "*"
}
}
}
}
Replace your-api-key-here
with your actual Scraper.is API key.
Restart Claude Desktop to apply the changes.
For development and testing, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector scraperis-mcp
This package is designed to be used with AI assistants that support the Model Context Protocol (MCP). When properly configured, the AI assistant can use the following tools:
The scrape
tool allows the AI to extract content from websites. It supports various formats:
markdown
: Returns the content in markdown formathtml
: Returns the content in HTML formatscreenshot
: Returns a screenshot of the webpagejson
: Returns structured data in JSON formatExample prompt for the AI:
Can you scrape the latest news from techcrunch.com and summarize it for me?
Scrapes content from a webpage based on a prompt.
Parameters:
prompt
(string): The prompt describing what to scrape, including the URLformat
(string): The format to return the content in (markdown
, html
, screenshot
, json
, quick
)Example:
{
"prompt": "Get me the top 10 products from producthunt.com",
"format": "markdown"
}
Clone the repository:
git clone https://github.com/Ai-Quill/scraperis-mcp.git
cd scraperis-mcp
Install dependencies:
npm install
Build the project:
npm run build
npm run build
: Build the projectnpm run watch
: Watch for changes and rebuildnpm run dev
: Run with MCP Inspector for developmentnpm run test
: Run testsnpm run lint
: Run ESLintContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
[
{
"description": "Extract data from websites using natural language prompts. The prompt should include the website URL and what data you want to extract. For example: 'Get me the top 10 products from producthunt.com' or 'Extract all article titles and authors from techcrunch.com/news'",
"inputSchema": {
"properties": {
"parse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": {
"path": "yarn.lock",
"type": "blob"
},
"description": "Should result be parsed. If result should not be parsed then html will be stripped and converted to markdown file",
"title": "Parse"
},
"prompt": {
"description": "Natural language prompt describing what to extract and from where. For example: 'Get me the top 10 products from producthunt.com' or 'Find all articles about AI from techcrunch.com'",
"title": "Prompt",
"type": "string"
}
},
"required": [
"prompt"
],
"title": "scrape_urlArguments",
"type": "object"
},
"name": "scraperis_scraper"
}
]