Skip to main content

A Model Context Protocol server providing tools to make HTTP requests (GET, POST, PUT, PATCH, DELETE)

Project description

HTTP Request MCP Server

A Model Context Protocol server that provides HTTP request capabilities. This server enables LLMs to make HTTP requests using GET, POST, PUT, PATCH, and DELETE methods.

[!CAUTION] This server can access local/internal IP addresses and may represent a security risk. Exercise caution when using this MCP server to ensure this does not expose any sensitive data.

Available Tools

  • http_get - Makes an HTTP GET request to retrieve data

    • url (string, required): URL to send GET request to
    • headers (object, optional): HTTP headers to include in the request
    • params (object, optional): Query parameters to include in the request
  • http_post - Makes an HTTP POST request to create new resources

    • url (string, required): URL to send POST request to
    • headers (object, optional): HTTP headers to include in the request
    • body (string or object, optional): Request body (sent as JSON if object)
  • http_put - Makes an HTTP PUT request to update/replace resources

    • url (string, required): URL to send PUT request to
    • headers (object, optional): HTTP headers to include in the request
    • body (string or object, optional): Request body (sent as JSON if object)
  • http_patch - Makes an HTTP PATCH request to partially update resources

    • url (string, required): URL to send PATCH request to
    • headers (object, optional): HTTP headers to include in the request
    • body (string or object, optional): Request body (sent as JSON if object)
  • http_delete - Makes an HTTP DELETE request to delete resources

    • url (string, required): URL to send DELETE request to
    • headers (object, optional): HTTP headers to include in the request

Installation

Using uv (recommended)

When using uv no specific installation is needed. We will use uvx to directly run mcp-server-http-request.

Using PIP

Alternatively you can install mcp-server-http-request via pip:

pip install mcp-server-http-request

After installation, you can run it as a script using:

python -m mcp_server_http_request

Configuration

Configure for Claude.app

Add to your Claude settings:

Using uvx
{
  "mcpServers": {
    "http-request": {
      "command": "uvx",
      "args": ["mcp-server-http-request"]
    }
  }
}
Using pip installation
{
  "mcpServers": {
    "http-request": {
      "command": "python",
      "args": ["-m", "mcp_server_http_request"]
    }
  }
}

Customization - User-agent

By default, the server uses the user-agent:

ModelContextProtocol/1.0 (HTTP-Request; +https://github.com/modelcontextprotocol/servers)

This can be customized by adding the argument --user-agent=YourUserAgent to the args list in the configuration.

Customization - Proxy

The server can be configured to use a proxy by using the --proxy-url argument.

Usage Examples

GET Request

{
  "url": "https://api.example.com/users",
  "params": {
    "page": "1",
    "limit": "10"
  },
  "headers": {
    "Authorization": "Bearer token123"
  }
}

POST Request

{
  "url": "https://api.example.com/users",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer token123"
  },
  "body": {
    "name": "John Doe",
    "email": "john@example.com"
  }
}

PUT Request

{
  "url": "https://api.example.com/users/123",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer token123"
  },
  "body": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}

PATCH Request

{
  "url": "https://api.example.com/users/123",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer token123"
  },
  "body": {
    "email": "newemail@example.com"
  }
}

DELETE Request

{
  "url": "https://api.example.com/users/123",
  "headers": {
    "Authorization": "Bearer token123"
  }
}

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx mcp-server-http-request

Or if you've installed the package in a specific directory or are developing on it:

cd path/to/mcp-server-http-request
npx @modelcontextprotocol/inspector uv run mcp-server-http-request

Development

To set up for development:

# Clone the repository
git clone <repository-url>
cd mcp-server-http-request

# Install dependencies
uv pip install -e .

License

mcp-server-http-request is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_http_request-0.1.0.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_http_request-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_http_request-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcp_server_http_request-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a162dd2bbeed4cc227a9f5f68b887f8d6f9ea6d1183142ddcd43902be2bf0416
MD5 95eacee81eca357d698451364a314fe4
BLAKE2b-256 87b8d1782ce2420a0d1c4b33a70bc74369ecef327f52f38e2613a70dbf4af826

See more details on using hashes here.

File details

Details for the file mcp_server_http_request-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_http_request-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54b046134fe37cf21169e84acc15e4103f2dfba28baa2b5464a0ee11c70340b5
MD5 cbbd06877eb00af3159e598db3e71c7e
BLAKE2b-256 b1f982c1b3b5235085d56d3d498d4465beccf1f8503d52f7ce464a51b25b7028

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page