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.

GitHub Stars

69

User Rating

Not Rated

Favorites

0

Views

252

Forks

11

Issues

0

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Node.js: 18.0.0以上
npm: 8.0.0以上
+1 more

Installation

Installation

Prerequisites

Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Claude Desktop: Latest version

Installation Steps

1. Install via Smithery

bash
npx -y @smithery/cli install dkmaker-mcp-rest-api --client claude

2. Manual Installation

1Install the package globally:
bash
   npm install -g dkmaker-mcp-rest-api
   
2Configure Cline Custom Instructions:
Add the following to your Cline custom instructions (Settings > Custom Instructions):
markdown
   # REST API Testing Instructions
   ...
   
3Add the server to your MCP configuration:
On Windows, you must use the full path.

Configuration

Configuration

Basic Configuration

Claude Desktop Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "tool-name": {
      "command": "npx",
      "args": ["-y", "dkmaker-mcp-rest-api"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}

Environment Variables

Set the following environment variables as needed:
bash
export API_KEY="your-api-key"
export DEBUG="true"

Advanced Configuration

Security Settings

Store API keys in environment variables or secure configuration files
Set appropriate file access permissions
Adjust logging levels

Examples

Examples

Basic Usage

Using with Claude Desktop

1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands

   Available tools from this MCP server:
   - tool1: Description of tool1
   - tool2: Description of tool2
   

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('toolName', {
  parameter1: 'value1',
  parameter2: 'value2'
});

console.log(result);

Use Cases

Testing specific API endpoints
Debugging API responses
Verifying API functionality
Checking response times
Validating request/response formats

Additional Resources