Submit

MCP with OAuth

@akshay12390

a year ago
developer-tools
Forked from
Overview

what is MCP with OAuth?

MCP with OAuth is a sample project that demonstrates how to secure a Model Context Protocol (MCP) server using OAuth2, following the MCP specification.

how to use MCP with OAuth?

To use this project, run it using the command ./mvnw spring-boot:run, obtain a token by calling the /oauth2/token endpoint, and then use the token in the MCP inspector to connect.

key features of MCP with OAuth?

  • Demonstrates OAuth2 security for MCP servers
  • Provides a simple way to obtain access tokens
  • Integrates with Spring Security and Spring Authorization Server

use cases of MCP with OAuth?

  1. Securing APIs with OAuth2 authentication
  2. Implementing token-based access control in web applications
  3. Learning how to set up an MCP server with OAuth2 support

FAQ from MCP with OAuth?

  • What is the validity period of the access token?

The access token is valid for 5 minutes.

  • What dependencies are required for this project?

The project requires Spring Security, Spring Authorization Server, and Spring Security OAuth2 Resource Server.

  • Can I use this project for production?

This is a sample project and may require additional security measures for production use.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.