npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcp-consultant-tools/rest-api

v22.0.0

Published

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

Readme

@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)

| Tool | Description | |------|-------------| | rest-request | Execute HTTP requests with automatic authentication | | rest-config | Get current service configuration summary | | rest-refresh-token | Force refresh OAuth2 token cache | | rest-batch-request | Execute multiple requests sequentially |

Prompts (2)

| Prompt | Description | |--------|-------------| | rest-api-guide | Comprehensive usage guide | | rest-api-troubleshoot | Troubleshooting common issues |

Authentication Methods

OAuth2 Client Credentials (Recommended)

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

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | REST_BASE_URL | Yes | - | Base URL for API requests | | REST_RESPONSE_SIZE_LIMIT | No | 10000 | Max response size in bytes | | REST_ENABLE_SSL_VERIFY | No | true | SSL certificate verification | | REST_TIMEOUT | No | 30000 | Request 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