curl-mcp
Provides a structured HTTP client tool for making web requests with full HTTP method support, detailed response metadata, and error handling. Enables AI assistants to interact with any web API or endpoint through the curl_request tool.
README
curl-mcp
curl-mcp is an open-source HTTP/cURL tool for the Model Context Protocol (MCP).
It provides a single tool:
curl_request– a structured HTTP client designed for AI assistants and MCP-aware development tools.
This server is intended for use with any MCP-compatible client, such as:
- ChatGPT Desktop
- Roo Code
- Cursor
- Cline
- Continue.dev
- Custom MCP agents
No client-specific configuration examples are included here — each MCP client provides its own method for adding local MCP servers.
You simply run curl-mcp, then register it inside your client.
✨ Features
-
🔌 MCP stdio server
Run locally and expose thecurl_requesttool to any MCP client. -
🧰 Full HTTP support
SupportsGET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS. -
🧱 Structured JSON responses
Includes:- HTTP status code
- status text
- headers
- raw text body
- timing metrics
- total size
- simple advice messages
-
🕒 Timeout & network error handling
UsesAbortControllerunder the hood. -
🧪 Integration-test friendly
Includes a self-describing JSON test file for humans or AI agents.
📦 Installation (from source)
npm install
npm run build
▶️ Running the MCP server
You can run curl-mcp either directly from this source repo, or via an installed CLI on your PATH.
From source (local clone)
From the root of your local curl-mcp clone:
npm run dev:stdio
This launches the curl-mcp MCP server on stdio.
Configure your MCP client to run that same command in the repo directory.
Some clients let you set the working directory explicitly; others work better if you pass a --prefix pointing at your clone.
For example, an mcpServers JSON block might look like:
{
"mcpServers": {
"curl-mcp": {
"command": "npm",
"args": [
"--prefix",
"/PATH/TO/YOUR/curl-mcp",
"run",
"dev:stdio"
]
}
}
}
Make sure the working directory for the command is the root of your local curl-mcp clone.
From CLI (curl-mcp on PATH)
If you have installed the curl-mcp CLI so that it is available on your PATH
(for example via Homebrew, npm, or another package manager), you can point your MCP client at it directly without using npm run:
{
"mcpServers": {
"curl-mcp": {
"command": "curl-mcp",
"args": []
}
}
}
Important:
MCP clients each have their own method of adding a local MCP server and choosing the working directory.
Use the examples above as a guide, but refer to your client’s documentation for the exact configuration format.
🛠 Tool: curl_request
Input (schema overview)
{
"url": "string",
"method": "GET | POST | PUT | PATCH | DELETE | HEAD | OPTIONS",
"headers": { "Header-Name": "value" },
"body": "string or null",
"timeout_seconds": 1,
"response_type": "text | json | binary (optional; default text)",
"persist_session": "boolean (optional; keep cookies in-memory for chained calls)",
"follow_redirects": "boolean (optional; default true)"
}
Output (schema overview)
{
"ok": true,
"code": 200,
"status": "OK",
"message": "Request completed successfully.",
"timing_ms": 123,
"size_bytes": 4096,
"request": { ... },
"response": {
"status_code": 200,
"status_text": "OK",
"headers": { ... },
"body": "<raw text body>",
"body_base64": "<base64 when response_type=binary>",
"cookies": ["set-cookie if present"]
},
"advice": [],
"error_type": "timeout | dns_error | connect_error | ssl_error | network_error (when applicable)",
"error_details": "raw error message when applicable"
}
Notes:
- Default
User-Agentis injected if none is provided (curl-mcp/<version>); override via headers if needed. response_typedefaults to text. Usejsonto parse/pretty-print JSON,binaryfor base64 + content-type/size metadata.persist_sessionis opt-in and keeps cookies in-memory for chained calls;follow_redirectscan be turned off to capture redirect responses.
🧪 Integration Tests
The file:
docs/integration-tests.json
contains human- and AI-readable integration scenarios such as:
- simple GET
- POST echo
- header round-trip
- timeout behaviour
- error handling
- joke/cat/dog APIs
- NASA APOD
- Weather data for London
These can be executed manually or by an MCP client/agent using curl_request.
📁 Public Project Structure
packages/
core-engine/ # HTTP engine (fetch wrapper, response shaping)
mcp-stdio/ # stdio MCP server exposing curl_request
docs/
integration-tests.json
🖥 Requirements
- Node.js 20 or later (native
fetchsupport)
🧭 Roadmap
- Optional binary/base64 response mode
- Optional JSON parse mode
- Richer advice metadata
- Simple test runner script
- Packaging for npm / Homebrew
📄 License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。