Skip to content
MCP server
Registry

marginmath MCP Server

Ecommerce margin calculators: break-even ROAS, profit scenarios, UTM links, weekly reports.

marginmath scores 66 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 6 tools. Filed under Uncategorized. GitHub shows 0 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by cloudcorprecordsMITTypeScript0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "cloudcorprecords-marginmath": {      "command": "npx",      "args": [        "-y",        "@reneturcios/marginmath@0.1.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools6Tool docs quality grade A

All capabilities
  • Formats one HTTP(S) campaign URL with url, source, medium and campaign (plus optional content and term), trimming and lowercasing the UTM values. It never visits the URL.

  • Break-even and target-profit ROAS and maximum CPA from revenue, costs, percentage fees and a refund reserve. All seven inputs (currency, price, productCost, shippingCost, paymentFeeRate, refundRate, targetPro

  • Compares two to five user-supplied pricing or cost scenarios (scenarios, each with a label and the same seven inputs) in one currency, returning contribution, maximum CPA and ROAS for complete scenarios.

  • Reads guest excerpts and cited source links for one published weekly report by its slug, as returned by listpublicweeklyreports.

  • Lists up to ten published or corrected Ecomwith weekly reports with public summaries and dates. No required parameters; limit and locale are optional.

  • Searches Ecomwith published tutorial metadata and public answer summaries by query (English or Chinese); limit caps the count between 1 and 10 and locale is en or zh.

About

marginmath

What does a product's margin actually allow you to spend on ads? marginmath is a local forwarding client for the hosted Ecomwith MCP service: it answers tools/list locally from the captured tool definitions and forwards every call to the service, returning the answers exactly as the service sends them back.

All six tools are calculators and public reads. Two compute ecommerce margins from figures you supply — break-even and target-profit ROAS with maximum CPA, and side-by-side comparisons of pricing or cost scenarios — one formats campaign UTM links locally, and the rest search Ecomwith's published tutorials and read its public weekly reports. Unknown inputs are passed through as null and come back as needs_input questions, never guessed. There is no write, signup, or send tool in this surface.

The tools

  • calculate_break_even_roas — Break-even and target-profit ROAS and maximum CPA from revenue, costs, percentage fees and a refund reserve. All seven inputs (currency, price, productCost, shippingCost, paymentFeeRate, refundRate, targetProfit) are required; use null for any that is unknown.
  • compare_profit_scenarios — Compares two to five user-supplied pricing or cost scenarios (scenarios, each with a label and the same seven inputs) in one currency, returning contribution, maximum CPA and ROAS for complete scenarios.
  • build_campaign_utm — Formats one HTTP(S) campaign URL with url, source, medium and campaign (plus optional content and term), trimming and lowercasing the UTM values. It never visits the URL.
  • search_ecommerce_resources — Searches Ecomwith published tutorial metadata and public answer summaries by query (English or Chinese); limit caps the count between 1 and 10 and locale is en or zh.
  • list_public_weekly_reports — Lists up to ten published or corrected Ecomwith weekly reports with public summaries and dates. No required parameters; limit and locale are optional.
  • get_public_weekly_report — Reads guest excerpts and cited source links for one published weekly report by its slug, as returned by list_public_weekly_reports.

Install and run

As an MCP server via npm:

npx -y @reneturcios/marginmath mcp

MCP client configuration:

{
  "mcpServers": {
    "marginmath": {
      "command": "npx",
      "args": ["-y", "@reneturcios/marginmath", "mcp"]
    }
  }
}

As a container:

docker run -i ghcr.io/cloudcorprecords/marginmath
docker run --rm ghcr.io/cloudcorprecords/marginmath search_ecommerce_resources '{"query":"roas"}'

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:

marginmath calculate_break_even_roas '{"currency":"USD","price":100,"productCost":40,"shippingCost":8,"paymentFeeRate":3,"refundRate":5,"targetProfit":10}'
marginmath compare_profit_scenarios '{"scenarios":[{"label":"base","inputs":{"currency":"USD","price":100,"productCost":40,"shippingCost":8,"paymentFeeRate":3,"refundRate":5,"targetProfit":10}},{"label":"premium","inputs":{"currency":"USD","price":140,"productCost":40,"shippingCost":8,"paymentFeeRate":3,"refundRate":5,"targetProfit":10}}]}'
marginmath build_campaign_utm '{"url":"https://example.com/landing","source":"google","medium":"cpc","campaign":"spring_sale"}'
marginmath search_ecommerce_resources '{"query":"break-even roas"}'
marginmath list_public_weekly_reports '{}'
marginmath get_public_weekly_report '{"slug":"2026-week-01"}'
marginmath --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

  • MARGINMATH_MCP_URL — Overrides the upstream endpoint. The default is the pinned hosted endpoint, https://ecomwith.com/api/mcp. (The override variable is a reconstruction added by this rebuild.)

The upstream registry record declares no headers, so no authentication header is ever sent; the tool surface was captured keyless.

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 marginmath 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

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 (all 6 tools, deep-equal, in order, with titles served verbatim and no required key added to the one tool that carries none), exercises the session handshake and its reuse, verifies that no Authorization or X-API-Key header is ever sent under any environment, and verifies that arguments go upstream untouched and results come back untouched.

License

MIT — see LICENSE. Copyright (c) 2026 Rene Turcios.

Frequently asked questions

What is marginmath MCP Server?

Ecommerce margin calculators: break-even ROAS, profit scenarios, UTM links, weekly reports.

How do I install marginmath MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. marginmath MCP Server runs locally from the npm package @reneturcios/marginmath with the command npx -y @reneturcios/marginmath@0.1.0.

Is marginmath MCP Server free and open source?

Yes. marginmath MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does marginmath MCP Server support remote (HTTP) connections?

No remote endpoint is listed for marginmath MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does marginmath MCP Server provide?

marginmath MCP Server provides 6 tools, including build_campaign_utm, calculate_break_even_roas, compare_profit_scenarios, and get_public_weekly_report. See the full tool list for descriptions and parameters.

How is marginmath MCP Server's trust score calculated?

marginmath MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server