mcp-fetch mcp

v1.0.1 · MCP Tool · network · registry.pascalai.org

General-purpose HTTP client. Supports GET, POST, PUT, PATCH, DELETE, HEAD. Custom headers, body, timeout. Returns status, ok, content_type, body, elapsed_ms, response_headers.

fetchhttpgetpostrequesturlclient

Input Parameters

ParameterTypeDescription
urlrequired string Target URL (must include https:// or http://)
methodoptional string HTTP method: GET, POST, PUT, PATCH, DELETE, HEAD (default: GET)
bodyoptional string Request body for POST/PUT/PATCH
contentTypeoptional string Content-Type header (default: application/json for POST/PUT/PATCH)
headersoptional string Extra request headers as JSON object string: {"Authorization": "Bearer token"}
timeoutoptional integer Request timeout in seconds (default: 30) Default: 30.
maxBodySizeoptional integer Maximum response body characters to return (default: 524288) Default: 524288.

Output Fields

FieldTypeDescription
url string
method string
status integer
ok boolean
content_type string
body_length integer
truncated boolean
elapsed_ms integer
response_headers object
body string

Examples

GET a URL

// Input
{
  "url": "https://api.github.com/users/octocat"
}

// Output
{
  "status": 200,
  "ok": true,
  "body": "{\"login\":\"octocat\",...}"
}

POST JSON data

// Input
{
  "url": "https://httpbin.org/post",
  "method": "POST",
  "body": "{\"key\":\"value\"}"
}

// Output
{
  "status": 200,
  "ok": true,
  "body": "..."
}

Install & Discovery

Install

ppm install mcp-fetch

Get JSON Schema

GET /v1/packages/mcp-fetch/1.0.1/schema

Discover by keyword

GET /v1/mcp/discover?q=fetch
Discovery hint: Install with ppm install mcp-fetch or invoke remotely via POST /v1/invoke/mcp-fetch on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-fetch');
var R := Tool.Call(JsonObj(['url','https://api.github.com/users/octocat']));
Writeln(R['status']);