@customable/http-mcp (2.0.1)

Published 2025-10-10 12:05:20 +02:00 by jack in customable-mcp/http-mcp

Installation

@customable:registry=
npm install @customable/http-mcp@2.0.1
"@customable/http-mcp": "2.0.1"

About this package

🌐 http-mcp

Version CI Status License NPM

MCP Server for HTTP requests and API testing.

🆕 What's New in v2.0.0

Complete Refactor with Enhanced Architecture

  • 🏗️ Modular Structure: Split into focused modules (types, tool-definitions, handlers, service) - 79% code reduction in index.ts
  • 🔒 100% Type Safety: Eliminated all any types with proper TypeScript interfaces
  • 📚 Complete Documentation: Full JSDoc coverage for all public APIs
  • 🧪 Comprehensive Testing: 21 unit tests with 100% pass rate
  • 📦 Updated Dependencies: MCP SDK upgraded from 0.5.0 → 1.20.0
  • 🚀 Profile Management: Save and reuse request configurations with authentication
  • 💾 Response Caching: Built-in caching for GET requests with configurable TTL
  • 🔐 Multiple Auth Types: Bearer, Basic, and API Key authentication support

See CHANGELOG.md for complete details.

Features

HTTP Methods

  • 🌐 request - Generic HTTP request (GET, POST, PUT, DELETE, PATCH)
  • 📊 get_json - GET request expecting JSON
  • 📝 post_json - POST JSON data
  • 🍪 request_with_cookies - Request with custom cookies

Authentication

  • 🔐 Auth profiles (Basic, Bearer, OAuth)
  • 🔑 API key support
  • 🍪 Cookie management
  • 📋 Header templates

Advanced Features

  • 💾 Response caching
  • 🔄 Automatic retry with exponential backoff
  • ⏱️ Timeout management
  • 📊 Request/Response logging
  • 🔍 Response validation

Profiles

Save common configurations as profiles for quick access.

Installation

npm install
npm run build

Configuration

Set environment variables:

  • HTTP_TIMEOUT - Default timeout in ms (default: 30000)
  • HTTP_CACHE_TTL - Cache TTL in seconds (default: 300)

Usage

npm start

Examples

Simple GET request

{
  "url": "https://api.example.com/users",
  "method": "GET"
}

POST with authentication

{
  "url": "https://api.example.com/users",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer token123"
  },
  "body": {
    "name": "John Doe"
  }
}

License

MIT

Dependencies

Dependencies

ID Version
zod ^3.23.8

Development dependencies

ID Version
@modelcontextprotocol/sdk ^1.20.0
@types/node ^22.10.2
@vitest/coverage-v8 ^3.2.4
typescript ^5.7.2
vitest ^3.2.4

Keywords

mcp http api rest mcp-server
Details
npm
2025-10-10 12:05:20 +02:00
2
Customable Team
MIT
latest
19 KiB
Assets (1)
Versions (2) View all
2.0.1 2025-10-10
1.0.5 2025-10-07