Katana MCP Server
Integrates ProjectDiscovery's Katana web crawler with Claude Desktop, enabling users to crawl websites, discover endpoints and hidden resources, extract JavaScript files, and perform reconnaissance with customizable depth, scope, and filtering options.
README
Katana MCP Server
MCP Server để tích hợp Katana web crawler của ProjectDiscovery với Claude Desktop.
Giới thiệu
Katana là một công cụ web crawling mạnh mẽ từ ProjectDiscovery, được thiết kế để khám phá các endpoints, đường dẫn và tài nguyên ẩn trên các trang web. MCP Server này cho phép Claude Desktop sử dụng Katana thông qua Model Context Protocol.
Yêu cầu
- Python 3.10 trở lên
- Go 1.21 trở lên (để cài đặt Katana)
- Katana đã được cài đặt
Cài đặt
1. Cài đặt Katana
go install github.com/projectdiscovery/katana/cmd/katana@latest
Kiểm tra cài đặt:
katana --version
2. Cài đặt MCP Server
Clone repository này hoặc tải về code, sau đó:
cd katana-server
pip install -r requirements.txt
3. Cấu hình Claude Desktop
Mở Claude Desktop và điều hướng đến:
- File → Settings → Developer → Edit Config
Thêm cấu hình sau vào file config (thường ở %APPDATA%\Claude\claude_desktop_config.json trên Windows):
{
"mcpServers": {
"katana": {
"command": "python",
"args": [
"/path/to/katana-server/katana_server.py"
]
}
}
}
Lưu ý: Thay đổi đường dẫn /path/to/katana-server/katana_server.py cho phù hợp với hệ thống của bạn.
Trên Windows: Bạn có thể cần sử dụng đường dẫn đầy đủ đến Python:
{
"mcpServers": {
"katana": {
"command": "C:\\Python311\\python.exe",
"args": [
"C:\\path\\to\\katana-server\\katana_server.py"
]
}
}
}
Trên macOS/Linux:
{
"mcpServers": {
"katana": {
"command": "python3",
"args": [
"/path/to/katana-server/katana_server.py"
]
}
}
}
4. Khởi động lại Claude Desktop
Sau khi cấu hình, khởi động lại Claude Desktop để áp dụng thay đổi.
Sử dụng
Sau khi cấu hình thành công, bạn có thể yêu cầu Claude sử dụng Katana để crawl các trang web:
Ví dụ sử dụng:
-
Crawl một URL đơn giản:
Hãy crawl trang web https://example.com bằng Katana -
Crawl với các tùy chọn:
Crawl https://example.com với độ sâu 3, sử dụng headless browser và crawl JavaScript -
Crawl nhiều URLs:
Crawl các URLs sau: https://example.com, https://test.com với độ sâu 2 -
Kiểm tra version Katana:
Kiểm tra phiên bản Katana đã cài đặt
Các Tools có sẵn
1. katana_crawl
Crawl một URL hoặc danh sách URLs với các tùy chọn (đã được tinh chỉnh mạnh cho pentest):
url: URL mục tiêu (bắt buộc, nếu không dùngurls)urls: Danh sách URLs (tùy chọn, thay thế chourl)depth: Độ sâu crawl (mặc định: 5)concurrency: Số requests đồng thời (mặc định: 10)scope: Phạm vi crawl -subs,folder,domain,any(mặc định:folder)headless: Sử dụng headless browser (mặc định: true, bật-hl)js_crawl: Crawl JavaScript files (mặc định: true, bật-jc)js_links: Crawl JavaScript links (mặc định: true, bật-jsl)xhr: Crawl XHR requests (mặc định: true, bật-xhr)keep_form_data: Giữ form data (mặc định:all, tương ứng-kf all)form_extract: Trích xuất form (mặc định: true, bật-fx)form_submit: Kiểu submit form (mặc định:dn, tương ứng-fs dn)filter_format: Định dạng filter output (mặc định:qurl, tương ứng-f qurl)form_fill: Tự động điền form (ví dụ:"username=admin&password=admin")output_format:jsonhoặctext(mặc định:json)store_response: Lưu response body (mặc định:false, bật-store-responsenếutrue)store_response_dir: Thư mục lưu responses (kết hợp vớistore_response)filter_status: Lọc theo status code (ví dụ:"200,301,302", tương ứng-fc)filter_regex: Lọc URLs theo regex riêng (được map sang flag khác để tránh xung đột với-f qurl)exclude_regex: Loại trừ URLs theo regex riêngexclude_file_extensions: Danh sách đuôi file cần bỏ qua (mặc định:woff,css,png,svg,jpg,woff2,jpeg,gif,svg, tương ứng-ef)
2. katana_crawl_from_file
Crawl từ file chứa danh sách URLs:
file_path: Đường dẫn đến file (bắt buộc)depth: Độ sâu crawl (mặc định: 5)concurrency: Số requests đồng thời (mặc định: 10)scope: Phạm vi crawl (subs,folder,domain,any, mặc định:folder)output_format: Định dạng output (jsonhoặctext, mặc định:json)
3. katana_check_version
Kiểm tra phiên bản Katana đã cài đặt.
4. katana_download_js
Chạy Katana để crawl, lọc toàn bộ URL file JavaScript (.js) và tải toàn bộ file JS đó về thư mục trên máy:
url: URL gốc để crawl JS (ví dụ:https://example.com)urls: Danh sách nhiều URL để crawl JS (mỗi phần tử là một URL)file_path: Đường dẫn đến file chứa danh sách URL (mỗi dòng một URL)depth: Độ sâu crawl (mặc định: 5)scope: Phạm vi crawl (subs,folder,domain,any, mặc định:folder)concurrency: Số lượng requests đồng thời của Katana (mặc định: 10)output_dir: Thư mục để lưu các file JS tải về (mặc định:katana_js_downloads)timeout: Timeout (giây) cho mỗi request tải JS (mặc định: 20)max_files: Giới hạn số lượng file JS tối đa cần tải (mặc định: 200,0= không giới hạn)
Kết quả trả về sẽ bao gồm:
- Tổng số URL
.jsphát hiện được từ Katana - Số file JS đã cố gắng tải / tải thành công / bị lỗi
- Thư mục lưu file JS
- Một số file JS đã tải và một số lỗi (nếu có)
Ví dụ nâng cao
Crawl với JavaScript và Headless Browser:
Crawl https://example.com với headless browser, crawl JavaScript files, độ sâu 3
Crawl và lưu responses:
Crawl https://example.com và lưu tất cả responses vào thư mục ./responses
Crawl với filter:
Crawl https://example.com và chỉ lấy các URLs có status code 200 hoặc 301
Troubleshooting
Lỗi: "Katana chưa được cài đặt"
- Đảm bảo Katana đã được cài đặt và có trong PATH
- Kiểm tra bằng lệnh:
katana --version
Lỗi: "Command not found"
- Kiểm tra đường dẫn đến Python trong config
- Đảm bảo file
katana_server.pycó quyền thực thi
Lỗi kết nối MCP
- Khởi động lại Claude Desktop
- Kiểm tra log trong Claude Desktop để xem lỗi chi tiết
- Đảm bảo Python và các dependencies đã được cài đặt đúng
Tài liệu tham khảo
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.