Use WireHQ with your AI agent

WireHQ is job costing and field management for electrical contractors. Everything your office does in the app — looking up a job's live profitability, adding a customer, opening a job, writing an estimate, drafting and sending an invoice — your own AI assistant can do too, through an MCP server, a REST API with an OpenAPI document, or the command-line toolwirehq-cli. It works with Claude Code, claude.ai and Claude Desktop, Cursor, ChatGPT and Codex, VS Code, or any script.

1. Create an API key

Sign in, open Settings ▸ Agent access, name the key and choose its scope. A read key can look things up; a write key can also create and send. The key is shown once — copy it then. It acts as you, inside your company, under your plan: an agent can never see another shop's data or do anything your own login could not. You can revoke a key at any time, and every call an agent makes is listed on the same page with the key that made it.

2. Connect your client to the MCP server

The MCP endpoint is https://prewire.tech/mcp (Streamable HTTP). Send the key as a bearer token.

Claude Code

claude mcp add --transport http wirehq https://prewire.tech/mcp \
  --header "Authorization: Bearer $WIREHQ_API_KEY"

claude.ai and Claude Desktop

Settings ▸ Connectors ▸ Add custom connector. URL: https://prewire.tech/mcp. Under request headers add Authorization: Bearer wh_sk_….

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "wirehq": {
      "url": "https://prewire.tech/mcp",
      "headers": { "Authorization": "Bearer ${env:WIREHQ_API_KEY}" }
    }
  }
}

Codex (~/.codex/config.toml) and ChatGPT

[mcp_servers.wirehq]
url = "https://prewire.tech/mcp"
bearer_token_env_var = "WIREHQ_API_KEY"

The server also exposes the read-only search and fetch tools ChatGPT's connectors look for.

VS Code (.vscode/mcp.json)

{
  "servers": {
    "wirehq": {
      "type": "http",
      "url": "https://prewire.tech/mcp",
      "headers": { "Authorization": "Bearer ${input:wirehq-key}" }
    }
  }
}

3. Or use the command line

The CLI is the npm package wirehq-cli (Node 18+, no dependencies):

npx wirehq-cli login                 # paste the key; saved with mode 600
npx wirehq-cli jobs --status active
npx wirehq-cli job <job_id>          # live profitability
npx wirehq-cli invoice create --job <job_id> --amount-cents 480000
npx wirehq-cli invoice send <invoice_id> --yes
npx wirehq-cli --help

Add --json for machine-readable output, or set WIREHQ_API_KEY instead of logging in.

4. Or call the REST API

The OpenAPI 3.1 document is at https://prewire.tech/openapi.json.

curl https://prewire.tech/api/v1/jobs?status=active \
  -H "Authorization: Bearer $WIREHQ_API_KEY"

What an agent can do

With a read key

  • whoami — the user, company, key scope and subscription status the key acts as
  • list_jobs / get_job — jobs, and one job with its live P&L: estimated vs actual labor and materials, margin %, and crew hours left before it stops making money after overhead
  • get_overhead — the shop's monthly overhead and the overhead per crew hour every job carries
  • list_customers — your customer list
  • list_invoices / list_estimates — invoices (locked, draft, sent, partial, paid, void, or overdue = sent and past due) and estimates
  • search / fetch — text search across jobs, customers and invoices, in the shape ChatGPT connectors expect

Also with a write key

  • create_customer / create_job — add a customer, or a job for one (starts as an estimate)
  • create_estimate — a draft estimate from line items, with the customer approval link
  • create_invoice — a draft invoice on a job (not visible to the customer until sent)
  • update_job_status — move a job through the same state machine the app enforces
  • send_invoice — make a draft invoice payable from the customer portal
  • set_overhead — set the shop's monthly overhead and crew hours a month (owner or office)
  • record_field_entries — clock-ins, clock-outs and material pulls made on site, in order; you choose each id, so a resend is reported as already recorded and never counted twice (CLI: wirehq field clock-in | clock-out | pull | send)

Safety rules the server enforces

  • Sending an invoice, and moving a job to lost, cancelled or invoiced, need an explicit confirm: true. Without it the agent is told what would happen so it can ask you first. The CLI asks for --yes.
  • No agent can take, move or refund money, change your subscription, set up payouts, invite or remove people, or delete the account. Those stay in the app, in front of you.
  • Job costs and margins are internal to your shop; your customers never see them.
  • 120 calls per minute per key. Call records are kept 90 days.
  • The same subscription rules apply as in the app: if the free month ends or a subscription lapses, agent calls get the same "subscription required" answer the app shows (with a link to billing) until an owner subscribes. A failed payment pauses changes but keeps reads.

Questions

Email support@prewire.tech. WireHQ is a product of Heron Networks LLC.