You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(http)!: enforce Origin header server-side via rmcp 1.6.0 (#137)
* feat(http)!: enforce Origin header server-side via rmcp 1.6.0
Wire --allowed-origins into rmcp 1.6.0's
StreamableHttpServerConfig::with_allowed_origins so the same
allowlist that powers tower-http CORS preflight now also drives
server-side Origin rejection. The two layers cannot disagree
because they share a single Vec<String>.
Extracted build_http_router from HttpCommand::execute to make the
router callable from tests via tower::ServiceExt::oneshot, giving
hermetic network-free coverage of the rejection paths and the
allowed/missing-Origin pass-through.
BREAKING CHANGE: requests carrying a forbidden Origin are now
rejected with 403 at the MCP transport layer, not just blocked at
CORS preflight. The default --allowed-origins list (loopback) is
unchanged, so local AI-assistant integrations are not affected.
Operators who need broader access must extend --allowed-origins
or disable validation explicitly via --allowed-origins "".
* docs(http): note server-side Origin and Host enforcement
Update README, configuration docs, features overview, and the
HttpConfig struct doc comment to reflect that --allowed-origins now
drives both CORS preflight and rmcp server-side Origin rejection,
and that --allowed-hosts is enforced server-side with HTTP/2
:authority fallback.
|`--allowed-origins`|`http://localhost,http://127.0.0.1,https://localhost,https://127.0.0.1`| Allowed browser origins (comma-separated). Drives both CORS preflight and server-side `Origin` header rejection.|
A transport subcommand is required — running `dbmcp` with no subcommand prints usage help and exits with a non-zero status. The `stdio` transport requires no additional configuration beyond the database options above.
Copy file name to clipboardExpand all lines: docs/content/docs/features.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,7 +378,7 @@ The server communicates over standard input/output. This mode works with local M
378
378
379
379
### HTTP
380
380
381
-
The server runs as an HTTP service with Streamable HTTP transportand CORS support. This mode is useful for remote access or shared environments where multiple clients connect to the same server.
381
+
The server runs as an HTTP service with Streamable HTTP transport, CORS preflight, and server-side `Origin`/`Host` header allowlists. This mode is useful for remote access or shared environments where multiple clients connect to the same server.
382
382
383
383
**Best for**: Remote servers, shared team databases, environments where the MCP client cannot launch local processes.
0 commit comments