MA

muhammed-abdelghany/rest_api_mcp

API development

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

6 stars 3 forks 품질 71 트렌드 14MIT

A Model Context Protocol (MCP) server for authenticated REST APIs. Drop it into any project, point it at your API, and let AI agents call endpoints — with , , , and — all without writing a single...

개요

A Model Context Protocol (MCP) server for authenticated REST APIs. Drop it into any project, point it at your API, and let AI agents call endpoints — with , , , and — all without writing a single line of auth code. No installation needed. Add this to your project's .vscode/mcp.json and VS Code will download and run the package automatically: This always uses the latest published version from npm. See VS Code mcp.json Examples for a full config. Add this to your project's .vscode/mcp.json: That's it. The agent can now: 1. Search for endpoints by keyword 2. Call any endpoint with automatic authentication 3. Fetch the full OpenAPI spec for schema inspection All configuration is done via environment variables in mcp.json. No code changes required. See Environment Variables Reference for the full list. Fuzzy-search the API spec by keyword. Returns matching endpoints with method, path, summary, tags, and required parameters.

README

원문 README의 일부입니다. 원문 보기.

rest-api-mcp

A Model Context Protocol (MCP) server for authenticated REST APIs.
Drop it into any project, point it at your API, and let AI agents call endpoints — with auto-login, 2FA support, Swagger spec fetch, and fuzzy endpoint search — all without writing a single line of auth code.


Table of Contents


Features

Capability Description
Auto-login Logs in automatically before every request; re-logins when token expires
Token caching 20-second TTL cache — survives rapid sequential calls
Auto-discovery Finds the login endpoint by scanning the Swagger spec (no config needed)
Auto token detection Tries 9 common token paths (data.access_token, accessToken, token, …)
AI-driven token detection inspect_login tool exposes raw responses + heuristic suggestions so the AI can pick the exact token path
2FA / OTP support Two-step auth: login → verify-otp, session identifiers forwarded automatically
Custom session fields Override hardcoded session candidates via verify_session_fields in request()
Extra login fields source, userRole, channel, device_id — any field, via JSON env var
Fuzzy endpoint search Find endpoints by keyword across path, summary, description, tags, operationId
Swagger spec fetch Retrieve and inspect the full OpenAPI spec
SSL bypass Optional for staging/dev environments with self-signed certs
Response truncation Configurable size limit to keep responses in context

Installation

No installation needed. Add this to your project’s .vscode/mcp.json and VS Code will download and run the package automatically:

{
  "command": "npx",
  "args": ["-y", "rest-api-mcp"]
}

This always uses the latest published version from npm. See VS Code mcp.json Examples for a full config.

Option B — Use locally (for development / offline)

git clone https://github.com/Muhammed-AbdelGhany/rest_api_mcp
cd rest_api_mcp
npm install && npm run build

Then point VS Code at the local build:

{
GitHub에서 전체 README 보기

설치

npx -y rest-api-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →