HTTP客户端MCP服务器
提供HTTP客户端功能的模型上下文协议(MCP)服务器。
特性
- 完全支持HTTP方法(GET、POST、PUT、DELETE、PATCH、HEAD、OPTIONS)
- 自定义标题和查询参数
- 请求正文支持(JSON、表单数据、文本)
- 可配置的超时和SSL验证
- 详细的响应信息,包括状态代码和标头
Claude桌面设置
1.安装依赖项
pip install fastmcp httpx pydantic或者使用需求文件:
pip install -r requirements.txt2.配置克劳德桌面
将此服务器添加到您的Claude Desktop配置文件中:
视窗: %APPDATA%\Claude\claude_desktop_config.json\ macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"http-client": {
"command": "python",
"args": ["/path/to/http-client-mcp/src/http_client_mcp/server.py"]
}
}
}备注:替换 /path/to/http-client-mcp 使用克隆此存储库的实际位置。
3.重新启动克劳德桌面
保存配置后,重新启动Claude Desktop以加载MCP服务器。
使用示例
配置后,您可以使用这些工具:
简单GET请求:
Use the http_get tool to fetch data from https://api.github.com/users/octocat使用JSON的POST请求:
Use the http_post tool to send {"name": "test"} to https://httpbin.org/post自定义请求:
Use the http_request tool to make a PUT request to https://httpbin.org/put with custom headers可用工具
http_request-完全控制HTTP请求http_get-简化GET请求http_post-简化POST请求http_put-简化PUT请求http_delete-简化的DELETE请求http_patch-简化PATCH请求
许可证
MIT许可证-请参阅 许可证 文件以获取详细信息。
人工智能辅助开发
这个存储库是在人工智能工具的帮助下创建的。与根本不构建解决方案相比,构建解决方案所投入的时间不应超过它节省的时间。
