Skip to content
Back to search

mcp-rest-api

A TypeScript-based MCP server that enables testing of REST APIs through Cline. This tool allows you to test and interact with any REST API endpoints directly from your development environment.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dkmaker--mcp-rest-api/badge.svg)](/listings/dkmaker--mcp-rest-api)

HTML

<a href="/listings/dkmaker--mcp-rest-api"><img src="/api/listings/dkmaker--mcp-rest-api/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the package globally:

npm install -g dkmaker-mcp-rest-api

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 227 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP REST API Tester
  2. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  3. [![NPM Package](https://img.shields.io/npm/v/dkmaker-mcp-rest-api.svg)](https://www.npmjs.com/package/dkmaker-mcp-rest-api)
  4. A TypeScript-based MCP server that enables testing of REST APIs through Claude, Cline and other MCP clients. This tool allows you to test and interact with any REST API endpoints directly from your development environment.
  5. <a href="https://glama.ai/mcp/servers/izr2sp4rqo">
  6. <img width="380" height="200" src="https://glama.ai/mcp/servers/izr2sp4rqo/badge?refresh=1234" />
  7. </a>
  8. ## Installation
  9. Install the package globally:
  10. ```bash
  11. npm install -g dkmaker-mcp-rest-api
  12. ```
  13. ## Configuration
  14. ### Cline Custom Instructions
  15. To ensure Cline understands how to effectively use this tool, add the following to your Cline custom instructions (Settings > Custom Instructions):
  16. ```markdown
  17. # REST API Testing Instructions
  18. The `test_request` tool enables testing, debugging, and interacting with REST API endpoints. The tool provides comprehensive request/response information and handles authentication automatically.
  19. ## When to Use
  20. - Testing specific API endpoints
  21. - Debugging API responses
  22. - Verifying API functionality
  23. - Checking response times
  24. - Validating request/response formats
  25. - Testing local development servers
  26. - Testing API sequences
  27. - Verifying error handling
  28. ## Key Features
  29. - Supports GET, POST, PUT, DELETE, PATCH methods
  30. - Handles authentication (Basic, Bearer, API Key)
  31. - Normalizes endpoints automatically
  32. - Provides detailed response information
  33. - Configurable SSL verification and response limits
  34. ## Resources
  35. The following resources provide detailed documentation:
  36. - examples: Usage examples and common patterns
  37. - response-format: Response structure and fields
  38. - config: Configuration options and setup guide
  39. Access these resources to understand usage, response formats, and configuration options.
  40. ## Important Notes
  41. - Review API implementation for expected behavior
  42. - Handle sensitive data appropriately
  43. - Consider rate limits and API constraints
  44. - Restart server after configuration changes
  45. ```
  46. ### MCP Server Configuration
  47. While these instructions are for Cline, the server should work with any MCP implementation. Configure based on your operating system:
  48. ### Windows
  49. ⚠️ **IMPORTANT**: Due to a known issue with Windows path resolution ([issue #40](https://github.com/modelcontextprotocol/servers/issues/40)), you must use the full path instead of %APPDATA%.
  50. Add to `C:\Users\<YourUsername>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`:
  51. ```json
  52. {
  53. "mcpServers": {
  54. "rest-api": {
  55. "command": "node",
  56. "args": [
  57. "C:/Users/<YourUsername>/AppData/Roaming/npm/node_modules/dkmaker-mcp-rest-api/build/index.js"
  58. ],
  59. "env": {
  60. "REST_BASE_URL": "https://api.example.com",
  61. // Basic Auth
  62. "AUTH_BASIC_USERNAME": "your-username",
  63. "AUTH_BASIC_PASSWORD": "your-password",
  64. // OR Bearer Token
  65. "AUTH_BEARER": "your-token",
  66. // OR API Key
  67. "AUTH_APIKEY_HEADER_NAME": "X-API-Key",
  68. "AUTH_APIKEY_VALUE": "your-api-key",
  69. // SSL Verification (enabled by default)
  70. "REST_ENABLE_SSL_VERIFY": "false", // Set to false to disable SSL verification for self-signed certificates
  71. // Response Size Limit (optional, defaults to 10000 bytes)
  72. "REST_RESPONSE_SIZE_LIMIT": "10000", // Maximum response size in bytes
  73. // Custom Headers (optional)
  74. "HEADER_X-API-Version": "2.0",
  75. "HEADER_Custom-Client": "my-client",
  76. "HEADER_Accept": "application/json"
  77. }
  78. }
  79. }
  80. }
  81. ```
  82. ### macOS
  83. Add to `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:
  84. ```json
  85. {
  86. "mcpServers": {
  87. "rest-api": {
  88. "command": "npx",
  89. "args": [
  90. "-y",
  91. "dkmaker-mcp-rest-api"
  92. ],
  93. "env": {
  94. "REST_BASE_URL": "https://api.example.com",
  95. // Basic Auth
  96. "AUTH_BASIC_USERNAME": "your-username",
  97. "AUTH_BASIC_PASSWORD": "your-password",
  98. // OR Bearer Token
  99. "AUTH_BEARER": "your-token",
  100. // OR API Key
  101. "AUTH_APIKEY_HEADER_NAME": "X-API-Key",
  102. "AUTH_APIKEY_VALUE": "your-api-key",
  103. // SSL Verification (enabled by default)
  104. "REST_ENABLE_SSL_VERIFY": "false", // Set to false to disable SSL verification for self-signed certificates
  105. // Custom Headers (optional)
  106. "HEADER_X-API-Version": "2.0",
  107. "HEADER_Custom-Client": "my-client",
  108. "HEADER_Accept": "application/json"
  109. }
  110. }
  111. }
  112. }
  113. ```
  114. Note: Replace the environment variables with your actual values. Only configure one authentication method at a time:
  115. 1. Basic Authentication (username/password)
  116. 2. Bearer Token (if Basic Auth is not configured)
  117. 3. API Key (if neither Basic Auth nor Bearer Token is configured)
  118. ## Features
  119. - Test REST API endpoints with different HTTP methods
  120. - Support for GET, POST, PUT, DELETE, and PATCH requests
  121. - Detailed response information including status, headers, and body
  122. - Custom Headers:
  123. - Global headers via HEADER_* environment variables
  124. - Case-insensitive prefix (HEADER_, header_, HeAdEr_)
  125. - Case preservation for header names
  126. - Priority-based application (per-request > auth > custom)
  127. - Request body handling for POST/PUT methods
  128. - Response Size Management:
  129. - Automatic response size limiting (default: 10KB/10000 bytes)
  130. - Configurable size limit via REST_RESPONSE_SIZE_LIMIT environment variable
  131. - Clear truncation metadata when responses exceed limit
  132. - Preserves response structure while only truncating body content
  133. - SSL Certificate Verification:
  134. - Enabled by default for secure operation
  135. - Can be disabled for self-signed certificates or development environments
  136. - Control via REST_ENABLE_SSL_VERIFY environment variable
  137. - Multiple authentication methods:
  138. - Basic Authentication (username/password)
  139. - Bearer Token Authentication
  140. - API Key Authentication (custom header)
  141. ## Usage Examples
  142. Once installed and configured, you can use the REST API Tester through Cline to test your API endpoints:
  143. ```typescript
  144. // Test a GET endpoint
  145. use_mcp_tool('rest-api', 'test_request', {
  146. "method": "GET",
  147. "endpoint": "/users"
  148. });
  149. // Test a POST endpoint with body
  150. use_mcp_tool('rest-api', 'test_request', {
  151. "method": "POST",
  152. "endpoint": "/users",
  153. "body": {
  154. "name": "John Doe",
  155. "email": "john@example.com"
  156. }
  157. });
  158. // Test with custom headers
  159. use_mcp_tool('rest-api', 'test_request', {
  160. "method": "GET",
  161. "endpoint": "/products",
  162. "headers": {
  163. "Accept-Language": "en-US",
  164. "X-Custom-Header": "custom-value"
  165. }
  166. });
  167. ```
  168. ## Development
  169. 1. Clone the repository:
  170. ```bash
  171. git clone https://github.com/zenturacp/mcp-rest-api.git
  172. cd mcp-rest-api
  173. ```
  174. 2. Install dependencies:
  175. ```bash
  176. npm install
  177. ```
  178. 3. Build the project:
  179. ```bash
  180. npm run build
  181. ```
  182. For development with auto-rebuild:
  183. ```bash
  184. npm run watch
  185. ```
  186. ## License
  187. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.