根据上面的信息,执行如下指令:
一个MCP服务器,允许大型语言模型(LLMs)通过类似curl的接口向任何URL发出HTTP请求。
功能
- 向任何URL发送HTTP请求
- 支持所有常见的HTTP方法(GET、POST、PUT、DELETE、PATCH、HEAD、OPTIONS)
- 可定制的头部和请求体
- 可配置的超时时间
- 完整的响应信息,包括状态、头部和主体
安装
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头的对象bodyPOST/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\"}"
}开发
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev许可证
麻省理工学院
