mcp-oauth
A provider-agnostic OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers, with support for multiple identity providers.
Potencialize seu agente
Instalação do publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
Ainda não há uma versão empacotada no registro. Siga o README do repositório.
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no 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.
AbrirDo publicador
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
Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
MCP Oauth roda localmente via stdio.
Última verificação: 2026-10-27. OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers