mcp-rest-api

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AUTH_BEARERNoBearer token for token-based authentication
REST_BASE_URLNoBase URL for the REST API (e.g., https://api.example.com)
AUTH_APIKEY_VALUENoAPI key value for API key authentication
AUTH_BASIC_PASSWORDNoPassword for Basic Authentication
AUTH_BASIC_USERNAMENoUsername for Basic Authentication
REST_ENABLE_SSL_VERIFYNoEnable or disable SSL verification for self-signed certificatestrue
AUTH_APIKEY_HEADER_NAMENoHeader name for API key authentication (e.g., X-API-Key)
REST_RESPONSE_SIZE_LIMITNoMaximum response size in bytes10000

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
REST API Usage ExamplesDetailed examples of using the REST API testing tool
Response Format DocumentationDocumentation of the response format and structure
Configuration DocumentationDocumentation of all configuration options and how to use them

Tools

Functions exposed to the LLM to take actions

NameDescription
test_request

Test a REST API endpoint and get detailed response information. Base URL: https://api.example.org/v2 | SSL Verification enabled (see config resource for SSL settings) | Authentication: No authentication configured | No custom headers defined (see config resource for headers) | The tool automatically: - Normalizes endpoints (adds leading slash, removes trailing slashes) - Handles authentication header injection - Applies custom headers from HEADER_* environment variables - Accepts any HTTP status code as valid - Limits response size to 10000 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, including header configuration.