# teamspend [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/RudrenduPaul/teamspend  
**GitHub Stars:** 0  
**npm Downloads (last month):** 255  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/teamspend

## Description
Compares AI coding tool spend before and after a migration via MCP tools.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "teamspend": {
    "command": "npx",
    "args": ["-y","teamspend-cli"],
    "env": {
      "TEAMSPEND_CURSOR_TOKEN": "",
      "TEAMSPEND_CLAUDE_CODE_TOKEN": "",
      "TEAMSPEND_COPILOT_TOKEN": "",
      "TEAMSPEND_COPILOT_ORG": "",
      "TEAMSPEND_COPILOT_SEAT_PRICE_USD": ""
    }
  }
}
```

**Requires environment variables:** `TEAMSPEND_CURSOR_TOKEN`, `TEAMSPEND_CLAUDE_CODE_TOKEN`, `TEAMSPEND_COPILOT_TOKEN`, `TEAMSPEND_COPILOT_ORG`, `TEAMSPEND_COPILOT_SEAT_PRICE_USD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What teamspend MCP server does

The teamspend MCP server is designed for comparing AI coding tool usage and spend across two defined periods. Instead of limiting a report to one vendor, it places data from the selected tools into a single before-and-after comparison. The output can show total spend, active users, the absolute and percentage change, and a path to a saved JSON report.

Supported data sources include Cursor, Claude Code, GitHub Copilot, OpenCode, and Codex CLI. The project also includes a personal mode for users who do not have administrative access. OpenCode and Codex CLI use local data, while other adapters can retrieve organization-level information from provider APIs. The README also describes session-level cost breakdowns and CSV import for historical periods that a live API cannot cover.

## How it works

The teamspend MCP server accepts the tools to compare and a date range for each side of the comparison. A typical command selects two adapters with `--tools`, then supplies `--before` and `--after` ranges in `YYYY-MM-DD:YYYY-MM-DD` form. Human-readable output is printed by default; `--json` writes the full report to standard output for scripts or CI workflows.

Data is obtained from the relevant source rather than by scraping dashboards. Cursor uses its Admin API, and Claude Code uses Anthropic’s Enterprise Analytics API. Local-only adapters read their available local records. CSV files can supplement an API when the requested historical window is unavailable; rows include a date, user email, cost in USD, and an estimation flag.

Requests receive bounded exponential backoff for rate limits, timeouts, and transient failures. If one side cannot be retrieved, the result identifies the unavailable data and its reason. The application also detects suspicious zero-cost results associated with flat-seat billing and marks them as estimated instead of treating them as definitive usage cost.

## Setup and configuration

The project provides separate JavaScript/TypeScript and Python packages, both distributed as `teamspend-cli`. Install the npm package globally with `npm install -g teamspend-cli`, or install the Python package with `pip install teamspend-cli`. Either distribution provides the `teamspend` command.

Cursor and Claude Code comparisons use `TEAMSPEND_CURSOR_TOKEN` and `TEAMSPEND_CLAUDE_CODE_TOKEN`. The README states that these credentials require organization-admin-level access on the respective platforms. GitHub Copilot additionally uses `TEAMSPEND_COPILOT_TOKEN` and `TEAMSPEND_COPILOT_ORG`; an optional `TEAMSPEND_COPILOT_SEAT_PRICE_USD` value supplies the seat price used by that adapter.

## Tools and capabilities

- Compare spend before and after a tool migration.
- Combine data from supported coding-tool adapters in one report.
- Import older records from CSV files.
- Produce human-readable or JSON reports.
- Include session-level cost details when requested with `--breakdown`.
- Read local usage in credential-free personal, OpenCode, and Codex CLI modes where supported.

## Limitations and notes

Provider access requirements vary by adapter. Cursor and Claude Code require administrative API credentials for organization data, while the personal mode is intended for users without admin access. A live API may not contain the full requested history, in which case CSV data is needed for the missing period.

The reported values reflect the data returned by each provider or supplied in the CSV. Flat-seat billing can produce an exact-looking zero despite token activity, so the project labels those cases as estimated. Generated reports contain per-user email and spend data; the README states that report files use owner-only permissions and are automatically ignored by Git.

_Full upstream README: https://allmcps.com/mcp/teamspend/readme_

