# GeoBuddy MCP — Claude Desktop Installer (.mcpb)

This folder builds the one-click Claude Desktop installer for GeoBuddy's MCP
endpoint. Customers download the `.mcpb` file, double-click it, and enter
their site URL + API key (from **GeoBuddy > AI / MCP** in wp-admin) — Claude
Desktop handles the rest.

## How it works

`manifest.json` declares a `node`-type server, but `server/index.js` is a stub
that's never run. The real launch command, wired up via `server.mcp_config`,
is:

```
npx -y mcp-remote <site_url>/wp-json/geobuddy-mcp/v1/mcp --transport http-only --header X-MCP-Key:<api_key>
```

`mcp-remote` bridges Claude Desktop's local stdio transport to the site's
remote Streamable HTTP MCP endpoint, authenticating with the `X-MCP-Key`
header. `site_url` and `api_key` are collected from the customer via the
manifest's `user_config` fields and substituted in with
`${user_config.site_url}` / `${user_config.api_key}`.

## Building

From the plugin root:

```bash
npm run build:mcpb
```

This runs `mcpb validate manifest.json` followed by `mcpb pack .`, producing
`geobuddy-mcp.mcpb` for distribution. Requires the `mcpb` CLI
(`@anthropic-ai/mcpb`), invoked via `npx` — no local install needed.

## Bumping version

Keep `manifest.json`'s `version` in sync with `GEOBUDDY_VERSION` in
`geobuddy.php` when cutting a new plugin release.
