{
"mcpServers": {
"secure-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A demonstration project showing how to secure a Spring Boot MCP (Model Context Protocol) server using Keycloak with OAuth 2.0 Dynamic Client Registration and Token Exchange.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Last commit 55 days ago.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Secure Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A demonstration project showing how to secure a Spring Boot MCP (Model Context Protocol) server using Keycloak with OAuth 2.0 Dynamic Client Registration and Token Exchange.
This project implements a secure architecture for MCP servers that allows AI clients (like Claude) to authenticate and call downstream services. It uses two advanced OAuth 2.0 patterns:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Client │────▶│ MCP Server │────▶│ Temperature │◀────│ Keycloak │
│ (Claude) │ │ (Spring Boot) │ │ API │ │ (OAuth 2.0) │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ │ │
└───────────────────────┴──────── Token Exchange ──────────────────────┘
The setup consists of:
demo-mcp-servers: For MCP client registrations (DCR)demo-users: Contains users and protects the Temperature APISince MCP clients like Claude need to reach your services over the internet, you need a public URL. Using ngrok:
ngrok http 80
Note your ngrok URL (e.g., https://xxxx-xx-xxx-xx-xxx.ngrok-free.app).
Update the ngrok domain in the following files:
docker-compose.yaml - Replace all occurrences of 04f7-81-240-46-212.ngrok-free.app with your ngrok domain:
# Line 17: Keycloak hostname
KC_HOSTNAME: your-ngrok-domain.ngrok-free.app
# Line 32: MCP Server issuer URI
ISSUER_URI: https://your-ngrok-domain.ngrok-free.app/keycloak/realms/demo-mcp-servers
# Line 33: Temperature API URL
TEMPERATURE_API: https://your-ngrok-domain.ngrok-free.app/api
# Line 51: Temperature API issuer URI
ISSUER_URI: https://your-ngrok-domain.ngrok-free.app/keycloak/realms/demo-users
keycloak/terraform/variables.tf - Update the Keycloak URL:
variable "keycloak_url" {
type = string
default = "https://your-ngrok-domain.ngrok-free.app/keycloak"
}
Build the MCP Server:
cd mcp-server
chmod +x build-docker.sh
./build-docker.sh
cd ..
Build the Temperature API:
cd temperature-api
chmod +x build-docker.sh
./build-docker.sh
cd ..
Start only Keycloak first to configure it:
docker compose up keycloak traefik -d
Wait for Keycloak to be fully started (check logs with docker compose logs -f keycloak).
You have two options:
cd keycloak/terraform
terraform init
terraform apply
cd ../..
Then, configure Dynamic Client Registration manually in Keycloak. See the Configure DCR.
Follow the complete manual setup guide in the [blog post](https://bl