exposes libcurl capabilities as tools.
296
An MCP (Model Context Protocol) server that exposes libcurl capabilities as tools. Built on curl_cffi, it supports browser fingerprint impersonation for HTTP/HTTPS and direct low-level access to FTP, SMTP, IMAP, SFTP, WebSocket, and MQTT protocols.
| Tool | Description |
|---|---|
open_url | Fetch a URL; stores HTML, cookies, and request/response headers. Supports browser impersonation to bypass TLS fingerprinting. |
get_snapshot | Return the HTML source of the last fetched page. |
find_element | Query the last page with a CSS selector; returns matching element HTML, text, and attributes. |
get_cookies | List all stored cookies. |
set_cookie | Add or update a cookie in persistent storage. |
delete_cookies | Delete all stored cookies. |
get_network_requests | Return the log of tracked network requests from the last session. |
| Tool | Description |
|---|---|
ftp_list | List a directory. URL must end with / (e.g. ftp://ftp.example.com/pub/). |
ftp_download | Download a file. Binary files are returned as base64. |
| Tool | Description |
|---|---|
smtp_send | Send an email. Accepts from_addr, to_addrs list, subject, and body. |
| Tool | Description |
|---|---|
imap_list | List mailboxes or messages. URL format: imap://host/INBOX. |
imap_fetch | Fetch a message by UID. URL format: imap://host/INBOX;UID=1. |
| Tool | Description |
|---|---|
sftp_download | Download a file or list a directory (trailing /). Supports password and private key auth. |
| Tool | Description |
|---|---|
ws_send_receive | Connect, send a text frame, and return the server's response. Accepts optional HTTP headers for the handshake. |
| Tool | Description |
|---|---|
mqtt_publish | Publish a payload to a topic. URL encodes the topic: mqtt://broker/my/topic. |
mqtt_subscribe | Subscribe to a topic and return one received message. |
Copy .env.example to .env and adjust as needed:
# Bearer token required on all requests except /health (leave blank to disable auth)
AUTH_TOKEN=your-secret-token-here
# Browser to impersonate for HTTP/HTTPS requests
# Options: chrome131, chrome124, firefox133, safari17_0, edge101, ...
IMPERSONATE=chrome131
# Optional proxy for HTTP/HTTPS traffic
# HTTP_PROXY=http://proxy.example.com:8080
# HTTPS_PROXY=http://proxy.example.com:8080
# NO_PROXY=localhost,127.0.0.1,.local
DEBUG=false
docker build -f Dockerfile.ubuntu -t curl-mcp .
docker run -d \
--name curl_mcp \
-p 8000:8000 \
-v $(pwd)/storage:/app/storage \
-e AUTH_TOKEN=your-secret-token \
curl-mcp
cp .env.example .env
# edit .env as needed
docker compose up -d
Check health:
curl http://localhost:8000/health
View logs:
docker compose logs -f
Stop:
docker compose down
The server uses SSE transport. Configure your MCP client with:
URL: http://localhost:8000/sse
Header: Authorization: Bearer <AUTH_TOKEN>
claude_desktop_config.json){
"mcpServers": {
"curl-mcp": {
"url": "http://localhost:8000/sse",
"headers": {
"Authorization": "Bearer your-secret-token"
}
}
}
}
Fetch a web page with Chrome impersonation:
{"name": "open_url", "arguments": {"url": "https://example.com", "impersonate": "chrome131"}}
FTP directory listing:
{"name": "ftp_list", "arguments": {"url": "ftp://ftp.gnu.org/"}}
Send email:
{
"name": "smtp_send",
"arguments": {
"url": "smtp://mail.example.com",
"from_addr": "[email protected]",
"to_addrs": ["[email protected]"],
"subject": "Hello",
"body": "Message body.",
"username": "[email protected]",
"password": "secret"
}
}
WebSocket echo:
{"name": "ws_send_receive", "arguments": {"url": "wss://echo.example.com/", "message": "ping"}}
MQTT publish:
{"name": "mqtt_publish", "arguments": {"url": "mqtt://broker.example.com/sensors/temp", "payload": "23.5"}}
Install dependencies and run tests:
pip install -r requirements.txt
pytest
Run the server locally (without Docker):
uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload
Cookies and page snapshots are persisted in a SQLite database at ./storage/curl_mcp.db. The Docker volume mount (-v $(pwd)/storage:/app/storage) keeps this data across container restarts.
Content type
Image
Digest
sha256:1388b4068…
Size
200.4 MB
Last updated
6 months ago
docker pull superbizon007/curl-mcp