PHPackages                             code-wheel/mcp-http-security - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. code-wheel/mcp-http-security

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

code-wheel/mcp-http-security
============================

Secure HTTP transport wrapper for MCP servers with API key auth, IP/Origin allowlisting, and rate limiting

v1.0.4(2mo ago)1846↓68%MITPHPPHP &gt;=8.1CI passing

Since Jan 7Pushed 2mo agoCompare

[ Source](https://github.com/code-wheel/mcp-http-security-php)[ Packagist](https://packagist.org/packages/code-wheel/mcp-http-security)[ RSS](/packages/code-wheel-mcp-http-security/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (9)Versions (6)Used By (0)

MCP HTTP Security
=================

[](#mcp-http-security)

[![CI](https://github.com/code-wheel/mcp-http-security/actions/workflows/ci.yml/badge.svg)](https://github.com/code-wheel/mcp-http-security/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/f391aee78b818c35b9b8aad28a426f567aa115f2c958413c773398acdf2b42b1/68747470733a2f2f636f6465636f762e696f2f67682f636f64652d776865656c2f6d63702d687474702d73656375726974792f67726170682f62616467652e737667)](https://codecov.io/gh/code-wheel/mcp-http-security)[![PHPStan](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](https://phpstan.org/)[![Latest Stable Version](https://camo.githubusercontent.com/0f68a0f6c5b941aa6210649384fa4e22ea490c1a0f139037d717cbf7e61e08a3/68747470733a2f2f706f7365722e707567782e6f72672f636f64652d776865656c2f6d63702d687474702d73656375726974792f76)](https://packagist.org/packages/code-wheel/mcp-http-security)[![PHP Version](https://camo.githubusercontent.com/55caf50e911b9af1e9ce0041894c6bfc6b9573a1fb2fe0740a88724d0388f8c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f636f64652d776865656c2f6d63702d687474702d73656375726974792e737667)](https://packagist.org/packages/code-wheel/mcp-http-security)[![License](https://camo.githubusercontent.com/1a30312c941aed2cf13a4045fbff1b40a8a7927c403872869cfb6c408f893c49/68747470733a2f2f706f7365722e707567782e6f72672f636f64652d776865656c2f6d63702d687474702d73656375726974792f6c6963656e7365)](https://packagist.org/packages/code-wheel/mcp-http-security)

Secure HTTP transport wrapper for MCP (Model Context Protocol) servers in PHP.

Provides production-ready security components that don't exist elsewhere in the PHP MCP ecosystem:

- **API Key Authentication** - Secure key generation, hashing (SHA-256 + pepper), TTL/expiry
- **IP Allowlisting** - CIDR notation, IPv4/IPv6 support
- **Origin Allowlisting** - Hostname validation with wildcard subdomain support
- **PSR-15 Middleware** - Drop-in security for any PSR-15 compatible framework

Installation
------------

[](#installation)

```
composer require code-wheel/mcp-http-security
```

Quick Start
-----------

[](#quick-start)

```
