Repository navigation
Conversation
Add `rustxng mcp --http` to serve the same tools at POST /mcp over the Streamable HTTP transport. stdio stays the default, so existing clients and the `rustxng mcp` CLI keep working unchanged. Each Mcp-Session-Id gets its own McpServer, which keeps the `read_page` URL allowlist and page cache scoped to the conversation that produced the URLs. Host headers are validated for DNS-rebinding protection: loopback is allowed by default, a concrete non-loopback bind allows its own address, and a wildcard bind refuses to start until RUSTXNG_MCP_ALLOWED_HOSTS names the public hosts. Tests cover the HTTP session round trip through a real rmcp client, plus the host-list selection rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
rustxng mcp --httpto serve the same tools at POST /mcp over the Streamable HTTP transport. stdio stays the default, so existing clients and therustxng mcpCLI keep working unchanged.Each Mcp-Session-Id gets its own McpServer, which keeps the
read_pageURL allowlist and page cache scoped to the conversation that produced the URLs.Host headers are validated for DNS-rebinding protection: loopback is allowed by default, a concrete non-loopback bind allows its own address, and a wildcard bind refuses to start until RUSTXNG_MCP_ALLOWED_HOSTS names the public hosts.
Tests cover the HTTP session round trip through a real rmcp client, plus the host-list selection rules.
Problem and resulting behavior / 解決する問題と変更後の動作
Scope and compatibility / 範囲と互換性
Validation / 検証
cargo fmt --all --check(Rust changes)cargo test --all-targets(Rust changes)cargo clippy --all-targets -- -D warnings(Rust changes)Limitations / 残る制約
Contribution notes / 作成・レビューについて