# BrightConnect MRS Agent Plugin Portable agent plugin exposing the **MRS** (Meter Reading System) MCP connector plus a diagnostics skill. Installs into Claude Code, Codex, and any client implementing the [Agent Plugins 1.0.0](https://agent-plugins.org/specification) spec. ## Layout ``` .claude-plugin/marketplace.json Claude marketplace catalog .agents/plugins/marketplace.json Codex / generic-agent catalog plugins/mrs/ plugin.json agent-plugins 1.0.0 manifest (spec location) mcp.json agent-plugins 1.0.0 MCP config (spec location) .claude-plugin/plugin.json Claude manifest .mcp.json Claude connector .codex-plugin/plugin.json Codex manifest skills/mrs-diagnostics/SKILL.md shared across all three harnesses ``` The spec files and the vendor dirs coexist — different filenames, no collision. ## Install Claude Code: ```bash claude plugin marketplace add && claude plugin install mrs@brightconnect ``` Restart the client afterwards; the skill/command registry is built at startup. ## Auth The connector carries a **bare `url` and no headers**. The server answers an unauthenticated call with 401, and the client discovers `/.well-known/oauth-protected-resource` (RFC 9728), the authorization server metadata (RFC 8414), registers itself (RFC 7591) and runs the PKCE code flow. Scope is `mcp:use`. Nothing to configure and no token to paste. Two constraints on the server side: - The `resource` advertised by the protected-resource-metadata **must exactly match** the URL configured here (`https://mrs.brightconnect.com.au/api/mcp`). A mismatch makes clients abort authentication silently. - `WWW-Authenticate` must be listed in `Access-Control-Expose-Headers`, or browser-based clients cannot read the challenge and discovery never starts. If the deployed server does not yet advertise the discovery endpoints, OAuth cannot start and this connector will not authenticate. Add a bearer-token server manually until it does, then remove it — a manual entry shadows the plugin's. ```bash claude mcp add --transport http mrs https://mrs.brightconnect.com.au/api/mcp --header "Authorization: Bearer " ``` ## Versioning Three manifests carry a version: `plugins/mrs/plugin.json`, `plugins/mrs/.claude-plugin/plugin.json`, `plugins/mrs/.codex-plugin/plugin.json`. Bump all three together, or served and installed versions drift. ```bash grep -rn '"version"' plugins/ ``` `claude plugin install` does not upgrade an installed plugin — bump the version, then `claude plugin marketplace update brightconnect && claude plugin update mrs@brightconnect`.