Authenticating HTTP requests made with the make_http_request
MCP tool using authenticators
make_http_request
tool in WireMock CLI provides automatic authentication support for HTTP requests through configurable authenticators.
This allows AI agents to make authenticated HTTP calls without credentials being visible to the LLM.
This is most useful when using an AI plus WireMock MCP to explore or “crawl” an API, recording it in order
to create a mock API and OpenAPI description.
For instance, if you wanted to automate the exploration of an internal microservice’s API you would first add an authenticator to your configuration file, start your AI tool, then instruct it to start
crawling the API.
hostname:port
for non-standard ports (e.g., api.example.com:8443
)hostname
for standard ports (e.g., api.example.com
for HTTPS on port 443)config.yaml
configuration file under your home directory, in the authenticators
section.
~/.wiremock/config.yaml
%USERPROFILE%\.wiremock\config.yaml
header_token
Configuration Parameters:
headerName
(string): The name of the HTTP header (e.g., “Authorization”, “X-API-Key”)prefix
(string): Optional prefix for the token value (e.g., “Bearer”, “Token”)token
(string): The authentication token valueAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
X-API-Key: sk-1234567890abcdef