mcp-rest-api
The MCP REST API Tester is a tool for testing and interacting with REST API endpoints. Key capabilities include:
Testing REST API endpoints using GET, POST, PUT, DELETE methods
Handling authentication (Basic Auth, Bearer Token, API Key) configured via environment variables
Supporting custom headers for individual requests and globally via environment variables
Providing detailed response information (status, headers, body, timing, and full URL)
Managing SSL verification (can be disabled for self-signed certificates)
Controlling response size with configurable limits (default: 10KB)
Normalizing endpoints (adding leading slashes, removing trailing slashes)
Comprehensive error handling for network issues and authentication errors
Accepting any HTTP status code as a valid response
Development-friendly features with TypeScript support and auto-rebuild
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-rest-apitest a GET request to /api/users with bearer token auth"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP REST API Tester
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.
Installation
Install the package globally:
npm install -g dkmaker-mcp-rest-apiRelated MCP server: Angular Bootstrap MCP Server
Configuration
Cline Custom Instructions
To ensure Cline understands how to effectively use this tool, add the following to your Cline custom instructions (Settings > Custom Instructions):
# 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 changesMCP Server Configuration
While these instructions are for Cline, the server should work with any MCP implementation. Configure based on your operating system:
Windows
⚠️ IMPORTANT: Due to a known issue with Windows path resolution (issue #40), you must use the full path instead of %APPDATA%.
Add to C:\Users\<YourUsername>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json:
{
"mcpServers": {
"rest-api": {
"command": "node",
"args": [
"C:/Users/<YourUsername>/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
Add to ~/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"
}
}
}
}Note: Replace the environment variables with your actual values. Only configure one authentication method at a time:
Basic Authentication (username/password)
Bearer Token (if Basic Auth is not configured)
API Key (if neither Basic Auth nor Bearer Token is configured)
Features
Test REST API endpoints with different HTTP methods
Support for GET, POST, PUT, DELETE, and PATCH requests
Detailed response information including status, headers, and body
Custom Headers:
Global headers via HEADER_* environment variables
Case-insensitive prefix (HEADER_, header_, HeAdEr_)
Case preservation for header names
Priority-based application (per-request > auth > custom)
Request body handling for POST/PUT methods
Response Size Management:
Automatic response size limiting (default: 10KB/10000 bytes)
Configurable size limit via REST_RESPONSE_SIZE_LIMIT environment variable
Clear truncation metadata when responses exceed limit
Preserves response structure while only truncating body content
SSL Certificate Verification:
Enabled by default for secure operation
Can be disabled for self-signed certificates or development environments
Control via REST_ENABLE_SSL_VERIFY environment variable
Multiple authentication methods:
Basic Authentication (username/password)
Bearer Token Authentication
API Key Authentication (custom header)
Usage Examples
Once installed and configured, you can use the REST API Tester through Cline to test your API endpoints:
// 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"
}
});Development
Clone the repository:
git clone https://github.com/zenturacp/mcp-rest-api.git
cd mcp-rest-apiInstall dependencies:
npm installBuild the project:
npm run buildFor development with auto-rebuild:
npm run watchLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
1 tooltest_requestA
Test a REST API endpoint and get detailed response information. Base URL: https://api.example.com | SSL Verification enabled (see config resource for SSL settings) | Authentication: No authentication configured | No custom headers defined (see config resource for headers) | The tool automatically: - Normalizes endpoints (adds leading slash, removes trailing slashes) - Handles authentication header injection - Applies custom headers from HEADER_* environment variables - Accepts any HTTP status code as valid - Limits response size to 10000 bytes (see config resource for size limit settings) - Returns detailed response information including: * Full URL called * Status code and text * Response headers * Response body * Request details (method, headers, body) * Response timing * Validation messages | Error Handling: - Network errors are caught and returned with descriptive messages - Invalid status codes are still returned with full response details - Authentication errors include the attempted auth method | See the config resource for all configuration options, including header configuration.
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | HTTP method to use | |
| endpoint | Yes | Endpoint path (e.g. "/users"). Do not include full URLs - only the path. Example: "/api/users" will resolve to "https://api.example.com/api/users" | |
| body | No | Optional request body for POST/PUT requests | |
| headers | No | Optional request headers for one-time use. IMPORTANT: Do not use for sensitive data like API keys - those should be configured via environment variables. This parameter is intended for dynamic, non-sensitive headers that may be needed for specific requests. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It fully discloses automatic endpoint normalization, auth injection, custom headers from env vars, response size limit, acceptance of any HTTP status, and detailed response fields. Error handling and authentication details are also covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is comprehensive but somewhat verbose, with repeated references to 'see config resource.' It front-loads the purpose effectively but could be condensed without losing meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, no output schema), the description covers all essential aspects: base URL, SSL, auth, headers, automatic behaviors, response details, error handling, and configuration options. It comprehensively supports agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds valuable semantics: for 'headers', it warns against using sensitive data; for 'endpoint', it explains resolution against base URL; for 'body', it clarifies usage with POST/PUT. This goes beyond the schema, earning a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Test a REST API endpoint and get detailed response information,' which is a specific verb and resource. It also provides the base URL and key behavioral details, making the purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides extensive guidance, including when to use the tool, automated behaviors (normalization, auth injection, header handling), and error handling. It also references a config resource for additional settings, helping the agent decide when and how to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no possibility of confusion between tools.
With a single tool, naming is trivially consistent and follows a clear verb_noun pattern.
The server is named 'mcp-rest-api' but only provides one testing tool, which is far too few for comprehensive REST API interaction; typically multiple CRUD tools are expected.
The server lacks fundamental operations like create, read, update, and delete; it only offers a test request tool, leaving major gaps for any practical REST API workflow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A basic MCP server to operate on the Postman API.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- AlicenseBqualityDmaintenanceA TypeScript-based MCP server that enables interaction with Azure Table Storage directly through Cline. This tool allows you to query and manage data in Azure Storage Tables.1133MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript-based MCP server that provides backend API handling and facilitates communication between microservices. Features an organized structure with controllers, routes, and models for easy extensibility and maintenance.2251MIT
- FlicenseNot gradedqualityDmaintenanceA demonstration MCP server built in TypeScript that shows how to implement stdio-based communication for integration with MCP clients. Serves as a template for building custom MCP servers with strong typing and maintainability.
- FlicenseCqualityDmaintenanceA modular MCP server that connects to external APIs, providing tools for weather data, user management, and company operations. Features a scalable architecture with TypeScript support, HTTP client abstraction, and robust error handling.5
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkmaker/mcp-rest-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server