domainledger
README.md
# domainledger
Naming a product is easy; knowing whether the name is actually free is the hard part. domainledger is a small local bridge to the hosted domhaul MCP service: hand it a list of candidate domains and it checks them against live registry (RDAP) data, returning availability alongside a registration price, a 0–100 brandability score and an estimated resale value — so you never present a name that turns out to be taken. A second tool prices top-level domains side by side when you are weighing a .com against a .io.
Nothing is stored or computed on your own machine. This package answers `tools/list` locally from the captured tool definitions and forwards every `tools/call` to the hosted service over a streamable-HTTP JSON-RPC session, returning whatever the service sends back unchanged.
Both captured tools are built — this is the full surface. Both are reads: there is no registration, purchase or checkout tool in the domhaul surface, and none is added here. When a domain is available, the upstream result includes a `buy_url` where the purchase itself happens.
## The tools
- **`check_domains`** — Checks up to 50 fully-qualified domain names (such as `brewlog.app`) for real availability via RDAP. `domains` is required. For each name it returns availability, the registrar when the name is taken, a brandability score, an estimated resale value, the price in USD and the checkout link.
- **`get_tld_prices`** — Returns registrar retail first-year price estimates in USD for up to 20 top-level domains, with or without the leading dot (such as `com`, `.io`, `app`). `tlds` is required. Use it to compare TLD options; for the exact price of one specific domain, use `check_domains`.
## Install and run
As an MCP server via npm:
```bash
npx -y @reneturcios/domainledger mcp
```
MCP client configuration:
```json
{
"mcpServers": {
"domainledger": {
"command": "npx",
"args": ["-y", "@reneturcios/domainledger", "mcp"]
}
}
}
```
As a container:
```bash
docker run -i ghcr.io/cloudcorprecords/domainledger
docker run --rm ghcr.io/cloudcorprecords/domainledger check_domains '{"domains":["brewlog.app","getbrewlog.com"]}'
```
## 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
domainledger check_domains '{"domains":["brewlog.app","getbrewlog.com"]}'
domainledger get_tld_prices '{"tlds":["com",".io","app"]}'
domainledger --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
- `DOMHAUL_MCP_URL` — Overrides the upstream endpoint. The default is the pinned hosted endpoint, `https://www.domhaul.com/api/mcp/mcp`. (The override variable is a reconstruction added by this rebuild.)
No API key is needed or sent: the upstream record declares no auth headers and the tool surface was captured keyless, so domainledger never attaches an `Authorization` or `X-API-Key` header to its requests.
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 `domainledger 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 tool for tool, exercises the session handshake and its reuse, asserts that no credential header is ever sent, and verifies that arguments go upstream untouched and results come back untouched — including upstream error results, SSE-framed replies and failure rendering.
## License
MIT — see `LICENSE`. Copyright (c) 2026 Rene Turcios.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessOutdated data