Skip to content

Conversation

JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Sep 19, 2025

Summary

This PR adds comprehensive documentation about ToolHive's remote MCP server authentication implementation, detailing compliance with various RFCs and the MCP authorization specification.

What's Added

A new documentation file docs/remote-mcp-authentication.md that covers:

Specification Compliance

  • RFC 9728 (Protected Resource Metadata)
  • RFC 8414 (Authorization Server Metadata)
  • RFC 7591 (Dynamic Client Registration)
  • OAuth 2.1 PKCE support

Authentication Details

  • Complete authentication flow with mermaid diagram
  • Discovery priority chain (5 levels)
  • Well-known endpoint discovery for issuer mismatch handling
  • Dynamic client registration flow
  • Security features (HTTPS enforcement, PKCE, token handling)

Configuration & Implementation

  • CLI flags for remote authentication
  • Registry configuration with OAuth settings
  • Key component descriptions
  • Error handling strategies

Context

This documentation serves as a reference for the authentication architecture and complements the implementation fixes in PR #1980. It helps developers understand how ToolHive handles complex OAuth scenarios where the issuer differs from the server URL.

Testing

  • Documentation builds correctly
  • All links are valid
  • Code references match current implementation

Related to #1957 and PR #1980

This adds detailed documentation about how ToolHive handles remote MCP
server authentication, including compliance with various RFCs and the
MCP authorization specification.

The documentation covers:
- Specification compliance (RFC 9728, RFC 8414, RFC 7591)
- Authentication flow and discovery priority chain
- Well-known endpoint discovery for issuer mismatch handling
- Dynamic client registration
- Security features and configuration options
- Implementation details and key components

This documentation helps developers understand the authentication
architecture and serves as a reference for the implementation that
was fixed in PR #1980.
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.30%. Comparing base (7002a23) to head (3adfa8f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1981      +/-   ##
==========================================
- Coverage   47.31%   47.30%   -0.02%     
==========================================
  Files         233      233              
  Lines       28649    28649              
==========================================
- Hits        13555    13552       -3     
- Misses      14083    14085       +2     
- Partials     1011     1012       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JAORMX JAORMX requested a review from Copilot September 19, 2025 19:23
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for ToolHive's remote MCP server authentication implementation, providing detailed analysis of RFC compliance and authentication flows.

  • Documents compliance with multiple RFCs including RFC 9728, RFC 8414, RFC 7591, and OAuth 2.1 PKCE
  • Includes detailed authentication flow diagrams and discovery priority chains
  • Provides configuration examples and implementation details for OAuth-based authentication

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JAORMX JAORMX changed the title Add comprehensive remote MCP authentication documentation Add remote MCP authentication documentation Sep 29, 2025
Copy link
Contributor

@yrobla yrobla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it looks nice and very complete. Generally when looking at this documentation, i feel i miss a bit of narrative. I see several bullet points, but without clear explanations to the user, some text to guide them

@JAORMX
Copy link
Collaborator Author

JAORMX commented Sep 29, 2025

@yrobla this is more of developer documentation. I can try to make it less bullet-y though 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants