Roofpeace
运营屋顶施工公司:管理工作、理赔、报价、发票、日程安排和风暴线索。
托管 MCP 服务器
npx add-mcp 'https://roofpeace.com/api/mcp'可安装到 Claude Code、Codex、Cursor 等客户端
文档
Roofpeace agent API
Roofpeace is a roofing business operating backend. Muse and other agents use
HTTPS JSON endpoints at https://roofpeace.com/api/v1; no browser login, UI
automation, signup, or email approval is needed by an agent.
MCP server: https://roofpeace.com/api/mcp (streamable HTTP). Clients that
support OAuth, such as Muse, Claude and ChatGPT, connect with no key: a company
owner or admin signs in and approves. See MCP server below.
Search for Agents (no key): GET or QUERY https://roofpeace.com/.well-known/search?q={query}
returns ranked Markdown snippets from Roofpeace's public docs, pricing, /about,
blog articles, hail history and roofer directory. Public pages also support
Accept: text/markdown content negotiation.
Start
- A company owner or admin visits
/settings/agent-access, opens "API keys for developers", names the key, chooses view only or view and change, then creates it. Admins' keys work while they remain an admin. The company must already have an active plan or trial; activation happens at/onboarding/billing. - The person who made it places the one-time
rp_live_...key in the agent's secret store. Never put it in chat, URLs, source files, logs or research attachments. - Read
/api/v1/openapi.json. SendAuthorization: Bearer <stored key>. - Call
GET /me. Verifyorg_id, company name,scopes,expires_at, andaccess_active. Stop on a company mismatch.GET /meremains available for a valid key even when company billing has expired. - Perform only actions within the granted scopes and the person's task.
The agent needs ordinary HTTP access and secure secret storage, not a Roofpeace SDK, browser session or Muse-specific plugin. Use one key per agent so attribution and revocation remain independent.
Free roofing estimate PDF (no key)
POST https://roofpeace.com/api/estimate-template needs no account or key. Use the
contractor's own prices; Roofpeace supplies none and does not save the estimate
(one waiting to be emailed is kept until it is sent, at most a day).
Without send_to the response is the PDF. With send_to it returns 202 JSON and
emails that address a link; the PDF is sent once they tap "Send my estimate" (the
link lasts a day). The confirmed address and company name are kept as a sales lead.
Only send to someone who asked for it, and tell them about the follow-up.
curl -X POST https://roofpeace.com/api/estimate-template \
-H "Content-Type: application/json" \
-o roofing-estimate.pdf \
-d '{"company":"Mesa Roofing","customer":"Pat Lee","address":"123 Main St",
"lines":[{"description":"Install architectural shingles","quantity":24,
"unit":"square","price":425,"waste":10}],
"tax_percent":8.25,"deposit_percent":50,"terms":"Net 15."}'
lines(required, up to 100):description,quantity,price, optionalwastepercent, andunit:square,linear ft,sheet,each(default) orload.- Optional:
details,phone,email,tax_percent,deposit_percent,terms,date,send_to, andlogoas a PNG or JPEG data URL. - Limits: 30 requests an hour per connection. Emails: 5 an hour per connection and 3
a day per address. Errors return JSON with
detail: 422 for bad input, 429 withRetry-Afterwhen limited, and 502 if an email fails to send. An address that unsubscribed or complained gets 422.
Permissions and operations
All paths below are relative to /api/v1.
| Permission | Operations |
|---|---|
jobs:read | GET /jobs; GET /jobs/{job_id} |
jobs:write | POST /jobs; PATCH /jobs/{job_id}; PATCH /jobs/{job_id}/state |
research:write | POST /research |
workspace:read | GET /service-areas; GET /buildings; GET /buildings/{building_id}; GET /strikes; GET /strikes/{strike_id} |
workspace:write | POST /service-areas |
crm:read | GET /crm/pipeline; GET /crm/buildings/{building_id}/summary; GET /crm/inquiries/{inquiry_id}/summary |
crm:write | POST /crm/buildings/{building_id}/notes; PATCH /crm/buildings/{building_id}/stage; POST /crm/inquiries/{inquiry_id}/notes; POST /crm/buildings/{building_id}/tasks; POST /crm/inquiries/{inquiry_id}/tasks |
marketing:read | GET /marketing/ads; GET /marketing/leads; GET /marketing/learning; GET /marketing/feedback; GET /marketing/feedback/{id} |
marketing:draft | POST /marketing/ads/{ad_id}/revisions; PATCH /marketing/ad-revisions/{revision_id}; POST /marketing/ad-revisions/{revision_id}/comments |
New keys default to read-only workspace/CRM/marketing/jobs access. Writes must be selected explicitly. Existing keys retain their existing scopes. Internal founder keys are separate, read-only, and cannot be issued by customers.
Directory profiles
Directory ownership is separate from company membership. An agent needs the
explicit directory:write permission and a currently verified, unbanned delegated
Roofpeace account. Verification is checked on every request. Existing keys do not
receive this permission automatically. An approved claim is required for edits to
each individual business; company access alone never grants directory ownership.
Use GET /api/directory?slug=overture-UUID to read your claim and approved fields.
Use POST /api/directory with a JSON body and the same bearer key:
- Claim:
{ "action": "claim", "slug": "overture-UUID", "id": "UUID", "evidence": "Your role and evidence (20-3000 characters)" }. - Edit:
{ "action": "edit", "slug": "overture-UUID", "id": "UUID", "revision": 0, "fields": { "business_name": "Name", "phone": "", "website": "", "business_type": "unknown", "description": "", "service_areas": "" } }.
Reuse the body id for retries. Read the current revision before submitting an
edit. A 409 means the listing changed or another change is awaiting review.
Business types are unknown, residential, commercial, both, supplier,
and manufacturer. Claims and edits enter a private review queue. Agents cannot
approve claims, publish edits, classify businesses, or resolve reports. New contact
links remain hidden until a verified human reviewer corroborates them. The public
search and business profiles remain available without an account.
MCP server
Roofpeace also serves the Model Context Protocol at https://roofpeace.com/api/mcp
(streamable HTTP, stateless). MCP clients that support OAuth, such as Muse, connect
without a key: the server's 401 points to
/.well-known/oauth-protected-resource/api/mcp, and a company owner or admin signs
in and chooses view-only or view-and-update access. Someone who runs more than one
company picks which one. Clients register dynamically, use PKCE and send
resource=https://roofpeace.com/api/mcp. Owners and admins disconnect the agent at
/settings/agent-access. Other clients can use a key made there:
claude mcp add --transport http roofpeace https://roofpeace.com/api/mcp \
--header "Authorization: Bearer $ROOFPEACE_AGENT_KEY"
Only tools allowed by the key's scopes are listed. Tool calls are recorded like
API requests. Write tools take an idempotency_key; reuse it when retrying.
| Tool | Scope | Purpose |
|---|---|---|
get_workspace | any | Company and permissions |
list_jobs | workspace:read | List jobs |
get_job | workspace:read | Get a job |
list_invoices | workspace:read | List a job's invoices |
list_supplements | workspace:read | List a job's supplements |
get_quote | workspace:read | Get a job's quote |
list_tasks | workspace:read | List open tasks |
list_team | workspace:read | List the team |
add_job_note | crm:write | Add a note to a job |
add_job_task | crm:write | Add a task to a job |
complete_task | crm:write | Complete a task |
create_job | crm:write | Create a job |
search_emails | workspace:read | Search emails |
list_job_emails | workspace:read | List a job's emails and drafts |
draft_job_email | crm:write | Save an email draft on a job |
list_job_files | workspace:read | List a job's files, photos, forms and measurements |
list_appointments | workspace:read | List appointments |
set_job_stage | crm:write | Move a job to a stage |
update_job_details | crm:write | Correct a job's address or customer |
set_job_main_contact | crm:write | Choose a job's main contact |
add_person_to_job | crm:write | Put someone on a job |
set_agreement_status | crm:write | Set a job's agreement status |
search_workspace | workspace:read | Search everything |
set_claim_decision | crm:write | Set what the carrier decided on a claim |
ask_for_reinspection | crm:write | Ask the carrier for a re-inspection |
set_work_type | crm:write | Make a job insurance or retail |
find_contacts | workspace:read | Find contacts |
get_contact | workspace:read | Get a contact |
add_contact | crm:write | Add a contact |
update_contact | crm:write | Update a contact |
delete_job | crm:write | Delete a job or quote |
delete_task | crm:write | Delete a task |
delete_file | crm:write | Delete a file or photo |
delete_contact | crm:write | Delete a contact |
delete_lead | crm:write | Delete a lead |
void_invoice | crm:write | Void an invoice |
list_deleted | workspace:read | List deleted things |
restore_deleted | crm:write | Bring back something deleted |
get_quickbooks_status | workspace:read | QuickBooks status |
get_money | workspace:read | Money owed to the company |
get_schedule | workspace:read | Production schedule |
list_paperwork | workspace:read | Supplier paperwork waiting |
list_notes | workspace:read | List standalone notes |
add_workspace_note | crm:write | Add a standalone note |
list_subcontractors | workspace:read | List subcontractors and balances |
list_stock | workspace:read | List shop stock and material orders |
list_chat_threads | workspace:read | List team chat threads |
read_chat_thread | workspace:read | Read messages in a chat thread |
list_licenses | workspace:read | Licenses and insurance |
start_license_renewal | crm:write | Track a license or policy renewal |
record_license_renewal | crm:write | Record a renewed license or policy |
get_today | crm:read | Today's calls and follow-ups |
get_lead | crm:read | One website lead |
list_storm_alerts | workspace:read | Recent storm alerts |
get_door_list | workspace:read | Ranked, routed door list for a storm alert |
search_properties | workspace:read | Search ranked properties |
get_property | workspace:read | Property detail |
get_roof_code | workspace:read | Roof insulation code |
record_door_outcome | crm:write | Record a door outcome |
add_follow_up_task | crm:write | Add a follow-up task |
check_coverage | any | Check coverage |
get_website_copy | marketing:website | Read website copy |
edit_website_copy | marketing:website | Edit website copy |
submit_research | research:write | Submit sourced research |
get_door_list and search_properties accept detail: "concise" | "detailed"; concise is the default. MCP also exposes reusable prompts (morning_briefing, catch_up_on_job, storm_door_plan) and read-only resources (roofpeace://workspace, roofpeace://today). On MCP write tools, idempotency_key is optional: pass one to safely retry after a timeout, or omit it for a one-shot write.
Return research
POST /research with Content-Type: application/json and a unique
Idempotency-Key header:
{
"observation": "The source describes a repeated manual handoff.",
"source": "Interview or publication title",
"received_on": "2026-09-22",
"evidence_url": "https://example.com/source",
"hypothesis": "Sharing the job record might reduce repeated entry.",
"proposed_change": "Ask the team to validate this with a real job."
}
observation, source, received_on, and HTTP(S) evidence_url are required.
Separate observed facts from hypotheses. No server fetch of that URL occurs.
Findings are attributed to the agent and saved as new/pending in Marketing
research. Agents cannot declare a reviewed outcome, overwrite human research,
or qualify leads. Read them back through /marketing/feedback when granted
marketing:read. To correct a finding, submit a new observation referencing it.
Reliable writes
Every REST mutation requires a stable Idempotency-Key header (1–100 characters). Retry the
same method, path, key and JSON payload after a transport error; successful
retries return the original result with Idempotent-Replay: true. Reusing the
key with different data returns 409. Honor Retry-After for in-progress writes.
Never change the idempotency key just to bypass an ambiguous failure. (On MCP
write tools, idempotency_key is optional and gives the same replay protection
when provided.)
POST /jobs (and the MCP create_job tool) accepts source: "customer" with
customer_name or roof_address (no existing building or inquiry required,
plus optional customer_phone, customer_email, title), or source: "property"
(building_id + title), or source: "inquiry" (inquiry_id + title);
optional assigned_operator_user_id must be a company member. PATCH /jobs/{id}
edits title, stage, claim details and assignment; PATCH /jobs/{id}/state accepts
{ "state": "active" } and enforces allowed transitions.
Read current records before editing and use returned IDs rather than inventing
people, measurements, prices, conversations or completion claims.
For notes use { "body": "..." }. For tasks use title, optional details,
due_at, and a verified assigned_operator_user_id. Omission leaves the task
unassigned. Neither action sends a message.
Errors, renewal and revocation
- 401: missing, expired or revoked key. Stop; ask the person who made it for a replacement.
- 403: insufficient scope, disabled agent or changed ownership. Do not bypass it with browser cookies or owner credentials.
- 402: inactive company. Give the owner
/onboarding/billing; do not purchase a subscription or repeatedly retry work. - 404: unavailable/foreign record or unsupported endpoint.
- 409: conflicting/replayed mutation or invalid transition; inspect before retrying.
- 422: invalid inputs; correct the reported fields.
- 429: honor
Retry-Afterwhere returned and back off.
Owners can rotate or revoke at /settings/agent-access. Rotation invalidates all previous
keys for that agent and issues a 90-day replacement. Initial expiry is 1–365 days
(default 90). Lost keys cannot be recovered; rotate. Revocation rejects subsequent
requests; it does not undo work already committed or cancel an in-flight request.
A revoked agent stays disabled; create a new explicit grant to restore access.
No agent endpoint manages keys, billing, teammates, provider connections, signing approval/sends, or ad publication. Research submission does not approve or publish anything. Agents must not use UI automation to bypass these boundaries.
Legacy /enrollments, status/claim and email-approval routes return 410. They no
longer send email, create companies or issue keys. Already-issued credentials
continue to work until expired, rotated or revoked.