This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-mcp.git
The following commit(s) were added to refs/heads/main by this push:
new fe514d6 chore: Rename repo (#7)
fe514d6 is described below
commit fe514d6100866faa92d26e67512a62accda7fffa
Author: Aditya Parikh <[email protected]>
AuthorDate: Fri Oct 31 07:23:59 2025 -0400
chore: Rename repo (#7)
* Add Docker support with Jib and GitHub Actions CI/CD
* Add Docker support with Jib and GitHub Actions CI/CD
# Conflicts:
# build.gradle.kts
# gradle/libs.versions.toml
* Update the repo name pattern.
* Add Docker support with Jib and GitHub Actions CI/CD
# Conflicts:
# build.gradle.kts
# gradle/libs.versions.toml
* test: add Docker integration tests for MCP server under both STDIO and
HTTP modes
* refactor: rename project from solr-mcp-server to solr-mcp
---------
Co-authored-by: Eric Pugh <[email protected]>
---
.github/workflows/build-and-publish.yml | 30 ++---
.run/SolrMcpServerHttp.run.xml | 2 +-
.run/SolrMcpServerStdio.run.xml | 2 +-
README.md | 137 +++++++++++++++++++--
build.gradle.kts | 12 +-
settings.gradle.kts | 2 +-
sonar-project.properties | 12 --
src/main/resources/application.properties | 2 +-
.../mcp/server/DockerImageHttpIntegrationTest.java | 4 +-
.../server/DockerImageStdioIntegrationTest.java | 4 +-
10 files changed, 158 insertions(+), 49 deletions(-)
diff --git a/.github/workflows/build-and-publish.yml
b/.github/workflows/build-and-publish.yml
index 80a27ee..bf4ea56 100644
--- a/.github/workflows/build-and-publish.yml
+++ b/.github/workflows/build-and-publish.yml
@@ -33,8 +33,8 @@
#
# Published Images:
# ----------------
-# - GitHub Container Registry: ghcr.io/OWNER/solr-mcp-server:TAG
-# - Docker Hub: DOCKERHUB_USERNAME/solr-mcp-server:TAG
+# - GitHub Container Registry: ghcr.io/OWNER/solr-mcp:TAG
+# - Docker Hub: DOCKERHUB_USERNAME/solr-mcp:TAG
#
# Image Tagging Strategy:
# ----------------------
@@ -114,8 +114,8 @@ jobs:
- name: Upload JAR artifact
uses: actions/upload-artifact@v4
with:
- name: solr-mcp-server-jar
- path: build/libs/solr-mcp-server-*.jar
+ name: solr-mcp-jar
+ path: build/libs/solr-mcp-*.jar
retention-days: 7
# Upload JUnit test results
@@ -200,7 +200,7 @@ jobs:
# Get version from build.gradle.kts
VERSION=$(grep '^version = ' build.gradle.kts | sed
's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
-
+
# Determine image tags based on trigger type
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
# For version tags (e.g., v1.0.0), use semantic version
@@ -271,13 +271,13 @@ jobs:
run: |
TAGS="${{ steps.meta.outputs.tags }}"
IFS=',' read -ra TAG_ARRAY <<< "$TAGS"
-
+
# Build and push each tag to GHCR
# Jib automatically handles multi-platform builds (amd64,
arm64)
for TAG in "${TAG_ARRAY[@]}"; do
- echo "Building and pushing ghcr.io/${{
steps.repo.outputs.owner_lc }}/solr-mcp-server:$TAG"
+ echo "Building and pushing ghcr.io/${{
steps.repo.outputs.owner_lc }}/solr-mcp:$TAG"
./gradlew jib \
- -Djib.to.image=ghcr.io/${{ steps.repo.outputs.owner_lc
}}/solr-mcp-server:$TAG \
+ -Djib.to.image=ghcr.io/${{ steps.repo.outputs.owner_lc
}}/solr-mcp:$TAG \
-Djib.to.auth.username=${{ github.actor }} \
-Djib.to.auth.password=${{ secrets.GITHUB_TOKEN }}
done
@@ -290,12 +290,12 @@ jobs:
run: |
TAGS="${{ steps.meta.outputs.tags }}"
IFS=',' read -ra TAG_ARRAY <<< "$TAGS"
-
+
# Build and push each tag to Docker Hub
for TAG in "${TAG_ARRAY[@]}"; do
- echo "Building and pushing ${{
secrets.DOCKERHUB_USERNAME }}/solr-mcp-server:$TAG"
+ echo "Building and pushing ${{
secrets.DOCKERHUB_USERNAME }}/solr-mcp:$TAG"
./gradlew jib \
- -Djib.to.image=${{ secrets.DOCKERHUB_USERNAME
}}/solr-mcp-server:$TAG \
+ -Djib.to.image=${{ secrets.DOCKERHUB_USERNAME
}}/solr-mcp:$TAG \
-Djib.to.auth.username=${{ secrets.DOCKERHUB_USERNAME
}} \
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }}
done
@@ -311,14 +311,14 @@ jobs:
TAGS="${{ steps.meta.outputs.tags }}"
IFS=',' read -ra TAG_ARRAY <<< "$TAGS"
for TAG in "${TAG_ARRAY[@]}"; do
- echo "- \`ghcr.io/${{ steps.repo.outputs.owner_lc
}}/solr-mcp-server:$TAG\`" >> $GITHUB_STEP_SUMMARY
+ echo "- \`ghcr.io/${{ steps.repo.outputs.owner_lc
}}/solr-mcp:$TAG\`" >> $GITHUB_STEP_SUMMARY
done
-
+
# Only show Docker Hub section if secrets are configured
if [[ "${{ secrets.DOCKERHUB_USERNAME }}" != "" ]]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "#### Docker Hub" >> $GITHUB_STEP_SUMMARY
for TAG in "${TAG_ARRAY[@]}"; do
- echo "- \`${{ secrets.DOCKERHUB_USERNAME
}}/solr-mcp-server:$TAG\`" >> $GITHUB_STEP_SUMMARY
+ echo "- \`${{ secrets.DOCKERHUB_USERNAME
}}/solr-mcp:$TAG\`" >> $GITHUB_STEP_SUMMARY
done
- fi
\ No newline at end of file
+ fi
diff --git a/.run/SolrMcpServerHttp.run.xml b/.run/SolrMcpServerHttp.run.xml
index 8038646..ee4a430 100644
--- a/.run/SolrMcpServerHttp.run.xml
+++ b/.run/SolrMcpServerHttp.run.xml
@@ -2,7 +2,7 @@
<configuration default="false" name="SolrMcpServerHttp"
type="SpringBootApplicationConfigurationType"
factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="http"/>
- <module name="solr-mcp-server.main"/>
+ <module name="solr-mcp.main"/>
<option name="SPRING_BOOT_MAIN_CLASS"
value="org.apache.solr.mcp.server.Main"/>
<method v="2">
<option name="Make" enabled="true"/>
diff --git a/.run/SolrMcpServerStdio.run.xml b/.run/SolrMcpServerStdio.run.xml
index ec78c9f..7dbad9d 100644
--- a/.run/SolrMcpServerStdio.run.xml
+++ b/.run/SolrMcpServerStdio.run.xml
@@ -2,7 +2,7 @@
<configuration default="false" name="SolrMcpServerStdio"
type="SpringBootApplicationConfigurationType"
factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="stdio"/>
- <module name="solr-mcp-server.main"/>
+ <module name="solr-mcp.main"/>
<option name="SPRING_BOOT_MAIN_CLASS"
value="org.apache.solr.mcp.server.Main"/>
<method v="2">
<option name="Make" enabled="true"/>
diff --git a/README.md b/README.md
index 813ebe6..5900902 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,129 @@ centrally managed in `gradle/libs.versions.toml`.
The build produces two JAR files in `build/libs/`:
-- `solr-mcp-server-0.0.1-SNAPSHOT.jar` - Executable JAR with all dependencies
(fat JAR)
-- `solr-mcp-server-0.0.1-SNAPSHOT-plain.jar` - Plain JAR without dependencies
+- `solr-mcp-0.0.1-SNAPSHOT.jar` - Executable JAR with all dependencies (fat
JAR)
+- `solr-mcp-0.0.1-SNAPSHOT-plain.jar` - Plain JAR without dependencies
+
+### 4. Building Docker Images (Optional)
+
+This project uses [Jib](https://github.com/GoogleContainerTools/jib) to build
optimized Docker images without requiring
+Docker installed. Jib creates layered images for faster rebuilds and smaller
image sizes.
+
+#### Option 1: Build to Docker Daemon (Recommended)
+
+Build directly to your local Docker daemon (requires Docker installed):
+
+```bash
+./gradlew jibDockerBuild
+```
+
+This creates a local Docker image: `solr-mcp:0.0.1-SNAPSHOT`
+
+Verify the image:
+
+```bash
+docker images | grep solr-mcp
+```
+
+#### Option 2: Build to Tar File (No Docker Required)
+
+Build to a tar file without Docker installed:
+
+```bash
+./gradlew jibBuildTar
+```
+
+This creates `build/jib-image.tar`. Load it into Docker:
+
+```bash
+docker load < build/jib-image.tar
+```
+
+#### Option 3: Push to Docker Hub
+
+Authenticate with Docker Hub and push:
+
+```bash
+# Login to Docker Hub
+docker login
+
+# Build and push
+./gradlew jib -Djib.to.image=YOUR_DOCKERHUB_USERNAME/solr-mcp:0.0.1-SNAPSHOT
+```
+
+#### Option 4: Push to GitHub Container Registry
+
+Authenticate with GitHub Container Registry and push:
+
+```bash
+# Create a Personal Access Token (classic) with write:packages scope at:
+# https://github.com/settings/tokens
+
+# Login to GitHub Container Registry
+export GITHUB_TOKEN=YOUR_GITHUB_TOKEN
+echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME
--password-stdin
+
+# Build and push
+./gradlew jib
-Djib.to.image=ghcr.io/YOUR_GITHUB_USERNAME/solr-mcp:0.0.1-SNAPSHOT
+```
+
+#### Multi-Platform Support
+
+The Docker images are built with multi-platform support for:
+
+- `linux/amd64` (Intel/AMD 64-bit)
+- `linux/arm64` (Apple Silicon M1/M2/M3)
+
+#### Automated Builds with GitHub Actions
+
+This project includes a GitHub Actions workflow that automatically builds and
publishes Docker images to both GitHub
+Container Registry and Docker Hub.
+
+**Triggers:**
+
+- Push to `main` branch - Builds and publishes images tagged with
`version-SHA` and `latest`
+- Version tags (e.g., `v1.0.0`) - Builds and publishes images tagged with the
version number and `latest`
+- Pull requests - Builds and tests only (no publishing)
+
+**Published Images:**
+
+- GitHub Container Registry: `ghcr.io/OWNER/solr-mcp:TAG`
+- Docker Hub: `DOCKERHUB_USERNAME/solr-mcp:TAG`
+
+**Setup for Docker Hub Publishing:**
+
+To enable Docker Hub publishing, configure these repository secrets:
+
+1. Go to your GitHub repository Settings > Secrets and variables > Actions
+2. Add the following secrets:
+ - `DOCKERHUB_USERNAME`: Your Docker Hub username
+ - `DOCKERHUB_TOKEN`: Docker Hub access token (create at
https://hub.docker.com/settings/security)
+
+**Note:** GitHub Container Registry publishing works automatically using the
`GITHUB_TOKEN` provided by GitHub Actions.
+
+#### Running the Docker Container
+
+Run the container with STDIO mode:
+
+```bash
+docker run -i --rm solr-mcp:0.0.1-SNAPSHOT
+```
+
+Or with custom Solr URL:
+
+```bash
+docker run -i --rm \
+ -e SOLR_URL=http://your-solr-host:8983/solr/ \
+ solr-mcp:0.0.1-SNAPSHOT
+```
+
+**Note for Linux users:** If you need to connect to Solr running on the host
machine, add the `--add-host` flag:
+
+```bash
+docker run -i --rm \
+ --add-host=host.docker.internal:host-gateway \
+ solr-mcp:0.0.1-SNAPSHOT
+```
### 4. Building Docker Images (Optional)
@@ -343,7 +464,7 @@ You can add this MCP server to Claude Desktop using either
the JAR file or Docke
"command": "java",
"args": [
"-jar",
-
"/absolute/path/to/solr-mcp-server/build/libs/solr-mcp-server-0.0.1-SNAPSHOT.jar"
+
"/absolute/path/to/solr-mcp/build/libs/solr-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"SOLR_URL": "http://localhost:8983/solr/",
@@ -354,7 +475,7 @@ You can add this MCP server to Claude Desktop using either
the JAR file or Docke
}
```
-**Note:** Replace `/absolute/path/to/solr-mcp-server` with the actual path to
your project directory.
+**Note:** Replace `/absolute/path/to/solr-mcp` with the actual path to your
project directory.
### Option 2: Using Docker Container
@@ -377,7 +498,7 @@ You can add this MCP server to Claude Desktop using either
the JAR file or Docke
"run",
"-i",
"--rm",
- "solr-mcp-server:0.0.1-SNAPSHOT"
+ "solr-mcp:0.0.1-SNAPSHOT"
],
"env": {
"SOLR_URL": "http://localhost:8983/solr/"
@@ -403,7 +524,7 @@ host:
"-i",
"--rm",
"--add-host=host.docker.internal:host-gateway",
- "solr-mcp-server:0.0.1-SNAPSHOT"
+ "solr-mcp:0.0.1-SNAPSHOT"
],
"env": {
"SOLR_URL": "http://host.docker.internal:8983/solr/"
@@ -428,7 +549,7 @@ If you've pushed the image to Docker Hub or GitHub
Container Registry, you can u
"run",
"-i",
"--rm",
- "YOUR_DOCKERHUB_USERNAME/solr-mcp-server:0.0.1-SNAPSHOT"
+ "YOUR_DOCKERHUB_USERNAME/solr-mcp:0.0.1-SNAPSHOT"
],
"env": {
"SOLR_URL": "http://localhost:8983/solr/"
@@ -449,7 +570,7 @@ If you've pushed the image to Docker Hub or GitHub
Container Registry, you can u
"run",
"-i",
"--rm",
- "ghcr.io/YOUR_GITHUB_USERNAME/solr-mcp-server:0.0.1-SNAPSHOT"
+ "ghcr.io/YOUR_GITHUB_USERNAME/solr-mcp:0.0.1-SNAPSHOT"
],
"env": {
"SOLR_URL": "http://localhost:8983/solr/"
diff --git a/build.gradle.kts b/build.gradle.kts
index 56b39db..1936d13 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -78,7 +78,7 @@ dependencyManagement {
// Configures Spring Boot plugin to generate build metadata at build time
// This creates META-INF/build-info.properties containing:
-// - build.artifact: The artifact name (e.g., "solr-mcp-server")
+// - build.artifact: The artifact name (e.g., "solr-mcp")
// - build.group: The group ID (e.g., "org.apache.solr")
// - build.name: The project name
// - build.version: The version (e.g., "0.0.1-SNAPSHOT")
@@ -256,7 +256,7 @@ tasks.register<Test>("dockerIntegrationTest") {
// ----------------
// 1. Build to Docker daemon (requires Docker installed):
// ./gradlew jibDockerBuild
-// Creates image: solr-mcp-server:0.0.1-SNAPSHOT
+// Creates image: solr-mcp:0.0.1-SNAPSHOT
//
// 2. Build to local tar file (no Docker required):
// ./gradlew jibBuildTar
@@ -265,11 +265,11 @@ tasks.register<Test>("dockerIntegrationTest") {
//
// 3. Push to Docker Hub (requires authentication):
// docker login
-// ./gradlew jib
-Djib.to.image=dockerhub-username/solr-mcp-server:0.0.1-SNAPSHOT
+// ./gradlew jib -Djib.to.image=dockerhub-username/solr-mcp:0.0.1-SNAPSHOT
//
// 4. Push to GitHub Container Registry (requires authentication):
// echo $GITHUB_TOKEN | docker login ghcr.io -u GITHUB_USERNAME
--password-stdin
-// ./gradlew jib
-Djib.to.image=ghcr.io/github-username/solr-mcp-server:0.0.1-SNAPSHOT
+// ./gradlew jib
-Djib.to.image=ghcr.io/github-username/solr-mcp:0.0.1-SNAPSHOT
//
// Authentication:
// ---------------
@@ -293,7 +293,7 @@ tasks.register<Test>("dockerIntegrationTest") {
// - SOLR_URL=http://host.docker.internal:8983/solr/ (default Solr connection)
//
// These can be overridden at runtime:
-// docker run -e SOLR_URL=http://custom-solr:8983/solr/
solr-mcp-server:0.0.1-SNAPSHOT
+// docker run -e SOLR_URL=http://custom-solr:8983/solr/
solr-mcp:0.0.1-SNAPSHOT
jib {
from {
// Use Eclipse Temurin JRE 25 as the base image
@@ -317,7 +317,7 @@ jib {
to {
// Default image name (can be overridden with -Djib.to.image=...)
// Format: repository/image-name:tag
- image = "solr-mcp-server:$version"
+ image = "solr-mcp:$version"
// Tags to apply to the image
// The version tag is applied by default, plus "latest" tag
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 881dbc5..8373d94 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,4 +15,4 @@
* limitations under the License.
*/
-rootProject.name = "solr-mcp-server"
+rootProject.name = "solr-mcp"
diff --git a/sonar-project.properties b/sonar-project.properties
deleted file mode 100644
index a35d2e1..0000000
--- a/sonar-project.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-sonar.projectKey=solr-mcp-server
-sonar.projectName=Solr MCP Server
-sonar.projectVersion=0.0.1-SNAPSHOT
-
-sonar.sources=src/main/java
-sonar.tests=src/test/java
-sonar.java.binaries=build/classes
-
-sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml
-
-sonar.java.source=21
-sonar.java.target=21
\ No newline at end of file
diff --git a/src/main/resources/application.properties
b/src/main/resources/application.properties
index 4be311c..316bbb8 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,4 +1,4 @@
-spring.application.name=solr-mcp-server
+spring.application.name=solr-mcp
spring.profiles.active=${PROFILES:stdio}
spring.ai.mcp.server.instructions=This server provides tools to interact with
Apache Solr using Model Context Protocol (MCP) over STDIO and/or HTTP.
spring.ai.mcp.server.name=${spring.application.name}
diff --git
a/src/test/java/org/apache/solr/mcp/server/DockerImageHttpIntegrationTest.java
b/src/test/java/org/apache/solr/mcp/server/DockerImageHttpIntegrationTest.java
index 05bd0ed..7d2b93e 100644
---
a/src/test/java/org/apache/solr/mcp/server/DockerImageHttpIntegrationTest.java
+++
b/src/test/java/org/apache/solr/mcp/server/DockerImageHttpIntegrationTest.java
@@ -63,7 +63,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
* ./gradlew jibDockerBuild
* }</pre>
*
- * <p>This will create the image: {@code solr-mcp-server:0.0.1-SNAPSHOT}
+ * <p>This will create the image: {@code solr-mcp:0.0.1-SNAPSHOT}
*
* <p><strong>Test Architecture:</strong>
*
@@ -86,7 +86,7 @@ class DockerImageHttpIntegrationTest {
LoggerFactory.getLogger(DockerImageHttpIntegrationTest.class);
// Docker image name and tag from build.gradle.kts
- private static final String DOCKER_IMAGE =
"solr-mcp-server:0.0.1-SNAPSHOT";
+ private static final String DOCKER_IMAGE = "solr-mcp:0.0.1-SNAPSHOT";
private static final String SOLR_IMAGE = "solr:9.9-slim";
private static final int HTTP_PORT = 8080;
diff --git
a/src/test/java/org/apache/solr/mcp/server/DockerImageStdioIntegrationTest.java
b/src/test/java/org/apache/solr/mcp/server/DockerImageStdioIntegrationTest.java
index a8cb4ca..1c801c3 100644
---
a/src/test/java/org/apache/solr/mcp/server/DockerImageStdioIntegrationTest.java
+++
b/src/test/java/org/apache/solr/mcp/server/DockerImageStdioIntegrationTest.java
@@ -54,7 +54,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
* ./gradlew jibDockerBuild
* }</pre>
*
- * <p>This will create the image: {@code solr-mcp-server:0.0.1-SNAPSHOT}
+ * <p>This will create the image: {@code solr-mcp:0.0.1-SNAPSHOT}
*
* <p><strong>Test Architecture:</strong>
*
@@ -77,7 +77,7 @@ class DockerImageStdioIntegrationTest {
LoggerFactory.getLogger(DockerImageStdioIntegrationTest.class);
// Docker image name and tag from build.gradle.kts
- private static final String DOCKER_IMAGE =
"solr-mcp-server:0.0.1-SNAPSHOT";
+ private static final String DOCKER_IMAGE = "solr-mcp:0.0.1-SNAPSHOT";
private static final String SOLR_IMAGE = "solr:9.9-slim";
// Network for container communication