Skip to main content
Glama
dkmaker

mcp-rest-api

by dkmaker

Probador de API REST de MCP

Licencia: MIT Paquete NPM insignia de herrería

Un servidor MCP basado en TypeScript que permite probar APIs REST a través de Cline. Esta herramienta permite probar e interactuar con cualquier punto final de API REST directamente desde el entorno de desarrollo.

Instalación

Instalación mediante herrería

Para instalar REST API Tester para Claude Desktop automáticamente a través de Smithery :

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

Instalación manual

  1. Instalar el paquete globalmente:

npm install -g dkmaker-mcp-rest-api
  1. Instrucciones personalizadas para configurar Cline:

Para garantizar que Cline comprenda cómo usar esta herramienta de manera eficaz, agregue lo siguiente a sus instrucciones personalizadas de Cline (Configuración > Instrucciones personalizadas):

# 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 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
  1. Agregue el servidor a su configuración de MCP:

Aunque estas instrucciones son para Cline, el servidor debería funcionar con cualquier implementación de MCP. Configure según su sistema operativo:

Ventanas

⚠️ IMPORTANTE : Debido a un problema conocido con la resolución de rutas de Windows ( problema n.° 40 ), debe utilizar la ruta completa en lugar de %APPDATA%.

Agregar a 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

Agregar a ~/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"
      }
    }
  }
}

Nota: Reemplace las variables de entorno con sus valores reales. Configure solo un método de autenticación a la vez.

  1. Autenticación básica (nombre de usuario/contraseña)

  2. Token de portador (si la autenticación básica no está configurada)

  3. Clave API (si no se configura ni la autenticación básica ni el token de portador)

Related MCP server: Angular Bootstrap MCP Server

Características

  • Pruebe los puntos finales de la API REST con diferentes métodos HTTP

  • Compatibilidad con solicitudes GET, POST, PUT y DELETE

  • Información de respuesta detallada, incluido el estado, los encabezados y el cuerpo.

  • Encabezados personalizados:

    • Encabezados globales a través de variables de entorno HEADER_*

    • Prefijo que no distingue entre mayúsculas y minúsculas (HEADER_, header_, HeAdEr_)

    • Conservación de mayúsculas y minúsculas para los nombres de encabezado

    • Aplicación basada en prioridad (por solicitud > autorización > personalizada)

  • Manejo del cuerpo de la solicitud para los métodos POST/PUT

  • Gestión del tamaño de la respuesta:

    • Limitación automática del tamaño de respuesta (predeterminado: 10 KB/10 000 bytes)

    • Límite de tamaño configurable mediante la variable de entorno REST_RESPONSE_SIZE_LIMIT

    • Borrar metadatos de truncamiento cuando las respuestas exceden el límite

    • Conserva la estructura de la respuesta mientras solo trunca el contenido del cuerpo

  • Verificación del certificado SSL:

    • Habilitado de forma predeterminada para una operación segura

    • Se puede deshabilitar para certificados autofirmados o entornos de desarrollo.

    • Control mediante la variable de entorno REST_ENABLE_SSL_VERIFY

  • Múltiples métodos de autenticación:

    • Autenticación básica (nombre de usuario/contraseña)

    • Autenticación de token de portador

    • Autenticación de clave API (encabezado personalizado)

Ejemplos de uso

Una vez instalado y configurado, puede utilizar el REST API Tester a través de Cline para probar sus puntos finales de 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"
  }
});

Desarrollo

  1. Clonar el repositorio:

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

npm install
  1. Construir el proyecto:

npm run build

Para desarrollo con reconstrucción automática:

npm run watch

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

Install Server
A
license - permissive license
A
quality
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A 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.
    1
    15
    3
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A 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.
    283
    1
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A 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.
  • F
    license
    C
    quality
    D
    maintenance
    A 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

View all related MCP servers

Related MCP Connectors

  • 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

View all MCP Connectors

Latest Blog Posts

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