mcp-rest-api

test_request

Test a REST API endpoint and get detailed response information.

Base URL: https://api.example.com/v1

SSL Verification: Disabled (see config resource for SSL settings)

Authentication: Basic Auth with username: user_example

The tool automatically:

  • Normalizes endpoints (adds leading slash, removes trailing slashes)
  • Handles authentication header injection
  • Accepts any HTTP status code as valid
  • Limits response size to 5000 bytes (see config resource for size limit settings)
  • Returns detailed response information including:
    • Full URL called
    • Status code and text
    • Response headers
    • Response body
    • Request details (method, headers, body)
    • Response timing
    • Validation messages

Error Handling:

  • Network errors are caught and returned with descriptive messages
  • Invalid status codes are still returned with full response details
  • Authentication errors include the attempted auth method

See the config resource for all configuration options.

Input Schema

NameRequiredDescriptionDefault
bodyNoOptional request body for POST/PUT requests
endpointYesEndpoint path (e.g. "/users"). Do not include full URLs - only the path. Example: "/api/users" will resolve to "https://api.example.com/v1/api/users"
headersNoOptional request headers
methodYesHTTP method to use

Input Schema (JSON Schema)

{ "properties": { "body": { "description": "Optional request body for POST/PUT requests", "type": "object" }, "endpoint": { "description": "Endpoint path (e.g. \"/users\"). Do not include full URLs - only the path. Example: \"/api/users\" will resolve to \"https://api.example.com/v1/api/users\"", "type": "string" }, "headers": { "additionalProperties": { "type": "string" }, "description": "Optional request headers", "type": "object" }, "method": { "description": "HTTP method to use", "enum": [ "GET", "POST", "PUT", "DELETE" ], "type": "string" } }, "required": [ "method", "endpoint" ], "type": "object" }

You must be authenticated.

Other Tools