This setup is for local testing and not for production environments. Access is granted with a JSON credentials key.
Warning: Do not use this setup to deploy BoltMCP in a production setting.
- Prerequisites
- Installation
- Start the application
- Stop the application
- Update to a newer version
- Cleanup
- Troubleshooting
- Configuring Keycloak
- Apply for access to get alpha tester credentials
- Download and install Docker Desktop
- Ensure Docker Desktop is running
- Ensure the following ports are available on your machine:
3000,3001,3002,6274,6277, and8080
Alternatively, on Linux you can use Docker Compose with the plain Docker Engine v20.10+ without needing Docker Desktop
Clone this repository and navigate to the docker-compose directory:
git clone https://github.com/boltmcp/boltmcp.git
cd boltmcp/docker-composecp .env.example .envcat /etc/hostsIf it doesn't contain an entry for host.docker.internal, run the command below (requires password).
printf "\n127.0.0.1 host.docker.internal\n" | sudo tee -a /etc/hostsThis command adds a line to your
/etc/hostswhich tells your computer to resolve the hostnamehost.docker.internalto the localhost IP address127.0.0.1.
Download your alpha tester key.json to this directory, then run:
cat ./key.json | docker login \
--username _json_key \
--password-stdin \
https://europe-west2-docker.pkg.devdocker compose pullWe'll use Keycloak as our identity provider (IdP) to authenticate users of BoltMCP.
docker compose up keycloak --wait./keycloak/create-clients.sh ./keycloak/clientsThis will create three clients in Keycloak:
- One client for the main platform
- One client for the MCP server to validate tokens
- One client for MCP Clients to connect to, including the inspector and the playground
Copy and paste the client IDs and secrets from the command above to the following variables in your .env:
OIDC_PLATFORM_CLIENT_ID="..."
OIDC_PLATFORM_CLIENT_SECRET="..."
OIDC_MCP_SERVER_CLIENT_ID="..."
OIDC_MCP_SERVER_CLIENT_SECRET="..."
OIDC_MCP_CLIENT_CLIENT_ID="..."
OIDC_MCP_CLIENT_CLIENT_SECRET="..."Finally, we'll give our admin user a placeholder email address and name:
./keycloak/update-user.sh admin \
--firstName "Admin" \
--email "you@example.com"Replace
you@example.comwith an email address you own
After completing the installation steps above, run all the services:
docker compose up --waitNow you can open http://host.docker.internal:3000 and sign in:
- Username:
admin - Password:
password
These credentials are defined under "Keycloak" in .env
BoltMCP uses Single Sign-On (SSO), meaning you don't need to provide credentials when signing in if your browser is already signed-in to the identity provider.
docker compose downFirst stop the application:
docker compose downThen pull the latest configuration:
git pullAnd pull the latest images:
docker compose pullCheck if you have any missing or redundant environment variables:
diff .env.example .envUpdate .env as required.
Finally, start the application:
docker compose up --waitTo stop the application and remove the persisted data and all downloaded images:
docker compose down --volumes --rmi allWarning: This will delete all your BoltMCP data.
To remove your alpha tester credentials from your docker config:
docker logout https://europe-west2-docker.pkg.devFinally, you might choose to remove the line 127.0.0.1 host.docker.internal from your /etc/hosts.
If you get authentication errors when pulling images, ensure your GitHub account has been granted access by BoltMCP, and that you have successfully authenticated with docker.
If you get port conflict errors, make sure the following ports are not already in use by other applications: 3000, 3001, 3002, 6274, 6277, 8080.
If services fail to connect to the database, ensure all required environment variables are set correctly in your .env file.
Visit http://host.docker.internal:8080 and sign in:
- Username:
admin - Password:
password
These credentials are defined under "Keycloak" in .env
- Click Client scopes then Create client scope:
- Name:
mcp:my-server - Toggle on Display on consent screen
- Toggle on Include in token scope
- Name:
- Click Save then click Mappers:
- Click Configure a new mapper > Audience
- Name:
audience-config - Included Custom Audience:
http://host.docker.internal:3001/my-server/mcp - Click Save
- Click Clients > boltmcp-mcp-client > Client scopes > Add client scope
- Check
mcp:my-server - Click
Add > Optional
- Check
- Click Clients then Create client:
- Client type:
OpenID Connect - Client ID:
my-client
- Client type:
- Click Next
- Toggle on Client authentication
- Click Next
- Root URL:
http://host.docker.internal:3000 - Valid redirect URIs:
/api/auth/callback/keycloak
- Root URL:
- Click Save then click the Credentials tab
- Copy the Client Secret