https://github.com/sshaaf/keycloak-mcp-server
an experiment on using Keycloak admin client and expose it as an mcp server
https://github.com/sshaaf/keycloak-mcp-server
java keycloak mcp-server quarkus
Last synced: 8 months ago
JSON representation
an experiment on using Keycloak admin client and expose it as an mcp server
- Host: GitHub
- URL: https://github.com/sshaaf/keycloak-mcp-server
- Owner: sshaaf
- Created: 2025-04-02T16:40:25.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T16:46:47.000Z (8 months ago)
- Last Synced: 2025-04-02T17:36:03.783Z (8 months ago)
- Topics: java, keycloak, mcp-server, quarkus
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - Keycloak MCP Server - designed to work with Keycloak for identity and access management, with about 40+ tools covering, Users, Realms, Clients, Roles, Groups, IDPs, Authentication. Native builds available. (Community Servers)
- awesome-mcp-servers - **keycloak-mcp-server** - An MCP server for Keycloak, designed to work with Keycloak for identity and access management, covering, Users, Realms, Clients, Roles, Groups, IDPs, Authentication. Searching keycloak discourse, Native builds available. `java` `keycloak` `mcp-server` `quarkus` `mcp` `git clone https://github.com/sshaaf/keycloak-mcp-server` (🔌 API)
README
# Keycloak MCP Server
The Keycloak MCP Server is a service that leverages the Quarkus framework to operate as a Model-Context Protocol (MCP) server. This project is designed to work with Keycloak for identity and access management, providing a robust and scalable solution.
## Features
- **Quarkus Framework**: Built using Quarkus to provide fast startup times and low memory footprint.
- **MCP Standard**: Implements the Model-Context Protocol for efficient standard input/output server operations.
- **Keycloak Integration**: Seamlessly integrates with Keycloak for authentication and authorization.
## Prerequisites
- **Java 21 or newer**: Ensure you have Java installed on your system.
- **Maven**: Required for building and running the project.
## Getting Started
Starting the local instance of keycloak
```bash
docker-compose -f deploy/docker-compose.yml up
```
### Running in Development Mode
Run the application in development mode with live coding enabled:
```bash
./mvnw quarkus:dev
```
To package the application:
```bash
./mvnw package
```
### Running with Goose
Integrate and run this project as an extension with Goose:
```bash
goose session --with-extension="java -jar target/keycloak-mcp-server-1.0.0-SNAPSHOT-runner.jar"
```
questions you can ask?
```
( O)> can I create a new user in keycloak?
Yes, you can create a new user in Keycloak. To do this, you'll need to provide the following information about the user:
- **Realm**: The name of the realm where the user will reside.
- **Username**: The username for the new user.
- **First Name**: The first name of the user.
- **Last Name**: The last name of the user.
- **Email**: The email address of the user.
- **Password**: The password for the user's account.
You can provide these details, and I can assist you with creating the user.
----
( O)> list all users in quarkus realm
Here are the users in the "quarkus" realm:
1. **admin**
- ID: `af134cab-f41c-4675-b141-205f975db679`
2. **alice**
- ID: `eb4123a3-b722-4798-9af5-8957f823657a`
3. **jdoe**
- ID: `1eed6a8e-a853-4597-b4c6-c4c2533546a0`
----
( O)> can you delete user sshaaf from realm quarkus
```
## Documentation
- [Quarkus Documentation](https://quarkus.io/documentation/)
- [Keycloak Documentation](https://www.keycloak.org/documentation.html)
- [MCP Server Guide](https://docs.quarkiverse.io/quarkus-mcp-server/dev/index.html)
## Contributing
Contributions are welcome! Please see the [contributing guidelines](CONTRIBUTING.md) for more information.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.