Rest API MCP logo

Rest API MCP

by Muhammed-AbdelGhany

Authenticated REST API access over MCP with automatic login, 2FA, Swagger inspection, and endpoint discovery.

Install Rest API MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "muhammed-abdelghany-rest-api-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "rest-api-mcp"
      ],
      "env": {
        "REST_BASE_URL": "YOUR_VALUE_HERE",
        "API_EMAIL": "YOUR_VALUE_HERE",
        "API_PASSWORD": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Muhammed-AbdelGhany/rest_api_mcp MCP server lets agents inspect and call authenticated REST APIs through MCP tools. It logs in automatically, caches tokens briefly, supports optional 2FA flows, and can refetch authentication when tokens expire. With an OpenAPI or Swagger JSON URL, agents can search endpoints, inspect schemas, and then send requests without implementing authentication code. Reach for it when an API has documented endpoints but its login and token flow would otherwise require custom integration work.

Use cases

  • Connect an agent to an authenticated REST API
  • Search Swagger endpoints before making API calls
  • Inspect request and response schemas
  • Handle login and OTP verification flows
  • Call public or authenticated API routes

Key features

  • Automatic login and token refresh
  • Short-lived token caching
  • 2FA and OTP verification
  • Fuzzy OpenAPI endpoint search
  • Endpoint schema and request examples
  • Configurable REST requests

Tools5

What Rest API MCP lets your agent do. Expand a tool for its parameters.

Self-reported~235 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

6/6 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · rest-api-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
npm downloads61Package downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Rest API MCP works

What Muhammed-AbdelGhany/rest_api_mcp MCP server does

Muhammed-AbdelGhany/rest_api_mcp MCP server exposes authenticated REST API operations through MCP. It accepts a base API URL and login credentials, performs authentication as needed, and lets an agent call GET, POST, PUT, PATCH, and DELETE endpoints. The server can also retrieve an OpenAPI or Swagger document so an agent can understand available routes and request shapes.

Authentication is handled by the server rather than by agent-written login code. It can identify common token locations, retain the discovered token path for later logins, and retry authentication when a token has expired. Two-step login flows are supported when the API requires an OTP or another verification request.

How it works

Configure the API base URL, email, and password as environment variables. When the agent calls request, the server logs in when necessary, adds the authorization header, and returns the HTTP status, status text, timing, login data, and API response. A short token cache helps avoid repeating login operations during rapid sequential calls.

For APIs with a Swagger or OpenAPI JSON endpoint, use search_endpoints to find routes by keywords across paths, summaries, descriptions, tags, and operation IDs. Use describe_endpoint to inspect one route’s parameters, body schema, enums, examples, and response schemas before making a request. fetch_spec returns the complete specification for broader inspection.

The inspect_login tool runs the login process, including optional 2FA verification, and exposes raw server responses instead of extracting a token. It also provides heuristic suggestions that can help determine the correct token location. Custom token paths and mappings for verification-session fields can be supplied to request when automatic detection does not match the API.

Setup and configuration

The package can run through npx from an MCP configuration, or it can be cloned and built locally with npm. A basic configuration supplies REST_BASE_URL, API_EMAIL, and API_PASSWORD. API_SWAGGER_URL is strongly recommended when endpoint search, endpoint descriptions, full specification retrieval, or automatic login-endpoint discovery is needed.

Configuration is provided through environment variables, so changing authentication or API settings does not require source changes. The server also supports extra login fields supplied as JSON, including fields such as source, user role, channel, and device identifier. SSL verification can optionally be bypassed for development or staging systems using self-signed certificates, and response size limits can be configured to control context usage.

Tools and capabilities

  • search_endpoints: Finds likely routes and reports methods, paths, summaries, tags, and required parameters.
  • describe_endpoint: Shows the OpenAPI details for one method and path, including a generated request-body example.
  • request: Sends authenticated API calls, accepts extra headers and request bodies, and can skip authentication for public routes.
  • inspect_login: Returns login and optional verification responses with token-detection suggestions.
  • fetch_spec: Retrieves the complete OpenAPI or Swagger JSON document.

A practical workflow is to search first when the path is unknown, describe the selected endpoint when its body or response is unclear, and then call request with the required fields.

Limitations and notes

The API must provide a login flow compatible with the server’s supported authentication handling, or the relevant token and verification fields must be configured through request options. Automatic token detection covers common response locations, but an unusual response shape may require token_path. Similarly, nonstandard 2FA session identifiers may require verify_session_fields.

Swagger-dependent discovery and schema features require a configured API_SWAGGER_URL. The server does not remove the need to understand the target API’s authorization rules, required values, or side effects. SSL bypass is intended for staging or development situations and should be evaluated carefully before use with production services.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Rest API MCP

Muhammed-AbdelGhany/rest_api_mcp is an MCP server that connects AI agents to authenticated REST APIs. Its main tools search OpenAPI endpoints, describe endpoint schemas, make authenticated requests, inspect login responses, and fetch Swagger JSON. It supports automatic login, token caching, token renewal, and optional 2FA verification.

Install it by running the published package through `npx`, or clone the repository and build it locally with npm. An MCP configuration can use `npx -y rest-api-mcp`, while a local setup points to the generated `build/index.js` file.

It requires `REST_BASE_URL`, `API_EMAIL`, and `API_PASSWORD`. Set `API_SWAGGER_URL` when you need OpenAPI-based endpoint search, schema inspection, full specification retrieval, or automatic login-endpoint discovery.

Use `search_endpoints` with keywords from the desired operation, then use `describe_endpoint` for the selected method and path. The search returns matching routes and required parameters; the description provides request-body fields, types, enums, examples, and response schemas.

Yes, it supports two-step authentication with a login followed by OTP or verification. `inspect_login` exposes raw responses and heuristic suggestions, while `request` can use custom token paths and verification-session field mappings when an API uses nonstandard response structures.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRest API MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/muhammed-abdelghany-rest-api-mcp?style=directory)](https://allmcps.com/mcp/muhammed-abdelghany-rest-api-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/muhammed-abdelghany-rest-api-mcp"><img src="https://allmcps.com/api/badge/muhammed-abdelghany-rest-api-mcp?style=directory" alt="Rest API MCP on AllMCPs" /></a>