@margint-ai/mcp
Officialby margint-ai
README.md
# @margint-ai/mcp
> Query your Margint per-customer AI margin from Claude Desktop, Cursor, or any MCP client.
Ask the LLM "which customers are losing me money this month?" and have it pull the answer from your Margint workspace. Read-only, scoped to a single API key.
## Install
Add to your MCP client config (Claude Desktop example, `~/Library/Application Support/Claude/claude_desktop_config.json`):
```json
{
"mcpServers": {
"margint": {
"command": "npx",
"args": ["-y", "@margint-ai/mcp"],
"env": {
"MARGINT_API_KEY": "m_live_..."
}
}
}
}
```
For Cursor: same JSON, in **Settings → Features → MCP**.
Get a key at [app.margint.dev](https://app.margint.dev) → **Settings → API Keys**.
## Tools exposed
| Tool | What it does |
| ------------------------- | ----------------------------------------------------------- |
| `margint_list_customers` | List tracked customers with margin, revenue, cost |
| `margint_get_customer` | Drill into one customer's costs by feature/model |
| `margint_cost_overview` | Workspace-wide totals + breakdowns by provider/model/feature |
| `margint_check_budget` | Check whether a customer is at/over their monthly budget |
All tools accept a `range` parameter (`7d`, `30d`, `90d` — default `30d`).
## Configuration
| Env var | Default | Notes |
| -------------------- | ------------------------ | ------------------------------------ |
| `MARGINT_API_KEY` | _required_ | Your workspace API key |
| `MARGINT_BASE_URL` | `https://app.margint.dev` | Override for self-hosted Margint |
## Privacy
The MCP server only forwards your prompts to Margint's read API — it never reads your LLM call payloads. The API key scopes access to a single workspace.
---
MIT licensed. © Margint. Questions: `hi@margint.dev`.
TDQS
A4.4/5.0
Scored across 4 tools
Disambiguation5/5
Each tool serves a distinct purpose: budget check for self-gating, cost overview for aggregate metrics, get customer for detailed per-customer data, and list customers for overview of all customers. No overlap in functionality.
Naming Consistency5/5
All tools follow a consistent pattern: 'margint_' prefix followed by a verb_noun in snake_case (e.g., check_budget, cost_overview). The naming is uniform and predictable.
Tool Count5/5
With 4 tools, the set is well-scoped for a cost monitoring server. It covers essential operations without unnecessary complexity.
Completeness5/5
The tools provide comprehensive read-only coverage for budget and cost monitoring: budget check, aggregate overview, per-customer details, and customer listing. No gaps for the intended use case.
Maintenance
ActivityInactive
ResponsivenessNo issues