adityamparikh opened a new pull request, #338:
URL: https://github.com/apache/solr-mcp/pull/338

   ## Summary
   
   This PR proposes an OpenSpec change, `remote-https-custom-connector`, to 
make the HTTP transport usable as a [Claude custom 
connector](https://claude.com/docs/connectors/building/directory-vs-custom). A 
user or org Owner pastes an `https://` MCP URL, and Claude connects from 
Anthropic's infrastructure, discovers the authorization server from a `401`, 
and runs OAuth itself. The change is specs only; implementation follows from 
`tasks.md`.
   
   Hosting model: each organization runs one solr-mcp next to its own Solr, 
sets `SOLR_URL` at deploy time (the single-tenant model in 
`docs/security/deployment-model.md`), and publishes `/mcp` over HTTPS. A Claude 
Directory listing, per-user Solr URLs and multi-tenancy are out of scope.
   
   Today Claude cannot get past discovery:
   
   ```diff
    POST /mcp  (no token)
   -  200, initialize OK; every tools/call -> {"text":"Access 
Denied","isError":true}
   -  (no challenge, so Claude never starts OAuth)
   +  401  WWW-Authenticate: Bearer 
resource_metadata="https://<host>/.well-known/oauth-protected-resource/mcp"
    GET /.well-known/oauth-protected-resource/mcp   (behind a TLS-terminating 
proxy)
   -  {"resource": "http://<host>/mcp", ...}    # does not match the URL Claude 
dialled
   +  {"resource": "https://<host>/mcp", ...}
   ```
   
   ```text
   openspec/changes/remote-https-custom-connector/
   ├── proposal.md     # why, what breaks (anonymous initialize / 
server/discover / tools/list)
   ├── design.md       # D1 /mcp authenticated(); D2 
forward-headers-strategy=native;
   │                   # D3 TLS at the proxy, or Boot SSL bundle; D4 IdP docs 
(CIMD, then DCR);
   │                   # D5 "Add to Claude" link; D6 same auth for stateless 
and MCP_PROTOCOL=modern
   ├── tasks.md        # 6 groups, each with its own tests and docs
   └── specs/
       ├── http-authorization/     # challenge, metadata, audience, per-tool 
denial, both protocol revisions
       └── http-public-endpoint/   # trusted-proxy origin, spoofed headers 
ignored, built-in TLS
   ```
   
   Findings the design builds on:
   
   - `mcp-server-security` 0.1.14 already provides the `401` + 
`resource_metadata` entry point and the metadata endpoint. They only run on an 
`authenticated()` path, and `/mcp` is `permitAll`. D1 returns to the library's 
default setup.
   - On Spring Security 7, 0.1.14 rewrites `resource_metadata` without quotes, 
which RFC 9110 does not allow (spring-ai-community/mcp-security#117). PR #144 
fixed it upstream on 2026-11-30 and has not been released yet; task 1.1 
upgrades to the first release that includes it.
   - spring-ai-community/mcp-security#79 hit the same `http://` vs `https://` 
mismatch behind nginx, and fixed it with Tomcat's `RemoteIpValve`. D2 uses the 
same approach, trusting `X-Forwarded-*` only from the private-network ranges 
Boot trusts by default.
   - `McpModernProtocolMethodSecurityTest` authenticates through a test filter 
that runs after the security chain. Once `/mcp` requires a token, that test has 
to move to real bearer tokens (task 2.5).
   
   ## Evidence
   
   - `openspec validate remote-https-custom-connector --strict` → `Change 
'remote-https-custom-connector' is valid`
   - `./gradlew build` on this branch → `BUILD SUCCESSFUL`, 518 tests, 0 
failures, 0 skipped, `:rat` included
   
   ## Merge Danger
   
   **Door:** two-way
   
   This PR only adds planning documents under `openspec/changes/`. No code, 
configuration or published docs change until the tasks are implemented.
   
   **Blast Radius:** none
   
   The breaking change it proposes (anonymous `/mcp` calls get `401`) lands 
only with the implementation PRs. The proposal and release notes flag it there.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to