MCP Server · REST API

Give Your AI Agent
Tax Superpowers

19 tools for receipt processing, expense tracking, IRS schedule reports, audit risk analysis, and deduction gap detection. Works with Claude, Cursor, and any MCP-compatible client.

19Tools
10Free Tools
10Credits on Signup

Quickstart

Connect in under a minute. Get an API key from your account settings, then pick your setup.

Claude Code
claude mcp add --transport http \
  writeoffs-ai https://writeoffs.ai/api/mcp \
  --header "Authorization: Bearer YOUR_KEY"
Cursor / Config JSON
{
  "mcpServers": {
    "writeoffs-ai": {
      "url": "https://writeoffs.ai/api/mcp",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}
curl
curl -X POST https://writeoffs.ai/api/mcp \
  -H "Authorization: Bearer sk-dip-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

API Reference

Everything you need to integrate with the writeoffs.ai MCP server.

JSON-RPC 2.0

All requests use the JSON-RPC 2.0 protocol over HTTP POST. Send requests to https://writeoffs.ai/api/mcp

POST /api/mcp HTTP/1.1
Content-Type: application/json
Authorization: Bearer sk-dip-YOUR_KEY

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": { ... }
  }
}

Use tools/list to discover available tools, or tools/call to invoke a tool.

Authentication

Pass your API key in the Authorization header as a Bearer token. Keys use the sk-dip- prefix.

Authorization: Bearer sk-dip-abc123...

Generate and manage keys from your account settings. Keys are hashed with SHA-256 — we never store the raw key.

Response Headers

Every MCP response includes credit and rate limit headers.

HeaderDescription
X-Credits-RemainingCredits left in your account after this request
X-Credits-UsedCredits consumed by this request (0 or 1)
X-RateLimit-LimitMax requests allowed per window (60)
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Error Responses

Errors return standard JSON-RPC error objects with descriptive messages.

401 — Invalid API key

{ "error": "Invalid API key. Check that your key starts with sk-dip- and has not been revoked." }

402 — Insufficient credits

{ "error": "Insufficient credits. Buy more at https://writeoffs.ai/account" }

429 — Rate limit exceeded

{ "error": "Rate limit exceeded. Retry after the time in the Retry-After header." }

Webhook Callbacks

Pass a callback_url with submit_receipt to receive a POST when processing completes. Webhooks retry up to 3 times with exponential backoff.

Signature Verification

Each webhook includes an HMAC-SHA256 signature for verification:

// Headers sent with each webhook POST:
X-Writeoffs-Signature: sha256=<hex_digest>
X-Writeoffs-Timestamp: <unix_seconds>

// Verify the signature:
const expected = crypto
  .createHmac("sha256", WEBHOOK_SECRET)
  .update(`${timestamp}.${rawBody}`)
  .digest("hex");

if (signature !== `sha256=${expected}`) {
  // Reject — invalid signature
}

Tool Catalog

19 tools across 4 categories. All accessible through a single MCP endpoint. Expand each tool to see parameters and examples.

Receipt Management

7 tools

submit_receipt

Submit a receipt image for AI processing. Returns the parsed receipt ID.

1 credit
ParameterTypeReqDescription
image_base64stringNoBase64-encoded image bytes (max ~3MB before encoding)
image_urlstringNoPublicly accessible image URL
filenamestringNoOptional filename hint (e.g. receipt.jpg)
business_idstringNoBusiness UUID to associate with (optional)
callback_urlstringNoOptional HTTPS URL to POST receipt result when processing completes.
idempotency_keystringNoOptional unique key to prevent duplicate submissions. Same key returns the original receipt.

Request

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "submit_receipt", "arguments": {
    "image_url": "https://example.com/receipt.jpg",
    "business_id": "uuid-here",
    "callback_url": "https://your-server.com/webhook"
  }}}

Response

{ "receipt_id": "abc-123", "status": "processing" }
batch_submit

Submit multiple receipt images in one call (1 credit each, max 50).

1 credit/receipt
ParameterTypeReqDescription
receiptsarrayYesArray of receipt objects to submit (max 50)

Request

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "batch_submit", "arguments": {
    "receipts": [
      { "image_url": "https://example.com/receipt1.jpg", "business_id": "uuid-here" },
      { "image_url": "https://example.com/receipt2.jpg" }
    ]
  }}}

Response

{ "submitted": 2, "deduplicated": 0, "credits_used": 2,
  "results": [
    { "receipt_id": "abc-123", "status": "processing" },
    { "receipt_id": "def-456", "status": "processing" }
  ]}
get_upload_url

Get a presigned upload URL. Required for files >3MB or binary uploads before calling submit_receipt.

Free
ParameterTypeReqDescription
filenamestringYesFilename with extension (e.g. receipt.jpg, scan.pdf)
content_typestringNoMIME type (e.g. image/jpeg, application/pdf). Auto-detected from filename if omitted.
get_receipt

Retrieve a single receipt with category, IRS schedule/line, and business info.

Free
ParameterTypeReqDescription
receipt_idstringYesUUID of the receipt

Request

{ "jsonrpc": "2.0", "id": 2, "method": "tools/call",
  "params": { "name": "get_receipt", "arguments": {
    "receipt_id": "abc-123"
  }}}

Response

{ "id": "abc-123", "status": "confirmed", "vendor": "Home Depot",
  "total": 342.50, "receipt_date": "2026-02-15",
  "dip_categories": { "name": "Repairs", "irs_schedule": "E", "irs_line": "14" }}
