logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-http-adapter

A Node.js/TypeScript server component for the Model Context Protocol (MCP) designed to facilitate direct interaction and remote testing of arbitrary Representational State Transfer (REST) Application Programming Interfaces (APIs) from within a development or client environment, leveraging Cline command-line utility integration.

Author

mcp-http-adapter logo

dkmaker

MIT License

Quick Info

GitHub GitHub Stars 71
NPM Weekly Downloads 524
Tools 1
Last Updated 2026-02-19

Tags

apimcptypescriptmcp restrestful servicesmcp server

Security Audit Seal

RESTful Service Interaction Module for MCP

License: MIT NPM Registry Version Smithery Integration Status

This utility furnishes an MCP-compliant backend server, constructed with TypeScript, enabling developers to execute and scrutinize HTTP requests against external RESTful endpoints via command-line interface (Cline) operations.

Server Status Dashboard

Deployment Instructions

Automatic Integration via Smithery

For streamlined, automated deployment into your Claude Desktop environment using Smithery, execute the following command:

npx -y @smithery/cli install dkmaker-mcp-rest-api --client claude

Manual Installation Steps

  1. Install the published package globally on your system:
npm install -g dkmaker-mcp-rest-api
  1. Update Cline's Configuration Directives:

To enable Cline's language model to invoke this server module effectively, inject the subsequent directives into Cline's Custom Instructions panel (accessible via Settings > Custom Instructions):

# HTTP Request Utility Configuration

The `test_request` function is the exposed interface for conducting tests, debugging interactions, and querying any external RESTful resource. It yields granular data concerning the request execution and manages security credential injection automatically.

## Appropriate Use Cases

- Validating specific API entry points.
- Analyzing raw response payloads and metadata.
- Confirming backend service behavior.
- Benchmarking endpoint latency.
- Schema validation of input/output structures.
- Interfacing with local/staging API infrastructure.
- Testing complex, chained API interactions.
- Assessing error handling responses (e.g., 4xx, 5xx).

## Core Capabilities

- Full support for all primary HTTP verbs: GET, POST, PUT, DELETE, PATCH.
- Seamless integration of security credentials (Basic Auth, Bearer Tokens, Custom API Keys).
- Endpoint path normalization.
- Rich output detailing status codes, headers, and response content.
- Optional configuration for SSL certificate validation and response payload size caps.

## Reference Documentation

Consult these supplementary guides for deeper technical knowledge:

- examples: Demonstrations of common usage patterns.
- response-format: Schema definition for the returned data structure.
- config: Comprehensive list of environment variables for server customization.

These resources illuminate usage paradigms, output specifications, and setup parameters.

## Critical Operational Notes

- Always cross-reference expected API behavior against observed outcomes.
- Exercise caution when handling sensitive data transmitted via this utility.
- Be mindful of target API rate restrictions.
- Server configuration changes require a restart of the hosting client/service for activation.
  1. Integrate the Server Definition into MCP Settings:

While the above instructions target Cline, the server itself is platform-agnostic. Configure its invocation details based on your operating environment:

Windows Environment Setup

