npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@f5devcentral/waf-mcp-remote

v0.1.1

Published

WAF-aware proxy for Model Context Protocol streaming, converting WAF block pages into valid JSON-RPC SSE error events

Readme

waf-mcp-remote

A drop-in wrapper around mcp-remote that intercepts generic WAF blocking responses and converts them into valid MCP JSON-RPC SSE error events.
It wraps the original mcp-remote CLI under the hood and currently supports only Streamable HTTP protocol (not HTTP+SSE).

Note: This project is experimental—use it at your own risk.

Why is this necessary?

When a Web Application Firewall (WAF) flags a request to your MCP streaming endpoint, it typically returns an HTML block page.
That breaks any client expecting a continuous JSON-RPC SSE stream, causing errors or hangs.

waf-mcp-remote:

  1. Catches WAF responses: Detects non-JSON HTML block pages.
  2. Suppresses the block page: Terminates the HTML response.
  3. Emits a JSON-RPC error event: Sends a clean SSE-compatible JSON-RPC error so your client and AI analytics can handle it gracefully.

Use it to test or adopt MCP streaming without disabling your WAF or confusing end users.

Installation

npm install -g @f5devcentral/waf-mcp-remote

Or via npx:

npx @f5devcentral/waf-mcp-remote <server-url> [options]

Environment Variables

You can set these environment variables to configure waf-mcp-remote:

  • WAF_STATUS_CODE: Override the WAF block status code (default: 0).
  • WAF_RESPONSE_PATTERN: Regex pattern to match against WAF block page content (default: \bYour support ID is:? ([\w-]+)\b).
  • WAF_RESPONSE_PATTERN_FLAGS: Regex flags for the WAF response pattern (default: ``).

Usage

Replace calls to mcp-remote in your MCP client config with waf-mcp-remote. Example for a JSON config:

{
  "mcpServers": {
    "protected-remote": {
      "command": "npx",
      "args": [
        "@f5devcentral/waf-mcp-remote",
        "https://remote.mcp.server/mcp"
      ],
      "env": {
        "WAF_STATUS_CODE": "403",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

CLI Options

All flags from mcp-remote still apply. In addition, waf-mcp-remote supports:

  • --debug : Enable verbose logs (~/.mcp-auth/{server_hash}_debug.log).
  • --header : Add custom headers to each request (e.g. --header "Authorization: Bearer $TOKEN").
  • --allow-http : Permit HTTP (non-HTTPS) endpoints in trusted networks.

Tip: With npx, pass -y to auto-accept installations: npx -y @f5devcentral/waf-mcp-remote <url>.

Transport Strategies

Control HTTP vs SSE order just like mcp-remote:

npx @f5devcentral/waf-mcp-remote https://example/stream --transport <mode>
  • http-only (default)
  • http-first (convert to http-only)
  • sse-first (not supported)
  • sse-only (not supported)

OAuth Configuration

Use any standard mcp-remote OAuth flags:

  • --static-oauth-client-metadata : JSON string or @-file path
  • --static-oauth-client-info : via MCP_REMOTE_CLIENT_ID/MCP_REMOTE_CLIENT_SECRET
  • --host : Override OAuth callback host
  • Append a port after the URL to change redirect port

Troubleshooting

  • Silent client: Ensure you’re targeting an HTTP stream endpoint (not SSE).

  • Unexpected HTML: Confirm your WAF’s block page isn’t non-standard.

  • State issues: Clear auth state with:

    rm -rf ~/.mcp-auth
  • Node version: Requires Node.js 18+.

Contributing

Feel free to open issues or PRs in the waf-mcp-remote repo. Contributions welcome!


Wraps mcp-remote - add WAF-aware streaming to your MCP clients in one command.