Exposes curl functionality to make HTTP requests and download files, supporting GET, POST, PUT, DELETE methods with customizable headers, timeouts, and redirects
Curl MCP Server
An MCP (Model Context Protocol) server that exposes curl functionality to MCP clients. This server allows MCP clients to make HTTP requests and download files using the curl command-line tool.
Installation
Install the package globally to use with npx:
Or run directly with npx:
Features
This MCP server provides the following tools:
HTTP Request Tools
- curl_get: Make HTTP GET requests
- curl_post: Make HTTP POST requests with data or JSON
- curl_put: Make HTTP PUT requests with data or JSON
- curl_delete: Make HTTP DELETE requests
Utility Tools
- curl_download: Download files from URLs
- curl_advanced: Execute curl with custom arguments (with safety restrictions)
Configuration
Claude Desktop
To use with Claude Desktop, add the following to your claude_desktop_config.json
:
Other MCP Clients
For other MCP clients, configure them to run the server with:
- Command:
npx
- Arguments:
["curl-mcp"]
- Transport: stdio
Tool Documentation
curl_get
Make an HTTP GET request.
Parameters:
url
(string, required): The URL to requestheaders
(array of strings, optional): HTTP headers in format "Header: Value"follow_redirects
(boolean, optional): Whether to follow redirects (default: false)timeout
(number, optional): Request timeout in secondsuser_agent
(string, optional): Custom User-Agent string
Example:
curl_post
Make an HTTP POST request.
Parameters:
url
(string, required): The URL to post todata
(string, optional): Raw data to send in request bodyjson_data
(object, optional): JSON object to send (will be stringified)headers
(array of strings, optional): HTTP headerscontent_type
(string, optional): Content-Type headerfollow_redirects
(boolean, optional): Whether to follow redirectstimeout
(number, optional): Request timeout in seconds
Example:
curl_put
Make an HTTP PUT request. Same parameters as curl_post.
curl_delete
Make an HTTP DELETE request.
Parameters:
url
(string, required): The URL to send DELETE request toheaders
(array of strings, optional): HTTP headersfollow_redirects
(boolean, optional): Whether to follow redirectstimeout
(number, optional): Request timeout in seconds
curl_download
Download a file from a URL.
Parameters:
url
(string, required): The URL of the file to downloadoutput_filename
(string, optional): Local filename to save asresume
(boolean, optional): Resume partial download (default: false)follow_redirects
(boolean, optional): Whether to follow redirects (default: true)timeout
(number, optional): Request timeout in seconds
Example:
curl_advanced
Execute curl with custom arguments (advanced usage with safety restrictions).
Parameters:
args
(array of strings, required): Array of curl arguments (excluding 'curl' itself)
Security Note: This tool blocks potentially dangerous flags like file operations, config files, and certificate operations for security reasons.
Example:
Security Features
- Input validation and sanitization
- Restricted file operations in advanced mode
- Safe subprocess execution using spawn instead of shell execution
- No execution of arbitrary shell commands
Development
Building
Running Locally
Development Mode
Requirements
- Node.js 16 or higher
- curl command-line tool installed on the system
License
ISC
Contributing
This is an MCP server that safely exposes curl functionality. When contributing:
- Ensure all curl operations go through the
executeCurl
helper function - Never use
console.log()
- useconsole.error()
for debugging as stdout is reserved for MCP communication - Validate and sanitize all inputs before passing to curl
- Test with various MCP clients to ensure compatibility
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An MCP server that enables AI assistants to make HTTP requests and download files using curl, allowing them to interact with web APIs and content.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that helps AI assistants access text content from websites that implement bot detection, bridging the gap between what you can see in your browser and what the AI can access.Last updated -241PythonApache 2.0
- -securityAlicense-qualityAn MCP server that enables AI assistants to control a web browser through natural language commands, allowing them to navigate websites and extract information via SSE transport.Last updated -648PythonMIT License
- AsecurityFlicenseAqualityAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.Last updated -1159TypeScript
- -securityFlicense-qualityA MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.Last updated -79TypeScript