http-client-mcp-server

rohitpatilll/http-client-mcp-server

3.3

If you are the rightful owner of http-client-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A comprehensive MCP server for making HTTP requests with all HTTP methods.

Tools
4
Resources
0
Prompts
0

HTTP Client MCP Server

A comprehensive MCP server for making HTTP requests with all HTTP methods. Provides tools for GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS and custom HTTP methods with full request/response handling.

Features

  • Universal HTTP request tool supporting all methods
  • Simplified GET and POST convenience methods
  • Configurable default headers for all requests
  • Complete request/response details including status, headers, and body
  • Support for query parameters, custom headers, and authentication
  • Request timeout and redirect handling
  • JSON and plain text response parsing
  • Comprehensive error handling

Tools Available

http_request

Universal HTTP client supporting all methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, etc.).

Example:

{
  "url": "https://api.example.com/users",
  "method": "POST",
  "headers": {"Authorization": "Bearer token123"},
  "body": "{\"name\": \"John\", \"email\": \"john@example.com\"}",
  "query_params": {"format": "json"}
}

http_get

Simplified GET request method for fetching data from APIs and web endpoints.

Example:

{
  "url": "https://jsonplaceholder.typicode.com/posts/1",
  "headers": {"Accept": "application/json"},
  "query_params": {"_format": "json"}
}

http_post

Simplified POST request method for sending data to servers with automatic Content-Type handling.

Example:

{
  "url": "https://api.example.com/posts",
  "data": "{\"title\": \"Hello World\", \"body\": \"This is a test post\"}",
  "content_type": "application/json",
  "headers": {"Authorization": "Bearer token123"}
}

set_default_headers

Configure default headers that will be included in all subsequent HTTP requests.

Example:

{
  "headers": {
    "Authorization": "Bearer your-api-key",
    "User-Agent": "MyApp/1.0"
  },
  "merge": true
}

Installation

npm install

Usage

With MCP Inspector

npm run inspector

With Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "http-client": {
      "command": "node",
      "args": ["[absolute-path-to-directory]/server.js"]
    }
  }
}

Requirements

  • Node.js 18+
  • @modelcontextprotocol/sdk ^0.5.0

Structure

  • server.js - Main MCP server implementation
  • package.json - Node.js package configuration
  • README.md - Documentation
  • description.md - Brief server description

Testing

The server has been tested with:

  • GET requests to public APIs
  • POST requests with JSON and form data
  • Custom headers and authentication
  • Query parameter handling
  • Error scenarios and timeout handling
  • Default header configuration

Generated by MCP Server Generator