Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
workspaces: mcp-server-rs
- run: cargo clippy --manifest-path mcp-server-rs/Cargo.toml -- -D warnings
# --all-targets so test code is linted too, not just the binary.
- run: cargo clippy --manifest-path mcp-server-rs/Cargo.toml --all-targets -- -D warnings

build:
name: Build & Test
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,20 @@ Flow services are created via `wm.server.ns/putNode` which accepts the full flow
- **stdio** (default): Standard MCP stdio transport, works with all MCP clients
- **HTTP**: `wm-mcp-server --http 8080` starts a Streamable HTTP server at `/mcp` for MCP gateways

### Allowed hosts (HTTP mode)

To block DNS rebinding attacks, the HTTP transport validates the inbound `Host`
header and accepts **loopback only** (`localhost`, `127.0.0.1`, `::1`) by
default. Requests carrying any other `Host` get `403`.

If the server is reached under a real hostname, list it in `WM_ALLOWED_HOSTS`
(comma-separated). Entries are *added* to the loopback defaults:

```bash
WM_ALLOWED_HOSTS=mcp.example.com,mcp.example.com:8080
WM_ALLOWED_HOSTS='*' # disables Host validation entirely -- not recommended
```

### Tool scoping

Set `WM_SCOPES` to restrict which tools are exposed (useful for MCP gateways):
Expand Down
124 changes: 28 additions & 96 deletions mcp-server-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion mcp-server-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ name = "wm-mcp-server"
path = "src/main.rs"

[dependencies]
rmcp = { version = "1.2", features = ["server", "transport-io", "transport-streamable-http-server", "macros"] }
# >=1.4 required: patches RUSTSEC-2026-0189 (DNS rebinding in the Streamable
# HTTP server transport) and provides the Host-allowlist builder API.
rmcp = { version = "1.8", features = ["server", "transport-io", "transport-streamable-http-server", "macros"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "io-std", "net", "signal"] }
axum = "0.8"
tokio-util = { version = "0.7", features = ["rt"] }
Expand Down
Loading