New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@mcp-consultant-tools/rest-api

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcp-consultant-tools/rest-api

MCP server for REST API testing with OAuth2 client credentials support - test HTTP endpoints with automatic JWT token generation

latest
Source
npmnpm
Version
29.0.0
Version published
Maintainers
1
Created
Source

@mcp-consultant-tools/rest-api

MCP server for REST API testing with OAuth2 client credentials support. Enables AI assistants to test HTTP endpoints with automatic JWT token generation.

Features

  • HTTP Methods: GET, POST, PUT, DELETE, PATCH
  • OAuth2 Client Credentials: Automatic JWT token acquisition and caching
  • Multiple Auth Methods: Bearer token, Basic auth, API key
  • Response Management: Size limiting, truncation, timing
  • SSL Control: Enable/disable certificate verification
  • Custom Headers: Configure via environment variables
  • Batch Requests: Execute multiple requests sequentially

Quick Start

Installation

# As standalone
npx @mcp-consultant-tools/rest-api

# Or install globally
npm install -g @mcp-consultant-tools/rest-api

MCP Client Configuration

{
  "mcpServers": {
    "rest-api": {
      "command": "npx",
      "args": ["@mcp-consultant-tools/rest-api"],
      "env": {
        "REST_BASE_URL": "https://your-api.azurewebsites.net/api",
        "OAUTH2_TOKEN_URL": "https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token",
        "OAUTH2_CLIENT_ID": "your-client-id",
        "OAUTH2_CLIENT_SECRET": "your-client-secret",
        "OAUTH2_SCOPE": "api://your-app-id/.default"
      }
    }
  }
}

Tools (4)

ToolDescription
rest-requestExecute HTTP requests with automatic authentication
rest-configGet current service configuration summary
rest-refresh-tokenForce refresh OAuth2 token cache
rest-batch-requestExecute multiple requests sequentially

Prompts (2)

PromptDescription
rest-api-guideComprehensive usage guide
rest-api-troubleshootTroubleshooting common issues

Authentication Methods

Best for Azure/Entra ID protected APIs like Data API Builder (DAB):

OAUTH2_TOKEN_URL=https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
OAUTH2_CLIENT_ID=your-client-id
OAUTH2_CLIENT_SECRET=your-secret
OAUTH2_SCOPE=api://your-api/.default

Static Bearer Token

AUTH_BEARER=your-pre-acquired-token

Basic Authentication

AUTH_BASIC_USERNAME=user
AUTH_BASIC_PASSWORD=pass

API Key

AUTH_APIKEY_HEADER_NAME=X-Api-Key
AUTH_APIKEY_VALUE=your-key

Configuration Reference

VariableRequiredDefaultDescription
REST_BASE_URLYes-Base URL for API requests
REST_RESPONSE_SIZE_LIMITNo10000Max response size in bytes
REST_ENABLE_SSL_VERIFYNotrueSSL certificate verification
REST_TIMEOUTNo30000Request timeout in ms
HEADER_*No-Custom headers (e.g., HEADER_Accept)

Example Usage

Simple GET Request

Use rest-request with method GET and endpoint /users

POST with Body

Use rest-request with method POST, endpoint /orders, and body {"item": "widget", "qty": 5}

Batch Operations

Use rest-batch-request with an array of requests to test a complete workflow

License

MIT

Keywords

mcp

FAQs

Package last updated on 20 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts