Skip to main content
Glama
Web Request MCP Server

Web Request MCP Server

by KS-GEN-AI

Web Request MCP Server

Execute HTTP requests via MCP (Model Context Protocol)

This is a TypeScript-based MCP server that provides a flexible tool to execute HTTP requests with custom methods, headers, and body content. It enables AI assistants to interact with web APIs and endpoints seamlessly.

Features

http_request

A versatile tool for making HTTP requests with full control over all parameters.

  • Purpose: Execute HTTP requests with custom configuration

  • Parameters:

    • url (required): The target URL (e.g., "https://api.example.com/endpoint")

    • method (optional): HTTP method - GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS (defaults to GET)

    • headers (optional): Custom headers as key-value pairs

    • body (optional): Request body (string or object, automatically JSON stringified for objects)

    • params (optional): URL query parameters as key-value pairs

  • Behavior:

    • Automatic Content-Type detection for JSON bodies

    • Response truncation for large responses (max 50,000 characters)

    • Comprehensive error handling with status codes

    • Returns full response including status, headers, and data

Example requests:

// Simple GET request
{ url: "https://api.github.com/users/octocat" }

// POST with JSON body
{
  url: "https://api.example.com/data",
  method: "POST",
  headers: { "Authorization": "Bearer token123" },
  body: { name: "John", email: "john@example.com" }
}

// GET with query parameters
{
  url: "https://api.example.com/search",
  params: { q: "search term", limit: "10" }
}

Related MCP server: MCP Server for Crawl4AI

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

Using with Claude Desktop

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "webrequest": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/webrequest-mcp-server/build/index.js"]
    }
  }
}

Using with Cursor

Add to your Cursor MCP settings configuration file:

{
  "mcpServers": {
    "webrequest": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/webrequest-mcp-server/build/index.js"]
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Configuration

The server configuration:

  • Max response size: 50,000 characters (responses larger than this are truncated)

  • Supported methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS

  • Content types: Automatic JSON handling, supports any content type via headers

Use Cases

This MCP server is useful for:

  • Testing and interacting with REST APIs

  • Fetching data from web services

  • Automating HTTP requests in AI workflows

  • Prototyping API integrations

  • Debugging web endpoints

License

MIT License - see LICENSE file for details

Available Tools

1 tool
http_requestA

Execute an HTTP request with custom method, URL, headers, and body. Supports GET, POST, PUT, DELETE, PATCH, and other HTTP methods. The AI can choose all parameters based on the task requirements.

Inputs: url (required), body, method, params, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no ambiguity. The tool's purpose is clearly defined for HTTP requests.

    Naming Consistency5/5

    With a single tool, naming consistency is not applicable but trivially consistent. The name 'http_request' is clear and follows a common pattern.

    Tool Count4/5

    The server has only one tool, which is minimal but arguably sufficient given the broad scope of HTTP requests it supports. It is slightly under but reasonable.

    Completeness4/5

    The tool covers all standard HTTP methods and allows custom headers and body, making it fairly complete for basic web requests. However, it may lack support for advanced features like cookie handling or redirect following.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.
      4
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      TypeScript implementation of an MCP server that provides tools for web crawling, content extraction, and browser automation, enabling AI systems to access and process web content through 15 specialized tools.
      13
      94 npm
      13
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      A TypeScript-based MCP server that enables AI agents to send messages to Microsoft Teams channels via incoming webhooks. It also includes a ping tool for health checks and connection verification.
      2,530 npm
      Apache 2.0