Skip to content

Commit 73f0c02

Browse files
Tomer ZaitTomer Zait
authored andcommitted
fix readme, add hashbang for index.js
1 parent 8521b8d commit 73f0c02

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,22 @@ Use it to test or adopt MCP streaming without disabling your WAF or confusing en
2121
## Installation
2222

2323
```bash
24-
npm install -g waf-mcp-remote
24+
npm install -g @f5devcentral/waf-mcp-remote
2525
```
2626

2727
Or via `npx`:
2828

2929
```bash
30-
npx waf-mcp-remote <server-url> [options]
30+
npx @f5devcentral/waf-mcp-remote <server-url> [options]
3131
```
3232

33+
## Environment Variables
34+
35+
You can set these environment variables to configure `waf-mcp-remote`:
36+
- `WAF_STATUS_CODE`: Override the WAF block status code (default: `0`).
37+
- `WAF_RESPONSE_PATTERN`: Regex pattern to match against WAF block page content (default: `\bYour support ID is:? ([\w-]+)\b`).
38+
- `WAF_RESPONSE_PATTERN_FLAGS`: Regex flags for the WAF response pattern (default: ``).
39+
3340
## Usage
3441

3542
Replace calls to `mcp-remote` in your MCP client config with `waf-mcp-remote`. Example for a JSON config:
@@ -40,9 +47,13 @@ Replace calls to `mcp-remote` in your MCP client config with `waf-mcp-remote`. E
4047
"protected-remote": {
4148
"command": "npx",
4249
"args": [
43-
"waf-mcp-remote",
44-
"https://remote.mcp.server/stream"
45-
]
50+
"@f5devcentral/waf-mcp-remote",
51+
"https://remote.mcp.server/mcp"
52+
],
53+
"env": {
54+
"WAF_STATUS_CODE": "403",
55+
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
56+
}
4657
}
4758
}
4859
}
@@ -56,14 +67,14 @@ All flags from `mcp-remote` still apply. In addition, `waf-mcp-remote` supports:
5667
- `--header` : Add custom headers to each request (e.g. `--header "Authorization: Bearer $TOKEN"`).
5768
- `--allow-http` : Permit HTTP (non-HTTPS) endpoints in trusted networks.
5869

59-
> **Tip:** With `npx`, pass `-y` to auto-accept installations: `npx -y waf-mcp-remote <url>`.
70+
> **Tip:** With `npx`, pass `-y` to auto-accept installations: `npx -y @f5devcentral/waf-mcp-remote <url>`.
6071
6172
## Transport Strategies
6273

6374
Control HTTP vs SSE order just like `mcp-remote`:
6475

6576
```bash
66-
npx waf-mcp-remote https://example/stream --transport <mode>
77+
npx @f5devcentral/waf-mcp-remote https://example/stream --transport <mode>
6778
```
6879

6980
- `http-only` (default)

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const WAF_STATUS_CODE = Number(process.env.WAF_STATUS_CODE) || null;
1+
#!/usr/bin/env node
2+
3+
const WAF_STATUS_CODE = Number(process.env.WAF_STATUS_CODE || 0);
24

35
let WAF_RESPONSE_PATTERN = process.env.WAF_RESPONSE_PATTERN || '\\bYour support ID is:? ([\\w-]+)\\b';
46
let WAF_RESPONSE_PATTERN_FLAGS = process.env.WAF_RESPONSE_PATTERN_FLAGS || '';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "waf-mcp-remote",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"keywords": [
55
"mcp",
66
"stdio",

0 commit comments

Comments
 (0)