Web Request MCP Server
A TypeScript-based MCP server that enables AI assistants to execute HTTP requests with full control over methods, headers, and body content. It facilitates seamless interaction with web APIs and endpoints through a versatile tool that handles automatic JSON formatting and response truncation.
README
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 pairsbody(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" }
}
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.