stacklok / stacklok/toolhive

Validate compliance with MCP “Authorization Server Metadata Discovery” requirements

Open
#2,480 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api authentication enhancement
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

We need to confirm that our Model Context Protocol (MCP) implementation within Toolhive correctly supports the Authorization Server Metadata Discovery section (covered under “Authorization Server Metadata Discovery” in the MCP spec). See the specification here: https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-server-metadata-discovery

Acceptance Criteria:

  • The Toolhive MCP server exposes a Protected Resource Metadata document (per RFC 9728) that includes the authorization_servers field pointing to our authorization server(s).
  • The MCP client logic is able to consume the authorization_servers field from resource metadata and use it to discover authorization-server metadata endpoints.
  • Our MCP server supports returning a 401 Unauthorized response with a WWW-Authenticate header that includes resource_metadata="", allowing clients to discover the resource metadata URL.
    curity.io
  • The MCP client supports discovery of authorization server metadata via /.well-known/oauth-authorization-server (or appropriate metadata URL) in accordance with the spec.
  • Document any deviations from the spec or unsupported cases, along with mitigation plans.
  • Automated tests are in place for the discovery logic (both resource metadata and authorization server metadata)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MCP Authorization Server Metadata Discovery specification and inspect Toolhive's existing MCP server and client authorization logic. Verify the resource metadata, WWW-Authenticate response, and authorization-server metadata discovery paths described in the acceptance criteria, then add automated tests for both discovery flows and document unsupported cases or mitigations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.