mcp-oauth
A provider-agnostic OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers, with support for multiple identity providers.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
A provider-agnostic OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers, with support for multiple identity providers.
OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers
| Specification Version | Support Status | Documentation |
|---|---|---|
| 2025-11-25 | Full Support | Migration Guide |
| 2025-06-18 (previous) | Full Support | Backward compatible |
503 temporarily_unavailable with Retry-After on the token endpoint, on bearer validation and on introspection, never as a dead token┌─────────────────┐
│ Your MCP App │
└────────┬────────┘
│
┌────▼─────┐
│ Handler │ HTTP layer
└────┬─────┘
│
┌────▼─────┐
│ Server │ Business logic
└──┬───┬───┘
│ │
┌───▼┐ ┌▼────────┐
│Pro-│ │ Storage │
│vider│ │ │
└────┘ └─────────┘
package main
import (
"net/http"
"os"
oauth "github.com/giantswarm/mcp-oauth"
"github.com/giantswarm/mcp-oauth/handler"
"github.com/giantswarm/mcp-oauth/providers/google"
"github.com/giantswarm/mcp-oauth/storage/memory"
)
func main() {
// 1. Choose a provider
provider, _ := google.NewProvider(&google.Config{
ClientID: os.Getenv("GOOGLE_CLIENT_ID"),
ClientSecret: os.Getenv("GOOGLE_CLIENT_SECRET"),
RedirectURL: "http://localhost:8080/oauth/callback",
Scopes: []string{"openid", "email", "profile"},
})
// 2. Choose storage
store := memory.New()
defer store.Stop()
// 3. Create OAuth server
server, _ := oauth.NewServer(
provider,
store, // TokenStore
store, // ClientStore
store, // FlowStore
&oauth.ServerConfig{
Issuer: "http://localhost:8080",
},
nil,
)
// 4. Create HTTP handler and routes
h := handler.New(server, nil)
mux := http.NewServeMux()
h.RegisterProtectedResourceMetadataRoutes(mux, "/mcp")
mux.Handle("/mcp", h.ValidateToken(yourMCPHandler))
http.ListenAndServe(":8080", mux)
}
go get github.com/giantswarm/mcp-oauth
The examples/ directory contains runnable examples:
This library implements OAuth 2.1 with secure defaults:
NEVER use environment variables for production secrets!
Production deployments MUST use a secret manager:
NEVER:
See Production Example - Secret Management for implementation guidance and examples.
See the Security Guide for configuration and the Security Architecture for implementation details.
Vulnerability Reporting: See SECURITY.md for responsible disclosure.
Contributions welcome. Especially:
See CONTRIBUTING.md for guidelines.
Apache License 2.0
OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
MCP Oauth ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-27 OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers