MCP with OAuth
@akshay12390
MCP with OAuth について
Forked from
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-weather-starter-webmvc-oauth2-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/[email protected]"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is MCP with OAuth?
A sample project demonstrating how to secure an MCP server using OAuth2, following the MCP specification’s authorization section. It is built with Spring Boot and Spring Security.
How to use MCP with OAuth?
Run the server with ./mvnw spring-boot:run. Obtain an access token by calling POST /oauth2/token with grant_type=client_credentials and the client ID/secret oidc-client:secret. Then paste the token into the MCP Inspector (v0.6.0) to connect.
Key features of MCP with OAuth
- OAuth2 client credentials flow for token issuance
- Token validation via Spring Security OAuth2 Resource Server
- Token expiration set to 5 minutes
- Works only in the servlet stack (no reactive support for token issuance)
Use cases of MCP with OAuth
- Securing an MCP server with standard OAuth2 tokens
- Testing MCP Inspector connectivity with token‑authenticated endpoints
- Demonstrating Spring Authorization Server integration with MCP
FAQ from MCP with OAuth
How do I obtain an access token?
Send a POST request to http://localhost:8080/oauth2/token with grant_type=client_credentials and use Basic auth with credentials oidc-client:secret.
What are the required dependencies?
Spring Security for infrastructure, Spring Authorization Server for issuing tokens, and Spring Security OAuth2 Resource Server for authenticating tokens.
How long is the token valid?
The token is valid for only 5 minutes.
Does this work with reactive (WebFlux) applications?
No, Spring Authorization Server does not support the reactive stack for issuing tokens. Token issuance works only in the Servlet environment.
「開発者ツール」の他のコンテンツ
Huoshan Test
volcengineTest
x1xhlolFULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sou
test
prysmaticlabsGo implementation of Ethereum proof of stake
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.
TalkToFigma
sonnylazuardiTalkToFigma: MCP integration between AI Agent (Cursor, Claude Code, Codex) and Figma, allowing Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
コメント