NAME
mcp-http - HTTP requests with URL and method permissions
SYNOPSIS
mcp-http --stdio
mcp-http --connect http://host:port/TOKEN/http
DESCRIPTION
One MCP request tool backed by AnyEvent::HTTP. HTTP methods are permission actions. URL scopes: exact URL, path with any query, origin, hostname, hostname and subdomains, or any HTTP(S) URL.
Supply a cookie_jar from an earlier response to continue a session; the server keeps no cookies. This uses AnyEvent::HTTP's simplified jar, not a full browser cookie implementation. Treat the jar as confidential.
Responses include status, headers, UTF-8 body or Base64 bytes. Optional grep keeps lines containing a literal string; regex keeps lines matching a Perl regex; substitute replaces regex matches with literal replacement text. max_bytes bounds downloads and truncated reports partial results.
Redirects and retries are disabled. HTTPS verifies certificates. Network access is NOT sandboxed; permitted names can reach local or private hosts. HTTP failures do not prove that a write did not happen.
TOOL
- request
-
Required
url. Optionalmethod(GET),headers, UTF-8bodyorbody_base64,cookie_jar,timeout(30s inactivity),max_bytes(65536 default, 2097152 maximum),grep,regex, andsubstitutewithpatternandreplacement. Responses containcaptured_bytesandtruncated. Replacement text is literal.
PERMISSIONS
Profile http-NAME. Rules match HTTP method as action and URL as match.url. Hostname and subdomain scopes are textual DNS suffixes, not organizational or public-suffix boundaries. No sandbox grants.
OPTIONS
Common options: "mcp_getoptions" in AnyEvent::MCP::Server::Simple.