Skip to content

Commit 208bfe2

Browse files
authored
oauthex: new package for oauth extensions (#429)
This package will hold externally visible parts of internal/oauthex. For now, just add an alias to the ProtectedResourceMetadata struct. This lets one write MCP-compliant servers.
1 parent 140b939 commit 208bfe2

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ software development kit (SDK) for the Model Context Protocol (MCP).
2121
2222
## Package documentation
2323

24-
The SDK consists of three importable packages:
24+
The SDK consists of several importable packages:
2525

2626
- The
2727
[`github.com/modelcontextprotocol/go-sdk/mcp`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp)
@@ -34,6 +34,10 @@ The SDK consists of three importable packages:
3434
[`github.com/modelcontextprotocol/go-sdk/auth`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth)
3535
package provides some primitives for supporting oauth.
3636

37+
- The
38+
[`github.com/modelcontextprotocol/go-sdk/oauthex`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/oauthex)
39+
package provides extensions to the OAuth protocol, such as ProtectedResourceMetadata.
40+
3741
## Getting started
3842

3943
To get started creating an MCP server, create an `mcp.Server` instance, add

internal/readme/README.src.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ software development kit (SDK) for the Model Context Protocol (MCP).
2020
2121
## Package documentation
2222

23-
The SDK consists of three importable packages:
23+
The SDK consists of several importable packages:
2424

2525
- The
2626
[`github.com/modelcontextprotocol/go-sdk/mcp`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp)
@@ -33,6 +33,10 @@ The SDK consists of three importable packages:
3333
[`github.com/modelcontextprotocol/go-sdk/auth`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth)
3434
package provides some primitives for supporting oauth.
3535

36+
- The
37+
[`github.com/modelcontextprotocol/go-sdk/oauthex`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/oauthex)
38+
package provides extensions to the OAuth protocol, such as ProtectedResourceMetadata.
39+
3640
## Getting started
3741

3842
To get started creating an MCP server, create an `mcp.Server` instance, add

oauthex/oauthex.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 The Go MCP SDK Authors. All rights reserved.
2+
// Use of this source code is governed by an MIT-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Package oauthex implements extensions to OAuth2.
6+
package oauthex
7+
8+
import "github.com/modelcontextprotocol/go-sdk/internal/oauthex"
9+
10+
type ProtectedResourceMetadata = oauthex.ProtectedResourceMetadata

0 commit comments

Comments
 (0)