Skip to main content
Glama
README.md
# desertcool

Is the air conditioning out in El Paso, and who do you call? desertcool is a local forwarding client for the hosted El Paso Air referral MCP service: it answers `tools/list` locally from the captured tool definitions and forwards every call to the service, returning the answers exactly as the service sends them back.

This package serves a 2-tool subset of the upstream surface: the two read-only tools that publish facts about the referral service and check whether a ZIP code is in its area. The upstream's third tool, which books a service request and has a vetted local pro call a person back, is not part of this package — nothing here books anything, takes a name or phone number, or submits a request.

## The tools

- **`get_service_info`** — Facts about El Paso Air, a free referral service for AC repair in El Paso, Texas: towns served, typical prices, hours, response time, languages and phone. Takes no arguments.
- **`check_service_area`** — Whether a US ZIP code is inside the El Paso service area, returning yes/no and the nearest served town. `zip` is required and must be a 5-digit US ZIP code.

## Install and run

As an MCP server via npm:

```bash
npx -y @reneturcios/desertcool mcp
```

MCP client configuration:

```json
{
  "mcpServers": {
    "desertcool": {
      "command": "npx",
      "args": ["-y", "@reneturcios/desertcool", "mcp"]
    }
  }
}
```

As a container:

```bash
docker run -i ghcr.io/cloudcorprecords/desertcool
docker run --rm ghcr.io/cloudcorprecords/desertcool check_service_area '{"zip":"79901"}'
```

## CLI

One binary serves both the command line and the MCP server. Each tool is a subcommand taking a single JSON string with that tool's arguments:

```bash
desertcool get_service_info '{}'
desertcool check_service_area '{"zip":"79901"}'
desertcool --version
```

Exit codes: `0` when the forwarded call succeeds, `1` when the upstream result is an error, and `2` for usage problems such as an unknown subcommand or a malformed JSON argument.

## Configuration

- `DESERTCOOL_MCP_URL` — Overrides the upstream endpoint. The default is the pinned hosted endpoint, `https://elpasoair.com/mcp`. (The override variable is a reconstruction added by this rebuild.)

The upstream registry record declares no auth headers and the tool surface was captured keyless, so no authentication header is ever sent.

Upstream failures — a JSON-RPC error from the service, a non-2xx response, an unreadable body, or a request that fails outright — are reported to the caller as an error result whose text starts with `desertcool error:`.

## How forwarding works

The first forwarded call opens a session: an `initialize` request (protocol version `2025-03-26`), followed by a `notifications/initialized` notification, then the `tools/call` itself. If the service answers the initialize request with an `Mcp-Session-Id` header, that value is carried on every later request, and the open session is reused for the rest of the process. Replies are accepted either as plain JSON or as server-sent events. Successful results pass through verbatim, including any `isError` flag and any extra fields the service includes.

## Development

```bash
npm install
npm run build   # tsc -> dist/ (dist/cli.js is the bin)
npm test        # tsx --test test/*.test.ts — stubbed upstream, no network
npm run dev     # run the CLI from source
```

The test suite checks the served tool list against the captured surface (the 2 served tools, deep-equal, titles included exactly as captured, and each `required` list exactly as captured), asserts that the omitted `request_service` tool is absent at registry, MCP and CLI level, exercises the session handshake and its reuse, verifies that no `Authorization` or `X-API-Key` header is ever sent under any environment, and verifies that arguments go upstream untouched and results come back untouched.

## License

MIT — see `LICENSE`. Copyright (c) 2026 Rene Turcios.