batch_status

Get status and parsed data for multiple receipts at once (max 100).

Free
ParameterTypeReqDescription
receipt_idsarrayYesArray of receipt UUIDs to look up (max 100)

Request

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "batch_status", "arguments": {
    "receipt_ids": ["abc-123", "def-456"]
  }}}

Response

{ "receipts": [
    { "id": "abc-123", "status": "confirmed", "vendor": "Home Depot", "total": 342.50 },
    { "id": "def-456", "status": "processing" }
  ]}
download_receipt

Get a temporary signed URL to download a receipt image/PDF.

Free
ParameterTypeReqDescription
receipt_idstringYesUUID of the receipt
confirm_receipt

Confirm a receipt, optionally updating vendor, total, category (by name or ID), or business.

Free
ParameterTypeReqDescription
receipt_idstringYesUUID of the receipt
vendorstringNoVendor name override
totalnumberNoTotal amount override
category_idstringNoCategory UUID override
category_namestringNoCategory name (case-insensitive). Used instead of category_id. Call list_categories to see valid names.
business_idstringNoBusiness UUID to assign this receipt to (optional)

Expense Tracking

4 tools

list_expenses

List confirmed receipts with IRS schedule/line details.

Free
ParameterTypeReqDescription
yearnumberNo4-digit tax year, e.g. 2025
categorystringNoCategory name to filter by (case-insensitive)
limitnumberNoMax results to return (default 50, max 200)
cursorstringNoISO date string cursor for pagination. Use next_cursor from previous response.

Request

{ "jsonrpc": "2.0", "id": 3, "method": "tools/call",
  "params": { "name": "list_expenses", "arguments": {
    "year": 2026, "limit": 10
  }}}

Response

{ "expenses": [{ "id": "...", "vendor": "...", "total": 0, ... }],
  "next_cursor": "2026-01-15" }
add_expense_from_text

Create a receipt from natural language (e.g. '$340 at Ferguson Supply').

1 credit
ParameterTypeReqDescription
textstringYesNatural language expense description
list_categories

List all expense categories with IDs and names. Use before confirm_receipt to find valid category values.

Free
add_mileage_trip

Record a business mileage trip with IRS-compliant rates.

Free
ParameterTypeReqDescription
distance_milesnumberYesTrip distance in miles
purposestringYesBusiness purpose of the trip
start_atstringYesISO 8601 start datetime
end_atstringNoISO 8601 end datetime (optional)

Tax Intelligence

5 tools

get_tax_summary

Get a tax-year summary grouped by IRS schedule and line item.

Free
ParameterTypeReqDescription
yearnumberNo4-digit tax year (defaults to current year)

Request

{ "jsonrpc": "2.0", "id": 4, "method": "tools/call",
  "params": { "name": "get_tax_summary", "arguments": { "year": 2026 }}}

Response

{ "year": 2026, "grand_total": 15420.50,
  "schedules": { "E": { "total": 12100, "lines": { "14 - Repairs": 5400 } },
    "C": { "total": 3320.50, "lines": {} } },
  "uncategorized_total": 0 }
get_schedule_report

Get a complete IRS schedule report ready for tax filing.

Free
ParameterTypeReqDescription
yearnumberYes4-digit tax year, e.g. 2026
schedulestring (E|C|F)YesIRS schedule: E (rental), C (business), or F (farm)
classify_expense

Classify a receipt as deductible repair vs capital improvement.

1 credit
ParameterTypeReqDescription
receipt_idstringYesUUID of the receipt to classify
answersobjectNoOptional answers to previous clarifying questions (key: question ID, value: answer)
get_audit_risk

Get an audit risk assessment with per-line-item risk scores.

1 credit
ParameterTypeReqDescription
yearnumberNo4-digit tax year (defaults to current year)
detect_deduction_gaps

Detect likely missing deductions with estimated dollar values.

1 credit
ParameterTypeReqDescription
yearnumberNo4-digit tax year (defaults to current year)

Business & Property

3 tools

list_businesses

List all businesses/properties with schedule type and ownership %.

Free
create_business

Create a business or property for schedule-level tax reporting.

Free
ParameterTypeReqDescription
namestringYesBusiness or property name
schedulestring (C|E|F)NoIRS schedule (default C)
entity_typestring (sole_prop|llc|s_corp|c_corp|partnership)NoLegal structure (default sole_prop)
ownership_pctnumberNoOwnership percentage 1-100 (default 100)
run_cost_segregation

Run cost segregation analysis for accelerated depreciation.

1 credit
ParameterTypeReqDescription
asset_idstringNoOptional UUID of an existing asset
purchase_pricenumberYesProperty purchase price
purchase_datestringYesYYYY-MM-DD purchase date
property_typestring (residential_rental|commercial|mixed_use)YesType of property
year_builtnumberYesYear the property was built
square_footagenumberYesTotal square footage
num_unitsnumberNoNumber of units (optional)
renovationsstringNoDescription of any renovations (optional)

API Pricing

No subscription required. Sign up free, buy credit packs, and start using the API.

Pay as you go

How It Works

Create a free account, generate an API key, and buy credits. No subscription needed.

  • Free account + API key
  • All 19 tools available
  • 10 free credits on signup
  • Credits never expire
Get Started Free
Add-on

Credit Packs

AI-powered tools (submit, classify, audit, gaps, cost seg) cost 1 credit each.

50 credits$0.10/credit
$5
200 credits$0.075/credit
$15
500 credits$0.06/credit
$30