agentleFS
SolaceProductsSolaceProducts/solace-broker-mcp/CLAUDE.md

solace-broker-mcp

CLAUDE.md18 starsChanged 4 months agoApache-2.0View on GitHub

Go MCP server exposing Solace broker monitoring/management tools over SEMP. Architecture and diagrams: docs/_internal/architecture.md. - make check — build, vet, lint, race-enabled tests with the 85% coverage gate (docs/_internal/unit-test-coverage.md). Matches CI's build/lint/test jobs (CI additionally runs the E2E jobs below); run before pushing. - make test — unit tests. Single test: go test ./internal/<pkg>/ -run TestName -v - make test-cover — unit tests + coverage gate only (no vet/lint) - make helm-check — Helm chart lint, kubeconform, helm-unittest (deploy/charts/) and…

The file

We split this CLAUDE.md into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only for logic YAML can't express (e.g.

    line 29
  2. Very specific:

    Never declare a broker parameter — it is auto-injected at registration into the schema of every tool defined through either mechanism …

    line 31
  3. Very specific:

    Run /check-logs to scan for logging security violations.

    line 56
  4. Very specific:

    Every commit needs a DCO Signed-off-by trailer — the required DCO check blocks a PR without one.

    line 59
  5. Very specific:

    If the change touches production surface (internal/config/, tool definitions in internal/composite/definitions/tools.yaml, native tool …

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Solace Broker MCP Server

Go MCP server exposing Solace broker monitoring/management tools over SEMP. Architecture and diagrams: docs/_internal/architecture.md.

Commands

  • make check — build, vet, lint, race-enabled tests with the 85% coverage gate (docs/_internal/unit-test-coverage.md). Matches CI's build/lint/test jobs (CI additionally runs the E2E jobs below); run before pushing.
  • make test — unit tests. Single test: go test ./internal/<pkg>/ -run TestName -v
  • make test-cover — unit tests + coverage gate only (no vet/lint)
  • make helm-check — Helm chart lint, kubeconform, helm-unittest (deploy/charts/) and the chart-vs-deploy/kubernetes/ drift check, same steps as CI's helm-chart job. Not part of make check; run it when the chart or deploy/kubernetes/ changes. Tool prerequisites (incl. yq, dyff): deploy/charts/solace-broker-mcp/README.md.
  • make e2e-all — the test/e2e-basic-mcp suite against Dockerized brokers, full lifecycle (up, run, teardown). CI also runs the oauth and monitoring E2E suites (docs/_internal/e2e-testing.md).
  • CI (.github/workflows/build-and-test.yml) is the source of truth; if the Makefile drifts, CI wins.

Adding a tool

Two mechanisms — prefer the first:

  1. Composite (YAML): declare in internal/composite/definitions/tools.yaml (embedded at build time). Multi-step SEMPv2 calls, templates, pagination.
  2. Native Go handler: internal/tools/sempv1/, one package per tool. Only for logic YAML can't express (e.g. SEMPv1 XML parsing).

Never declare a broker parameter — it is auto-injected at registration into the schema of every tool defined through either mechanism (injectBrokerParam in internal/tools/register.go). A tool that genuinely takes no broker parameter and resolves no SEMP client — list-brokers and describe-semp-schema are the two today — sets Metadata.NoBroker: true instead of declaring one: ToolManager.CallTool skips broker resolution for it but still runs full input-schema validation, exactly as it does for every other tool. Both are registered into the ToolManager like any other handler (RegisterListBrokers/RegisterDescribeSempSchema in internal/tools/), not against the MCP server directly — server.AddTool is reachable from exactly one place, RegisterWithServer, and TestServerAddToolHasOneCallSite enforces that a new tool cannot bypass it the way these two used to.

Tool naming

MCP tool names use kebab-case — e.g. get-broker-status, list-queues, get-redundancy-status. This applies to every tool the server exposes, regardless of whether it's defined in YAML (composite) or implemented in Go (native SEMPv1/SEMPv2). Avoid snake_case and camelCase.

Match the in-code constant or Name: field exactly to the on-the-wire tool name; LLMs see and pattern-match against this string.

Before committing

Run /check-logs to scan for logging security violations. Fix all CRITICAL and HIGH issues before committing. Rules: docs/_internal/secure-logging-rules.md.

Every commit needs a DCO Signed-off-by trailer — the required DCO check blocks a PR without one. make hooks (once per clone) installs a prepare-commit-msg hook that adds it automatically; otherwise commit with git commit -s.

Before opening a PR

If the change touches production surface (internal/config/, tool definitions in internal/composite/definitions/tools.yaml, native tool packages under internal/tools/, the Helm chart under deploy/charts/, or the raw manifests under deploy/kubernetes/; the pattern is SURFACE_RE in .github/scripts/production-surface.sh), add a CHANGELOG.md entry under [Unreleased] — run /changelog to draft one from your diff. CI posts an advisory warning (not a block) on a behavior-changing PR with no [Unreleased] update, unless it carries the no-changelog label. The hard gate is at release time: cutting a release fails if the version's CHANGELOG block is missing, so entries must land before then.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.