solr-mcp AGENTS.md

Instructions for Solr MCP Server, a Java service that lets AI assistants search, index, and manage Apache Solr collections through the Model Context Protocol. It documents the project setup, build commands, tests, and formatting requirements.

In plain words
What is it for?
Use it to develop, build, test, format, or generate a software bill of materials for the Solr MCP server.
Why use it?
It helps coding agents follow the repository's Java, Spring Boot, Gradle, testing, and formatting conventions when changing the server.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/apache/solr-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/apache/solr-mcp

Made for: Codex, OpenCode.

Per session 5,350 This file is loaded in full into every session.
When invoked 5,350 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.05350 $0.05350
Opus 5 $0.02675 $0.02675
Sonnet 5 $0.01070 $0.01070
Haiku 4.5 $0.00535 $0.00535

Measured 2d ago against content hash 598f98ffacc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solr-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 366 lines

How it starts

The opening of the file, as written. The whole thing — 366 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This file provides guidance to AI coding assistants when working with code in this repository.

Project Overview

Solr MCP Server is a Spring AI Model Context Protocol (MCP) server that enables AI assistants to interact with Apache Solr. It provides tools for searching, indexing, and managing Solr collections through the MCP protocol.

  • Status: Apache incubating project (v0.0.2-SNAPSHOT)
  • Java: 25+ (centralized in build.gradle.kts)
  • Framework: Spring Boot 3.5.14, Spring AI 1.1.7
  • License: Apache 2.0

Common Commands

# Build and test
./gradlew build                    # Full build with tests
./gradlew assemble                 # Build without tests (faster)

# Testing
./gradlew test                               # Run all tests
./gradlew test --tests SearchServiceTest     # Run specific test class
./gradlew test --tests "*IntegrationTest"    # Run integration tests
./gradlew test jacocoTestReport              # Tests with coverage report

# SBOM (Software Bill of Materials)
./gradlew cyclonedxBom                       # Generate build/reports/application.cdx.json

# Code formatting (REQUIRED before commit)
./gradlew spotlessApply            # Apply formatting
./gradlew spotlessCheck            # Check formatting

# Docker images
./gradlew jibDockerBuild                                  # JVM (Jib):    solr-mcp:<v>                  (both stdio + http)
./gradlew bootBuildImage -Pnative                         # Native stdio: solr-mcp:<v>-native-stdio
./gradlew bootBuildImage -Pnative -Pprofile=http          # Native http:  solr-mcp:<v>-native-http
./gradlew dockerIntegrationTest                           # Test JVM Jib (stdio + http + MCP stdio)
./gradlew dockerIntegrationTest -Pnative                  # Test native stdio
./gradlew dockerIntegrationTest -Pnative -Pprofile=http   # Test native http

# Native image (requires GraalVM JDK 25; -Pnative applies the graalvm-native plugin)
./gradlew nativeCompile -Pnative             # Compile native binary (host OS only)
./gradlew nativeTest -Pnative                # Run tests as native image

# Run locally (requires `docker compose up -d` for Solr)
./gradlew bootRun                  # STDIO mode (default)
PROFILES=http ./gradlew bootRun    # HTTP mode

Read the full file on GitHub · 366 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 366 lines · 5,350 tokens per session scan A 598f98ffacc7

Subscribe to this mod's changes

solr-mcp AGENTS.md is an instructions file published in the GitHub repository apache/solr-mcp (19 stars, last pushed 14d ago), licensed Apache-2.0. It adds 5,350 tokens to every session, about $0.0267 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.