# Streamable HTTP (Docker) Examples
This folder contains Docker-focused examples for running the Druid MCP Server with the Streamable HTTP transport (MCP 2025-06-18). Clients connect over HTTP to a single /mcp endpoint.
We focus on environment variable configuration. No Java/JAR commands are required.
## Quick use with MCP client
Point your MCP client to this config file:
- [mcpservers-streamable-http.json](mcpservers-streamable-http.json)
This tells your client to connect to the Streamable HTTP endpoint. You must run the server container separately (see below).
### Optional: Enable OAuth2 protection
1) Start the server with OAuth2 enabled:
```bash
docker run --rm -p 8080:8080 \
-e SPRING_PROFILES_ACTIVE=http \
-e DRUID_ROUTER_URL=http://host.docker.internal:8888 \
-e DRUID_COORDINATOR_URL=http://host.docker.internal:8081 \
-e DRUID_AUTH_USERNAME=admin \
-e DRUID_AUTH_PASSWORD=password \
iunera/druid-mcp-server:1.6.0
```
2) Obtain a token using client-credentials grant (default client: `oidc-client` / `secret`):
```bash
export MCP_OAUTH_TOKEN=$(curl -s -XPOST "http://localhost:8080/oauth2/token" \
--data grant_type=client_credentials \
--user "oidc-client:secret" | jq -r ".access_token")
```
The provided `mcpservers-streamable-http.json` will forward the token using the `Authorization: Bearer` header.
Streamable HTTP endpoint will be available at:
- http://localhost:8080/mcp
Adjust -p 8080:8080 if you need a different port.