defrr

com.defrr由 defrr.com 發布官方發布者v1.4.1更新於 Nov 7, 2026

RevRec schedules, renewals, credits, usage pricing, multi-currency, back-dated. Saves drafts.

已驗證Streamable HTTP可網頁執行金融資料與分析商業與電商

概覽

AI 產生的概覽

依你提供的合約條款計算收入認列與帳單排程、續約、信用調整和用量計價,不儲存任何資料。

可以做什麼
  • 依合約條款產生逐月的帳單、收入與遞延餘額排程,支援外幣與回溯日期
  • 一次為最多 50 份合約產生遞延收入滾動表,並給出單份與合計金額
  • 處理續約、價格更正與取消,回傳貸項通知、已關帳月份的反轉及更正後的收入
  • 依固定單價、級距、預付額度或固定費加超量等模式逐月計算用量費用
  • 查詢帳戶剩餘額度
適用情境
適合財務與收入營運情境:需要把合約條款轉成排程、補記回溯日期的合約,或推算續約、價格更正、取消對已認列收入的影響時使用。
執行需求
遠端 Streamable HTTP 端點,無需本機安裝。需要 defrr API 金鑰,以 Authorization 的 bearer 權杖傳送(部分用戶端可用 X-API-Key 標頭)。沒有金鑰時只能列出工具而無法呼叫。每次計算消耗額度,免費金鑰初始含 40 額度。
安裝前請注意
計算會消耗額度(每份合約、每次續約或每條用量計 1,重新定價與取消工具計 2),僅在呼叫失敗時退還。金鑰可選擇開啟儲存或核准權限,因而把合約、續約和用量產品寫入你的 defrr 組織;草稿在核准前不會生效。請勿將 API 金鑰寫入檔案或版本控制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 defrr,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.defrr%2Fdefrr/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "defrr": {
      "type": "http",
      "url": "https://defrr.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

defrr MCP server

Revenue recognition (RevRec) schedules, waterfalls, renewals, credits, cancellations and usage pricing for contracts, worked out by defrr's engine. Connect it to Claude Code and ask in plain English, or call it from your own code.

The calculation tools store nothing, and nothing you send to them is logged. If you want, you can also switch on saving to your defrr organization (see below): contracts and renewals are saved as drafts a person approves, and usage products can be set up. That is off by default and set per key.

Connect

  1. Create an API key at https://defrr.com/developers/account (40 free credits).

  2. Add the server:

    claude mcp add --transport http defrr https://defrr.com/v1/mcp \  --header "Authorization: Bearer dfr_live_YOUR_KEY"
  3. In Claude Code, type /mcp. defrr should show 9 tools for a key that only calculates, or 19 or 24 for a key that can also save contracts (see below).

Tools

These calculate and store nothing. They work for every key.

ToolWhat it doesCredits
defrr_create_contractNew contract: terms in, month-by-month schedule out. Saves nothing. Takes currency and exchangeRate for a deal priced in a foreign currency, and lockedThrough for a back-dated contract1
defrr_create_waterfallUp to 50 contracts at once: each contract's billing, revenue and deferred balance by month, and the total1 per contract
defrr_process_renewalRenewals: the price change, the billing entry, the revised schedule, and what to post by month. A renewal processed after it started has its catch-up posted in the first open month1 per renewal
defrr_usage_billingWhat usage costs under flat, volume, prepaid-credit or fixed-fee-plus-overage pricing, month by month. Prepaid overage is flagged; a fixed fee's overage is priced and returned apart from revenue. Give a fixed-fee line a startDate and dated usage and its cycles follow the contract's anniversary: the fee is booked in the month each cycle starts and the overage in the month it ends. Stateless: your usage is calculated and returned, never stored1 per line
defrr_reprice_renewalCredit for a renewal priced too high2
defrr_reprice_contractCredit for an original term priced too high2
defrr_cancel_renewalCancel the latest renewal2
defrr_cancel_contractCancel a whole contract2
defrr_get_credit_balanceCheck your creditsFree

A call that fails is refunded.

No key needed to look. Without a key, a client can open a session and list the 9 calculation tools above, so you can see what defrr does before signing up. Every tool call, and anything else, still needs a key.

Saving to defrr (optional)

By default the tools above only calculate: the schedule comes back to you and nothing is kept. If you want contracts and renewals recorded in your defrr organization, create a key with Save contracts in Defrr ticked on your developer account. If you don't have a defrr workspace yet, the page sets up a small one for you (company name, base currency, how revenue is recognised and, if you like, the month your books are locked through). A key without that option can only calculate.

ToolWhat it doesNeedsCredits
defrr_save_contractSaves a contract as a draft and works out its schedule. Pass backdated: true for a contract that started in closed months: they are caught up in the first open month, as the app doesthe save option1 (a repeat is free)
defrr_get_exchange_ratedefrr's daily exchange rate between two currencies, for a contract priced in a foreign currencythe save optionFree
defrr_list_draftsLists the drafts waiting for approval, or already decidedthe save optionFree
defrr_get_workspaceShows the organization, its base currency and recognition model, its locked period, how many drafts are waiting, and when the key last connectedthe save optionFree
defrr_approve_draftMakes a draft a live contractthe approve optionFree
defrr_reject_draftDiscards a draft (it is kept as rejected)the approve optionFree
defrr_save_renewalSaves a renewal for a contract already in the workspace as a draft: the contract is not changed until the renewal is approved. Works for contracts whose terms can be read as a schedule, and refuses a renewal that starts in a closed perioda save or approve key1 (a repeat is free)
defrr_list_renewal_draftsLists renewal drafts waiting for approval, or already decideda save or approve keyFree
defrr_approve_renewal_draftAdds a draft renewal to its contract as a new last term and recalculates its schedulesthe approve optionFree
defrr_reject_renewal_draftDiscards a draft renewal (it is kept as rejected)the approve optionFree
defrr_find_contractsFinds a customer's contracts in the workspace by namea save or approve keyFree
defrr_get_contractReads one contract and returns its terms as a schedule the calculation tools take. Says what is in the way when a contract has features the calculators don't modela save or approve keyFree
defrr_list_usage_productsLists the usage products already set up in the workspacea save or approve keyFree
defrr_preview_usage_productShows what sample customers would pay under a usage product (pay as you go, prepaid credits or fixed fee plus overage) before it exists. Saves nothinga save or approve keyFree
defrr_create_usage_productCreates that usage product in the workspace (a new product only; existing ones are edited in defrr)the approve optionFree

A saved contract is a draft. It isn't live, and no report reads it, until it is approved: in defrr under Contracts, Draft contracts, or by an agent whose key also has the approve option. Leave the approve option off for an agent you want a person to check. If a draft has revenue in months you have closed (your locked period in Organization details), or in months that have already ended, defrr says so before it is approved.

Foreign currency. For a deal priced in another currency, send currency (such as EUR) and the term prices in it. Prices are converted to your organization's base currency at the exchangeRate you give (how much of your currency one unit of the foreign currency is worth), or at defrr's daily rate for the start date if you leave it out (defrr_get_exchange_rate shows it). If there is no rate the save is refused: a rate of 1 is never assumed. The draft keeps the foreign price, currency and rate, and renewals and corrections on that contract are made in its own currency.

Back-dated contracts. If a contract started in months your organization has already closed, save it with backdated: true (or, to see the effect without saving, pass lockedThrough to defrr_create_contract). The months from the start through the locked period are caught up together in the first open month, the way the defrr app does it, and the invoice is posted there too, so no closed month changes. It works with foreign currency and with renewals. A single term needs a quantity of 1, and the contract must run past the locked month. The result says how much lands in which month.

Repeats are safe. Sending the same agreement again returns the draft already saved and costs nothing, while that draft is waiting or approved. If it was rejected, or its contract has since been deleted, the same terms save as a new draft. Send an idempotencyKey to save a separate deal with identical terms.

A saved renewal is a draft too. When a customer renews, the agent finds the contract (defrr_find_contracts, then defrr_get_contract) and saves the renewal with defrr_save_renewal: the contract's id, the renewal's end date and the renewal term's total price. The contract does not change until the renewal is approved in defrr under Contracts, Draft renewals, or with defrr_approve_renewal_draft if the key may approve. Approving adds the renewal as a new last term and recalculates the contract's schedules. It only works on a contract whose terms can be read as a schedule (defrr_get_contract says why when it can't, for example monthly billing, a discount or adjustments recorded against it), only after the contract's last end date, and it refuses a renewal that starts in a closed period: process that one in the app under Edit renewals.

What the agent is told. When a session starts it learns which organization it is connected to, the last locked period, and when the key last connected. Only a person can change the locked period, in defrr under Organization details.

Be stepped through it

In Claude Code, start a new session and type:

/mcp__defrr__new-contract

It asks for anything missing (customer, product, each term's dates and price, how revenue is recognised), reads the terms back for you to confirm, then saves a draft. You can put what you already know after the command. Other MCP clients list the same prompt as new-contract on the defrr server, in their own menu. Or just ask in plain English: "Create a contract for Acme Pty Ltd, Pro Plan, 1 Jan 2027 to 31 Dec 2027 at $12,000".

A developer workspace

A workspace set up from the developer account page opens a few pages in the defrr app: the Dashboard, View all contracts, Draft contracts, Draft renewals, Usage products, the customer profile, and Organization details (the basic details, recognition model, base currency and locked period). The rest are subscription features and are shown greyed out.

It also has an Ask defrr assistant, a button at the bottom right of every page. It uses these same tools and your credits, and can also prepare the cancellation of a contract, or of its latest renewal: it shows the figures on a card and nothing changes until you press Confirm. It cannot approve drafts.

Try it

A new contract (calculate only):

Use defrr to create a contract: original term 1 Jan 2026 to 31 Dec 2026 at $12,000, then a renewal from 1 Jan 2027 to 31 Dec 2027 at $18,000. End dates are included. Recognise it smooth. Show me the terms and the month-by-month schedule.

A renewal:

Use defrr to process a renewal, recognised smooth with end dates included. The contract ran 1 Jan 2026 to 31 Dec 2026 at $12,000 and renews to 31 Dec 2027 at $18,000. Our books are closed through March 2027. Show the price change, the billing entry, any catch-up, and what to post by month.

Usage:

Use defrr to price usage for two customers. Acme is on volume pricing: the first 100,000 units a month at $0.002, then $0.001 a unit above that. They used 250,000 units in Jan 2026 and 80,000 in Feb 2026. Globex has prepaid credit: 100,000 units at $0.002 each. They used 70,000 units in Jan 2026 and 60,000 in Feb 2026. Show each month's revenue, the total by month, and any overage.

Saving a renewal (needs a key with the save option):

Acme Pty Ltd renewed their Pro Plan to 31 Dec 2028 for $14,000. Find their contract and save the renewal as a draft. Tell me which contract you used.

Saving a contract (needs a key with the save option):

Create a contract in defrr for Acme Pty Ltd, Pro Plan: 1 Jan 2027 to 31 Dec 2027 at $12,000, exact recognition, end date included. Tell me which organization it was saved to.

Other clients

Any MCP client that supports Streamable HTTP and custom headers can connect. Send your key either as Authorization: Bearer dfr_live_YOUR_KEY or as X-API-Key: dfr_live_YOUR_KEY (for tools that don't let you set Authorization). Never put a key in the web address.

Cursor

This repository is laid out as a Cursor plugin: the defrr connection (mcp.json, and the same file as .mcp.json for directories that look for that name), a rule that tells the agent when to use defrr (rules/defrr-revops.mdc), and a new-contract command that steps you through saving a contract (commands/new-contract.md).

The connection reads your key from an environment variable called DEFRR_API_KEY, so the key never goes into a file. Create a key at https://defrr.com/developers/account, then set the variable once:

  • macOS (tested): in Terminal run

    launchctl setenv DEFRR_API_KEY dfr_live_YOUR_KEY

    Then quit Cursor completely (Cmd+Q) and open it again from the Dock or Applications folder, not by typing a command in Terminal. Cursor reads the variable when it starts, so reloading the window is not enough. The setting lasts until you restart your Mac: run the command again after a restart, or use the file-based setup below.

  • Windows and Linux (not tested): set a user environment variable named DEFRR_API_KEY, then quit and reopen Cursor.

Then check Cursor's MCP settings: defrr should be ready and list its tools (9 for a key that only calculates, 19 or 24 for a key that can save contracts).

To use the plugin before it is in Cursor's marketplace, copy this folder to ~/.cursor/plugins/local/defrr/ and reload Cursor.

If you would rather keep the key in a file, or Cursor can't see the variable, it shows defrr as failed, often with Unexpected token '<', "<!DOCTYPE"... is not valid JSON in its MCP log. That message means the request reached defrr without a valid key. Add the server yourself in ~/.cursor/mcp.json (or Cursor Settings, MCP):

json
{  "mcpServers": {    "defrr": {      "type": "http",      "url": "https://defrr.com/v1/mcp",      "headers": { "X-API-Key": "dfr_live_YOUR_KEY" }    }  }}

Keep this file out of version control, and if you use the plugin as well, turn the plugin's own copy of the server off so the two don't clash.

LangChain

LangChain connects to MCP servers through its langchain-mcp-adapters package:

python
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({    "defrr": {        "transport": "streamable_http",        "url": "https://defrr.com/v1/mcp",        "headers": {"X-API-Key": "dfr_live_YOUR_KEY"},    }})tools = await client.get_tools()

Keep your key in an environment variable rather than in the code. See LangChain's MCP documentation for how to use the tools in an agent.

Larger sets

A revenue waterfall takes up to 50 contracts per call. For more, send them in batches and pass each response's carry into the next call: the last batch returns the grand total for all of them. For a big set (hundreds or thousands of contracts), call the API from a script instead of through the model, so the figures go straight into a file. The guide has a ready-made Python script that writes two CSV files.

Privacy

The calculation tools work from what you send in each request and keep nothing about it. The one exception is saving, which you switch on per key: a key with Save contracts in Defrr stores the contracts and renewals you send (customer, product, dates and prices) as drafts in your own defrr organization, and the usage products you create there.

Docs and limits

Full reference, pricing and what isn't covered: https://defrr.com/developers/guide

Registry listing: com.defrr/defrr

來源:README.md,提交 f4399d8

工具

9

defrr_create_contract

Create a contract

Use when a new deal is signed and you need its revenue and billing schedule worked out from the terms, without saving it anywhere. Returns every month's billing, revenue and deferred balance, and the contract's totals. For a deal priced in a foreign currency, send currency and exchangeRate and the term prices in that currency. For a contract that started in months that are already closed (a back-dated contract), pass lockedThrough: the months from its start through that month are caught up as one lump of revenue in the first open month, the way defrr's app does, and the result says how much (foreign currency works; a single-term contract needs a quantity of 1, renewals are fine). Nothing is corrected, credited or saved: to record the contract in the user's defrr organization, use defrr_save_contract instead, if you have it. Costs 1 credit (refunded if it fails).

輸入參數currencyschedule必填exchangeRatelockedThrough

defrr_create_waterfall

Create a revenue waterfall for several contracts

Use when you need the deferred revenue roll-forward for a set of contracts: send up to 50 contracts' terms and get back, for each contract and for all of them together, every month's billing, revenue and ending deferred balance (opening deferred balance + billing - revenue = ending). Each contract is built like defrr_create_contract. Everything or nothing: if one contract is rejected the call fails and nothing is charged. Costs 1 credit per contract (refunded if it fails). Nothing you send is stored. For more than 50 contracts, send them in batches of up to 50, each saying which batch it is (batch: number and of) and passing in the carry returned by the batch before; the last batch returns grandTotal for all of them. For a very large set, call the REST API from a script instead of through the model.

輸入參數batchcarryshapecontracts必填

defrr_process_renewal

Process renewals

Use when customers renew and you need the renewal worked out: send each contract's terms as they stand, and the renewal's end date and the price for the renewal term. Returns the renewal term and how its price compares with the term before it (in total and per month, since a renewal can be a different length), the billing entry to post, the revised month-by-month schedule, and the total to post by month. With the latest closed month, a renewal processed after it started has its billing and catch-up revenue posted in the first open month instead. The renewal is recognised on the contract's own basis: a different basis is a new contract (defrr_create_contract). Up to 50 renewals per call, each with your own id. Costs 1 credit per renewal (refunded if the call fails). Nothing you send is stored.

輸入參數renewals必填lockedThrough

defrr_reprice_renewal

Reprice a renewal

Use when a renewal was priced too high and needs a credit. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).

輸入參數schedule必填termIndex必填lockedThroughcorrectedPrice必填

defrr_reprice_contract

Reprice the original term of a contract

Use when the contract's ORIGINAL term (its first term, before any renewal) was priced too high and needs a credit. Renewals keep their own prices; to correct a renewal use defrr_reprice_renewal. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).

輸入參數schedule必填lockedThroughcorrectedPrice必填

defrr_cancel_renewal

Cancel a renewal

Use when the latest renewal is cancelled and refunded in full. Returns the credit note, the reversal for closed months and the revenue month by month. Costs 2 credits (refunded if it fails).

輸入參數schedule必填termIndex必填lockedThrough

defrr_cancel_contract

Cancel a contract

Use when a whole contract is voided and refunded. Reverses everything recognised in closed months and removes the rest. Costs 2 credits (refunded if it fails).

輸入參數schedule必填lockedThrough

defrr_usage_billing

Price usage

Use when customers are billed on what they use and you need the usage turned into what it costs, month by month. Send each customer-and-product's pricing (flat or volume tiers, a prepaid credit balance, or a hybrid: a fixed monthly fee with included units and a price per unit above them) and the quantity used in each month; get back each month's revenue, the total across all of them, and any prepaid overage (units beyond the balance, flagged and not priced). A hybrid line returns revenue (the fixed fee, which excludes overage), overage (units over the allowance, priced) and revenueInclOverage for each month. Without a startDate the allowance starts again each month you list. With a startDate (and dated usage entries) the cycles follow the contract's anniversary: the fee is booked in full in the month each cycle starts, whether or not anything was used, and the overage in the month the cycle ends; the response also lists each cycle. Quantities are what was used in that month, not a running total. Tiers price band by band, and the bands start again each month. Costs 1 credit per line (refunded if it fails). Nothing you send is stored.

輸入參數lines必填breakdown

defrr_get_credit_balance

Check your credit balance

Use to see how many credits the account has left before running a calculation. Free.

無需輸入參數。

版本歷史

6
  1. v1.4.1最新Nov 7, 2026
  2. v1.4.0Nov 7, 2026
  3. v1.3.0Oct 29, 2026
  4. v1.2.0Oct 25, 2026
  5. v1.1.0Oct 21, 2026
  6. v1.0.1Oct 20, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。