MCP Server for HTTP requests with profile management - multiple authentication types, response caching, and flexible request handling
Find a file
Jonas Hanisch a352eb0400
All checks were successful
Publish Package / publish (push) Successful in 25s
Merge develop → main: Release v2.0.1
🐛 Bug Fix:
- Fix TypeScript compilation error TS18048 in CI build
- Add null check for tool.description in tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 12:04:43 +02:00
.forgejo/workflows fix: use direct authentication token in CI workflow (v1.0.5) 2025-10-07 17:09:57 +02:00
src Fix: Add null check for tool.description in tests 2025-10-10 12:03:44 +02:00
.gitignore fix: registry configuration for scope-based installation (v1.0.1) 2025-10-07 12:34:15 +02:00
CHANGELOG.md Bump version to 2.0.1 2025-10-10 12:04:41 +02:00
package-lock.json Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:00:17 +02:00
package.json Bump version to 2.0.1 2025-10-10 12:04:41 +02:00
README.md Bump version to 2.0.1 2025-10-10 12:04:41 +02:00
tsconfig.json Implement HTTP MCP Server with request profiles and caching 2025-10-07 11:00:40 +02:00
vitest.config.ts Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:00:17 +02:00

🌐 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