⚠️ ATTENTION: Owing to known complexities with environment variable path expansion on Windows (see issue #40), users must specify the absolute file system path rather than utilizing shorthand variables like %APPDATA%.

Modify the configuration file located at C:\Users\<YourUsername>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json:

{
  "mcpServers": {
    "rest-api": {
      "command": "node",
      "args": [
        "C:/Users/<YourUsername>/AppData/Roaming/npm/node_modules/dkmaker-mcp-rest-api/build/index.js"
      ],
      "env": {
        "REST_BASE_URL": "https://api.example.com",
        // Basic Authentication Configuration
        "AUTH_BASIC_USERNAME": "your-username",
        "AUTH_BASIC_PASSWORD": "your-password",
        // OR Bearer Token Configuration
        "AUTH_BEARER": "your-token",
        // OR Custom API Key Configuration
        "AUTH_APIKEY_HEADER_NAME": "X-API-Key",
        "AUTH_APIKEY_VALUE": "your-api-key",
        // SSL Verification Control (Default: True)
        "REST_ENABLE_SSL_VERIFY": "false", // Disable for self-signed certificates
        // Response Size Cap (Default: 10000 bytes)
        "REST_RESPONSE_SIZE_LIMIT": "10000", // Max bytes allowed in response body
        // Specific Request Headers (Prefix HEADER_)
        "HEADER_X-API-Version": "2.0",
        "HEADER_Custom-Client": "my-client",
        "HEADER_Accept": "application/json"
      }
    }
  }
}

macOS/Linux Environment Setup

Update the configuration file located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:

{
  "mcpServers": {
    "rest-api": {
      "command": "npx",
      "args": [
        "-y",
        "dkmaker-mcp-rest-api"
      ],
      "env": {
        "REST_BASE_URL": "https://api.example.com",
        // Basic Auth
        "AUTH_BASIC_USERNAME": "your-username",
        "AUTH_BASIC_PASSWORD": "your-password",
        // OR Bearer Token
        "AUTH_BEARER": "your-token",
        // OR API Key
        "AUTH_APIKEY_HEADER_NAME": "X-API-Key",
        "AUTH_APIKEY_VALUE": "your-api-key",
        // SSL Verification
        "REST_ENABLE_SSL_VERIFY": "false", 
        // Custom Headers
        "HEADER_X-API-Version": "2.0",
        "HEADER_Custom-Client": "my-client",
        "HEADER_Accept": "application/json"
      }
    }
  }
}

Crucial Note: Select only a single authentication schema for environment variable configuration: 1. Basic Credentials (Highest precedence) 2. Bearer Token (If Basic is absent) 3. API Key (If both Basic and Bearer are unset)

Operational Features Summary

  • Execution of REST interactions utilizing GET, POST, PUT, DELETE, and PATCH methods.
  • Comprehensive data capture: HTTP status, response headers, and payload body.
  • Header Injection Flexibility:
  • Custom headers defined via environment variables prefixed with HEADER_.
  • Case-insensitive recognition of the HEADER_ prefix (e.g., header_, HeAdEr_).
  • Header names are preserved case-sensitively in the outgoing request.
  • Precedence hierarchy: Request Arguments > Authentication Headers > Globally Defined Custom Headers.
  • Native payload management for mutation methods (POST/PUT).
  • Response Body Size Governance:
  • Inherent safeguard against excessively large responses (default: 10,000 octets).
  • Adjustable limit using the REST_RESPONSE_SIZE_LIMIT environment variable.
  • Metadata indicating truncation is included if the limit is breached.
  • Structural integrity of the response wrapper is maintained, only the body payload is curtailed.

  • Secure Socket Layer (SSL) Certificate Integrity:

  • Secure verification is active by default for production safety.
  • Deactivatable via REST_ENABLE_SSL_VERIFY for development scenarios (e.g., self-signed certificates).
  • Versatile Authentication Modalities:
  • Basic username/password scheme.
  • Bearer Token authorization.
  • API Key injection into a specified HTTP header.

Example Execution Flow

Upon successful setup, invoke the adapter within Cline operations:

// Querying a collection resource (GET)
use_mcp_tool('rest-api', 'test_request', {
  "method": "GET",
  "endpoint": "/data/records"
});

// Submitting data (POST) with a structured payload
use_mcp_tool('rest-api', 'test_request', {
  "method": "POST",
  "endpoint": "/data/records",
  "body": {
    "record_id": 55,
    "payload": "new_entry"
  }
});

// Specifying unique request headers
use_mcp_tool('rest-api', 'test_request', {
  "method": "GET",
  "endpoint": "/metadata",
  "headers": {
    "Accept-Encoding": "gzip",
    "X-Request-Source": "cli-tool"
  }
});

Developer Contribution Guide

  1. Obtain the source code repository:
git clone https://github.com/zenturacp/mcp-rest-api.git
cd mcp-rest-api
  1. Resolve all required module dependencies:
npm install
  1. Compile the TypeScript sources into distributable JavaScript:
npm run build

For continuous integration during development (automatic rebuild on source change):

npm run watch

Licensing Information

This software is distributed under the terms of the MIT License. Full details are available in the accompanying LICENSE file.

CORPORATE CONTEXT: Business optimization platforms encompass all methodologies, software agents, control structures, algorithmic solutions, and operational frameworks employed by organizations to effectively navigate dynamic commercial landscapes, sustain competitive advantage, and enhance overall operational efficacy.

== General Overview == Management utilities can be categorized based on organizational function, such as tools for strategic planning, workflow management, record keeping, human resource interfacing, decision support, and performance auditing. A functional breakdown typically includes:

  • Data acquisition and integrity verification modules applicable across departments.
  • Process monitoring and enhancement systems.
  • Data synthesis and strategic foresight instruments. Modern enterprise solutions have undergone profound transformation due to rapid technological acceleration, making selection difficult. This stems from the persistent imperative to reduce expenditures while escalating revenue, deeply understanding client requirements, and delivering products meeting those precise demands. Consequently, leadership must adopt a strategic approach to adopting management software, tailoring solutions to organizational needs rather than blindly implementing the newest technology.

== Prominent Methodologies (2013 Survey Data) == Data from a 2013 Bain & Company survey highlighted globally utilized business tools, reflecting regional priorities and market conditions:

  1. Strategic Planning Frameworks
  2. Client Relationship Management (CRM)
  3. Personnel Feedback Mechanisms
  4. Competitive Analysis (Benchmarking)
  5. Performance Measurement Systems (Balanced Scorecard)
  6. Core Competency Identification
  7. Outsourcing Strategy
  8. Organizational Transformation Programs
  9. Logistics and Distribution Oversight (SCM)
  10. Definitional Statements (Mission/Vision)
  11. Target Audience Definition (Segmentation)
  12. Total Quality Management (TQM)

== Enterprise Software Applications == Software suites utilized by corporate personnel to execute diverse operational tasks are termed business applications. These applications aim to elevate productivity, quantify outcomes, and perform specific enterprise functions with accuracy. The evolution progressed from rudimentary Management Information Systems (MIS) to expansive Enterprise Resource Planning (ERP), followed by integrated CRM functionalities, culminating in today's cloud-centric management ecosystems. While IT investment correlates with organizational success, two factors are paramount for realizing value: the efficacy of the deployment process and the judicious selection and tailoring of the technological assets.

== Tools for Small and Medium Enterprises (SMEs) == Tools tailored for SMEs are vital as they offer scalable mechanisms for optimizing resource utilization and maintaining operational agility in constrained environments.

return

See Also

`