一个允许大型语言模型使用类似curl的接口向任何URL发起HTTP请求的MCP服务器。
npx @michaellatman/mcp-get@latest install @mcp-get-community/server-curl
{
"mcpServers": {
"@mcp-get-community/server-curl": {
"runtime": "node",
"command": "npx",
"args": [
"-y",
"@mcp-get-community/server-curl"
]
}
}
}
该服务器提供了一个名为curl的单一工具,接受以下参数:
url(必需):要发起请求的URLmethod(可选):使用的HTTP方法(默认:'GET')headers(可选):包含HTTP头部的对象body(可选):POST/PUT/PATCH请求的请求体timeout(可选):请求超时时间,以毫秒为单位(默认:30000,最大:300000){
"url": "https://api.example.com/data",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token123"
},
"body": "{\"key\": \"value\"}",
"timeout": 5000
}
{
"status": 200,
"statusText": "OK",
"headers": {
"content-type": "application/json",
"server": "nginx"
},
"body": "{\"result\": \"success\"}"
}
# 安装依赖
npm install
# 构建项目
npm run build
# 在开发模式下运行
npm run dev
MIT