-
Notifications
You must be signed in to change notification settings - Fork 0
chore(cw1-alignment): MCP plugin alignment #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| ## Version 2026/03/31 - MCP 2025-11-25 SWAG Compatible | ||
| # MCP Streamable-HTTP Reverse Proxy | ||
| # Service: arcane | ||
| # Domain: arcane.example.com | ||
| # Upstream MCP: http://100.64.0.1:44332 | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| listen [::]:443 ssl; | ||
|
|
||
| server_name arcane.example.com; | ||
|
|
||
| include /config/nginx/ssl.conf; | ||
|
|
||
| client_max_body_size 0; | ||
|
|
||
| # MCP server upstream (Tailscale IP of the host running arcane-mcp) | ||
| set $mcp_upstream_app "100.64.0.1"; | ||
| set $mcp_upstream_port "44332"; | ||
| set $mcp_upstream_proto "http"; | ||
|
|
||
| # DNS rebinding protection | ||
| set $origin_valid 0; | ||
| if ($http_origin = "") { set $origin_valid 1; } | ||
| if ($http_origin = "https://$server_name") { set $origin_valid 1; } | ||
| if ($http_origin ~ "^https://(localhost|127\.0\.0\.1)(:[0-9]+)?$") { set $origin_valid 1; } | ||
| if ($http_origin ~ "^https://(.*\.)?anthropic\.com$") { set $origin_valid 1; } | ||
| if ($http_origin ~ "^https://(.*\.)?claude\.ai$") { set $origin_valid 1; } | ||
|
|
||
| add_header X-MCP-Version "2025-11-25" always; | ||
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; | ||
|
|
||
| # Uncomment for auth provider (authelia, authentik, etc.) | ||
| # include /config/nginx/authelia-server.conf; | ||
|
|
||
| # OAuth 2.1: /_oauth_verify, /.well-known/*, /jwks, /register, | ||
| # /authorize, /token, /revoke, /callback, /success, error pages | ||
| include /config/nginx/oauth.conf; | ||
|
|
||
| location /mcp { | ||
| if ($origin_valid = 0) { | ||
| add_header Content-Type "application/json" always; | ||
| return 403 '{"error":"origin_not_allowed","message":"Origin header validation failed"}'; | ||
| } | ||
|
|
||
| auth_request /_oauth_verify; | ||
| auth_request_set $auth_status $upstream_status; | ||
|
|
||
| include /config/nginx/resolver.conf; | ||
| include /config/nginx/proxy.conf; | ||
| include /config/nginx/mcp.conf; | ||
|
|
||
| proxy_pass $mcp_upstream_proto://$mcp_upstream_app:$mcp_upstream_port; | ||
| } | ||
|
|
||
| location /health { | ||
| include /config/nginx/resolver.conf; | ||
|
|
||
| proxy_set_header Accept "application/json"; | ||
| proxy_set_header X-Health-Check "nginx-mcp-proxy"; | ||
|
|
||
| proxy_connect_timeout 5s; | ||
| proxy_send_timeout 10s; | ||
| proxy_read_timeout 10s; | ||
|
|
||
| add_header Cache-Control "no-cache, no-store, must-revalidate" always; | ||
| add_header Pragma "no-cache" always; | ||
|
|
||
| proxy_pass $mcp_upstream_proto://$mcp_upstream_app:$mcp_upstream_port; | ||
| } | ||
|
|
||
| location ~* ^/(session|sessions) { | ||
| auth_request /_oauth_verify; | ||
| auth_request_set $auth_status $upstream_status; | ||
|
|
||
| include /config/nginx/resolver.conf; | ||
| include /config/nginx/proxy.conf; | ||
|
|
||
| proxy_set_header MCP-Protocol-Version $http_mcp_protocol_version; | ||
| proxy_set_header Mcp-Session-Id $http_mcp_session_id; | ||
|
|
||
| add_header Cache-Control "no-store" always; | ||
| add_header Pragma "no-cache" always; | ||
|
|
||
| proxy_pass $mcp_upstream_proto://$mcp_upstream_app:$mcp_upstream_port; | ||
| } | ||
|
|
||
| location / { | ||
| # Uncomment for auth provider | ||
| # include /config/nginx/authelia-location.conf; | ||
|
|
||
| include /config/nginx/resolver.conf; | ||
| include /config/nginx/proxy.conf; | ||
|
|
||
| proxy_pass $mcp_upstream_proto://$mcp_upstream_app:$mcp_upstream_port; | ||
| } | ||
| } |
Empty file.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Network name and variable default are inconsistent.
The network is declared with
name: ${DOCKER_NETWORK:-arcane-mcp}, but the service referencesjakenetas the network key. Thenameattribute sets the actual Docker network name, which defaults toarcane-mcp, whilejakenetis just an internal compose reference.This works, but the naming is confusing—
jakenetappears to be a leftover or project-specific name. Consider aligning the key name with the default network name for clarity.♻️ Suggested rename for consistency
🤖 Prompt for AI Agents