adem-hassine/mcp-oidc-nx-poc
If you are the rightful owner of mcp-oidc-nx-poc and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This repository provides a demo MCP server secured with Keycloak, showcasing a secure and interactive environment for model context protocol operations.
SSO / MCP
This repository provides a demo MCP server secured with Keycloak. Follow the steps below to get the stack running locally.
Prerequisites
- Node.js v20.19.3 (see
.nvmrcfor the exact version) - Docker with Docker Compose support
If you use nvm, install the required Node.js version and activate it:
nvm install
nvm use
Install JavaScript dependencies before running the demo:
npm install
Launch Keycloak locally
Run the Keycloak container stack defined in docker/docker-compose.yml:
docker compose -f docker/docker-compose.yml up -d
Wait until the Keycloak services finish starting before moving on to the demo.
To stop the containers when you are done:
docker compose -f docker/docker-compose.yml down
Demo users
Use the following Keycloak accounts when interacting with the demo:
adem.hassine/passwordflorian.bienefelt/password(only user with the Math Operation access role)
Only one client has the scope defined. If you want to receive the appropriate response for the math operation, make sure the login attempt originates from clicking that math operation. Otherwise, the scope will not be included.
Serve the MCP demo
Start the MCP server through Nx with verbose logging:
npx nx serve mcp-server --verbose
Once the command reports that the server is ready, open http://localhost:3333 in your browser to interact with the demo.
Enjoy exploring the demo!