Web Analytics

mcp-rest-api

⭐ 94 stars Korean by dkmaker

MCP REST API 테스터

License: MIT NPM Package

클로드, 클라인 및 기타 MCP 클라이언트를 통해 REST API를 테스트할 수 있는 TypeScript 기반 MCP 서버입니다. 이 도구를 사용하면 개발 환경에서 직접 모든 REST API 엔드포인트를 테스트하고 상호작용할 수 있습니다.

설치

패키지를 전역으로 설치하세요:

npm install -g dkmaker-mcp-rest-api

구성

Cline 맞춤 지침

Cline이 이 도구를 효과적으로 사용하는 방법을 이해하도록 하려면 다음을 Cline 맞춤 지침(설정 > 맞춤 지침)에 추가하세요:

# REST API Testing Instructions

The test_request tool enables testing, debugging, and interacting with REST API endpoints. The tool provides comprehensive request/response information and handles authentication automatically.

When to Use

  • Testing specific API endpoints
  • Debugging API responses
  • Verifying API functionality
  • Checking response times
  • Validating request/response formats
  • Testing local development servers
  • Testing API sequences
  • Verifying error handling

Key Features

  • Supports GET, POST, PUT, DELETE, PATCH methods
  • Handles authentication (Basic, Bearer, API Key)
  • Normalizes endpoints automatically
  • Provides detailed response information
  • Configurable SSL verification and response limits

Resources

The following resources provide detailed documentation:

  • examples: Usage examples and common patterns
  • response-format: Response structure and fields
  • config: Configuration options and setup guide
Access these resources to understand usage, response formats, and configuration options.

Important Notes

  • Review API implementation for expected behavior
  • Handle sensitive data appropriately
  • Consider rate limits and API constraints
  • Restart server after configuration changes

MCP 서버 구성

이 지침은 Cline용이지만, 서버는 모든 MCP 구현과 함께 작동해야 합니다. 운영 체제에 따라 구성하십시오:

Windows

⚠️ 중요: Windows 경로 해석의 알려진 문제(이슈 #40)로 인해 %APPDATA% 대신 전체 경로를 사용해야 합니다.

C:\Users\\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json에 추가:

{
  "mcpServers": {
    "rest-api": {
      "command": "node",
      "args": [
        "C:/Users//AppData/Roaming/npm/node_modules/dkmaker-mcp-rest-api/build/index.js"
      ],
      "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 (enabled by default)
        "REST_ENABLE_SSL_VERIFY": "false", // Set to false to disable SSL verification for self-signed certificates
        // Response Size Limit (optional, defaults to 10000 bytes)
        "REST_RESPONSE_SIZE_LIMIT": "10000", // Maximum response size in bytes
        // Custom Headers (optional)
        "HEADER_X-API-Version": "2.0",
        "HEADER_Custom-Client": "my-client",
        "HEADER_Accept": "application/json"
      }
    }
  }
}

macOS

~/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 (enabled by default)
        "REST_ENABLE_SSL_VERIFY": "false", // Set to false to disable SSL verification for self-signed certificates
        // Custom Headers (optional)
        "HEADER_X-API-Version": "2.0",
        "HEADER_Custom-Client": "my-client",
        "HEADER_Accept": "application/json"
      }
    }
  }
}
참고: 환경 변수를 실제 값으로 교체하세요. 인증 방법은 한 번에 하나만 구성하십시오:

기능

사용 예시

설치 및 구성 후, Cline을 통해 REST API 테스터를 사용하여 API 엔드포인트를 테스트할 수 있습니다:

// Test a GET endpoint
use_mcp_tool('rest-api', 'test_request', {
  "method": "GET",
  "endpoint": "/users"
});

// Test a POST endpoint with body use_mcp_tool('rest-api', 'test_request', { "method": "POST", "endpoint": "/users", "body": { "name": "John Doe", "email": "john@example.com" } });

// Test with custom headers use_mcp_tool('rest-api', 'test_request', { "method": "GET", "endpoint": "/products", "headers": { "Accept-Language": "en-US", "X-Custom-Header": "custom-value" } });

개발

git clone https://github.com/zenturacp/mcp-rest-api.git
cd mcp-rest-api

npm install

npm run build

자동 재빌드와 함께 개발하려면:

npm run watch

라이선스

이 프로젝트는 MIT 라이선스 하에 있습니다 - 자세한 내용은 LICENSE 파일을 참조하세요.

--- Tranlated By Open Ai Tx | Last indexed: 2026-05-06 ---